Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
1 year 1 month ago #334469 by scotta
Wiring is the same as the SKR2. RPi4 or 5?

Please Log in or Create an account to join the conversation.

More
1 year 1 month ago - 1 year 1 month ago #334476 by amanker
Using rpi5. I have included my config files also.

Update: This I compiled bootloader version and Installed that. And added Blink in config.txt to test if firmware is working. Yes firmware is working and led is blinking. But Still no connection to RPI5, machine can't come out of estop.
Last edit: 1 year 1 month ago by amanker.

Please Log in or Create an account to join the conversation.

More
1 year 1 month ago #334519 by scotta
Good to hear. I'd suggest slowing down the SPI comms like in the discussion above.

hal
loadrt remora-spi SPI_num=0 CS_num=0 SPI_freq=2000000

ini
#SERVO_PERIOD = 1000000
SERVO_PERIOD = 5000000
The following user(s) said Thank You: Gusgus

Please Log in or Create an account to join the conversation.

More
1 year 1 month ago #334523 by Gusgus
Hello again Scotta!

We've continued testing on the octopus board, we have gotten movement but it seems that the SPI communication with the board seems to keep dying. We got the serial output:

Creating a std module

Remora PRU - Programmable Realtime Unit 

 Mbed-OS6 

 Remora-spi Driver 

## Entering SETUP state
1. Reading json configuration file
Mounting the filesystem... OK
Opening "/fs/config.txt"... OK
Json config file lenght = 1996
Closing "/fs/config.txt"... 
2. Setting up DMA and threads
Initialising SPI1 slave
Initialising DMA for SPI

3. Parsing json configuration file
Config deserialisation - Deserialization succeeded

4. Config threads
Creating thread 40000
Creating thread 1000
Creating thread 57600

5. Loading modules

Servo thread object
Reset pin
Make Reset Pin at pin PC_15

Creating a std module
Creating Pin @
  port = GPIOC
  pin = 15

Servo thread object
eStop
Make eStop at pin PG_12

Creating a std module
Creating Pin @
  port = GPIOG
  pin = 12

Servo thread object
Spindle
Make PWM at pin PB_0

Creating a std module
Creating variable frequency Hardware PWM at pin PB_0
Creating Pin @
  port = GPIOB
  pin = 0

Base thread object
X - Joint 0 step generator

Creating a std module
Creating Pin @
  port = GPIOG
  pin = 2
Creating Pin @
  port = GPIOF
  pin = 9
Creating Pin @
  port = GPIOF
  pin = 10

Base thread object
Y1 - Joint 1 step generator

Creating a std module
Creating Pin @
  port = GPIOF
  pin = 1
Creating Pin @
  port = GPIOC
  pin = 13
Creating Pin @
  port = GPIOF
  pin = 0

Base thread object
Y2 - Joint 1 step generator

Creating a std module
Creating Pin @
  port = GPIOD
  pin = 4
Creating Pin @
  port = GPIOE
  pin = 2
Creating Pin @
  port = GPIOE
  pin = 3

Base thread object
Z - Joint 2 step generator

Creating a std module
Creating Pin @
  port = GPIOE
  pin = 0
Creating Pin @
  port = GPIOE
  pin = 6
Creating Pin @
  port = GPIOA
  pin = 14

Servo thread object
X min
Make Digital Input at pin PG_6

Creating a std module
  Setting pin as No Pull
Creating Pin @
  port = GPIOG
  pin = 6

Servo thread object
Y min
Make Digital Input at pin PG_9

Creating a std module
  Setting pin as No Pull
Creating Pin @
  port = GPIOG
  pin = 9

Servo thread object
Z min
Make Digital Input at pin PG_10

Creating a std module
  Setting pin as No Pull
Creating Pin @
  port = GPIOG
  pin = 10

Servo thread object
Probe
Make Digital Input at pin PG_11

Creating a std module
  Setting pin as No Pull
Creating Pin @
  port = GPIOG
  pin = 11

## Entering START state

Starting the BASE thread
Registering interrupt for interrupt number = 24
    power on Timer 9

Starting the SERVO thread
Registering interrupt for interrupt number = 25
    power on Timer 10

## Entering IDLE state

## Entering RUNNING state

## Entering RESET state
   Resetting rxBuffer

## Entering IDLE state


This last bit is where we are running into a wall, we are not sure what is causing this.
 

Please Log in or Create an account to join the conversation.

More
1 year 1 month ago #334524 by Gusgus
we turn on the machine, and all normal

## Entering IDLE state

we open linux cnc and enable the machine

## Entering RUNNING state

x ammount of time passes and this happens

## Entering RESET state
Resetting rxBuffer

disable and we then get this printout

## Entering IDLE state

after that we can enable the machine but the time it takes for it to enter the reset state is much much shorter, like milliseconds

Please Log in or Create an account to join the conversation.

More
1 year 1 month ago #334525 by tommylight
Most probably interference on the SPI wiring, so the first thing would be to make those wires very short, like 10cm short, or use shielded cable.
I would also not bother with the power supply as Octopus has pretty good regulators.
If the machine has a spindle, notice if the error occurs when the spindle is turned on.
The following user(s) said Thank You: Gusgus

Please Log in or Create an account to join the conversation.

Time to create page: 0.113 seconds
Powered by Kunena Forum