Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
9 months 1 week ago #341564 by amanker
Sorry, I was confused in spi. I assumed that both board use same single spi without seeing it's board pin maps. But after seeing SKR3 pin map I found that it's using separate spi for config and comms. But in Octopus it's same for config and comms. Thanks for pointing out.

Please Log in to join the conversation.

More
9 months 1 week ago #341622 by amanker
Thanks for your tips.
@3040gerber and @cakeslob

Finally I got TMC5160 working on Octopus pro board f446 version.
I have changed the spi to spi2 with new interrupt and uart to uart3. I choosen spi2 because it's on wifi connector on board which is at the edge of board, so there will be much shorter length spi cable required and it has uart3 at same place.
Thanks a lot

Please Log in to join the conversation.

More
8 months 3 weeks ago #342594 by amanker
I was testing new remora-eth from ben-jacobson repository. With the suggestions from you was able to make it work on SPI3, with TMC5160 drivers on remora-spi.

But now I am testing remora-eth from same repo. Can you help me in this?. I have edited ldscript for octopus pro with ethernet. But I can't ping w5500.

Please Log in to join the conversation.

More
8 months 3 weeks ago #342637 by 3404gerber
Hi,

I'm happy to help if I can. I'm ot familiar with the STM32 controllers and I don't really understand the ldscript files, but from what I understand you'll need a ldscript and some adjustment in the platformio.ini file. Can you share your platformio.ini file?

Please Log in to join the conversation.

More
8 months 3 weeks ago #342661 by amanker
Thanks a lot.
I am attaching my ldscript which I made based on existing ldscripts included in repository. And attaching my platformio.ini.

Attachment not found

Attachment not found

Please Log in to join the conversation.

More
8 months 3 weeks ago #342694 by 3404gerber
Hi, 
So you are using the spi1 pins for the w5500? I think this will be a problem if your config uses tmc5160, as the module uses software spi and configure the pins as standard gpio. 

Please Log in to join the conversation.

More
8 months 3 weeks ago #342696 by amanker
Sorry, I was on mobile, not on PC so I wrongly uploaded platformio.ini. 
I am using SPI2 pins as per your previous suggestions and it was working ok in remora-spi with TMC.
So I am using same for ETH version.
I am uploading actual platformio.ini
 

Attachment not found



Please look at ldscript, which is I have made with reference to already available ldscripts.

Please Log in to join the conversation.

More
8 months 3 weeks ago #342723 by 3404gerber
Hi,

I had a quick look to the platformio.ini and it seems consistent. For the ldscript I'm afraid I'm not the right person to look at it, as I have absolutely no experience with this. Did you already try to reduce SPI speed, as you had issues with SPI communication? I think this line set it to 45MHz in EthComms.cpp:

spiHandle.Init.BaudRatePrescaler        = SPI_BAUDRATEPRESCALER_2; 

Please Log in to join the conversation.

More
8 months 3 weeks ago #342725 by amanker
I just made logical changes in ldscript, by looking at 3 scripts in repository. I think you are good in programming so you can make out something by looking at those scripts.
FYI... I am using ben-jacobson repository for remora_stm32f4xx_pio. He has working on nucleo_f446 board.
No spi issue was resolved. Since I was using RPI4, I have to include spi_clk_div=32 as argument to make spi working.
Other issue with tmc was resolved by changing spi to spi2 and assigning new interrupt.

Please Log in to join the conversation.

More
8 months 3 weeks ago #342727 by 3404gerber
I understand that you resolved the SPI issue when the RPi was the SPI master and was talking to the Octopus, but for the Ethernet config the Octopus board is the SPI master talking to the W5500 chip. So I would first try to reduce the SPI speed by changing the line I mentioned before.

Please Log in to join the conversation.

Time to create page: 0.832 seconds
Powered by Kunena Forum