Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
9 months 3 weeks ago #341260 by 3404gerber

Code:
... Edit: Launched linuxcnc on terminal, getting "bad spi payload" (Bad SPI payload = 32393a38)

The value of the payload is strange; it's almost half value of what you are suppose to get:

#define PRU_DATA            0x64617461     // "data" SPI payload
#define PRU_READ              0x72656164  // "read" SPI payload
#define PRU_WRITE             0x77726974  // "writ" SPI payload
#define PRU_ESTOP           0x65737470  // "estp" SPI payload

I'd try with a lower SPI frequency.

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

More
9 months 3 weeks ago #341275 by amanker
I tried cutting the spi cable short. Now it's just 7cm or smaller. Tried to lower spi frequency to 50000. But nothing helped.

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

More
9 months 3 weeks ago #341287 by 3404gerber
7cm should be ok. I started to have issue with TMC driver @4MHz after more or less 50cm.

Can you confirm that you always get the same SPI payload? (say, press the reset button 10 times and compare the results)

Could you share you hal file and the link to the firmware/lcnc component you use?

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

More
9 months 3 weeks ago - 9 months 2 weeks ago #341291 by amanker
I am using this branch

github.com/scottalford75/Remora/tree/main
This is repository I am using since last 2 years. Used on stm32f429 and stm32f446 both version of octopus pro boards

And also tested this one.
github.com/ben-jacobson/Remora-STM32F4xx-PIO
On octopus pro stm32f446 board

Also tested this repo
github.com/scottalford75/Remora-STM32H7xx-PIO
On BTT skr3 board

All were working. But now every repo gives same problem

Yes payload remains same.
"Bad SPI payload = 32393a38"
Occasionally it's 32393a30
Last edit: 9 months 2 weeks ago by amanker.

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

More
9 months 2 weeks ago #341313 by amanker
@3404gerber thanks for your all response. Finally I was able to make it working. Added spi_clk_div=32 in remora-spi arguments.
But it was never required earlier. I am using raspberry pi 4b.

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

More
9 months 2 weeks ago #341411 by 3404gerber
Happy to hear you solved your problem! In case you need some extra SPI cable length, you could balance the signal. I did a test and was able to transmit a 4MHz SPI signal to a driver over several meters of cable. I think it could get way faster than 4MHz, but I did try it so far as it is the max frequency of my driver. 

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

Time to create page: 0.281 seconds
Powered by Kunena Forum