Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
4 years 10 months ago #229365 by scotta

yeah it looks like they are on the same spi channel as exp, spi1
ok, and looks like the MKS monster8 has sd on spi3, will this fall under the same firmware?
The SD SPI/SDIO config for a specific target is hard coded so it will need to be a specific version of firmware.

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

More
4 years 10 months ago #229421 by cakeslob
ok, so as far as i can tell from the dev repo,

The MKS M8 looks similar to the mks robin, so I setup SDblockdevice for my spi3 pins, and use spi1 pa_4 as the spi interrupt because no shared SPI. The MKS Monster8 is an stm32f407

something like this i hope
Code:
#elif defined TARGET_MONSTER8 SDBlockDevice blockDevice(PC_12, PC_11, PC_10, PC_9); // mosi, miso, sclk, cs RemoraComms comms(ptrRxData, ptrTxData, SPI1, PA_4);

, But I have some confusion with the reset pin, pin 7 on exp2 is tied to vcap_1, so would I need to shift my resetpin over to another pin on exp2, like pin5 or 3?


 

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

More
4 years 10 months ago #229430 by cakeslob
Then, for the fysetc spider, I need shared SPI, so my thing will look more like the skr_mini_e3, with sdblockdevice on spi1 with shared spi,
I have a question about the software nss pin, where do I actually connect it to? Is this another pin that goes to the RPI io? Can I connect it to what ever pin is convenient?
The pin I would be using for the reset pin (pb_10) is also shared with the SD card SD_DET/CS, does this mean I cannot use it as the reset pin?

 

since there is now a shared SPI option, for boards with out an SD card slot, like fysetc S6, btt rumba32, and BTT002, if I connected the spi1 to and sd-spi breakout/spi-flash breakout like the ones featured below, in the same fashion the shared SPI is connected, could I use them in place of onboard sd card slot?

www.adafruit.com/product/254
www.adafruit.com/product/4718
learn.adafruit.com/adafruit-microsd-spi-sdio
(I think jelper works for adafruit or something...)


lastly, it seems a lot of these boards have I2C eeprom that appear to have mbed libraries, would it be possible to use these as an alternative to SD card?

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

More
4 years 10 months ago - 4 years 10 months ago #229432 by scotta
Hi, we'll need to update the RemoraComms.cpp for the STM32F4 in a similar way as for the F1.

github.com/scottalford75/Remora/blob/dev...omms/RemoraComms.cpp

Here you will see in the constructor if the chip select (interrupt pin) is the NSS pin or not, ie shared.

In the init() function there is a condition for when it is shared to set software NSS and then setting it to always on.

This functionality needs to be added to:

github.com/scottalford75/Remora/blob/dev...omms/RemoraComms.cpp

The alternate chip select pin must also be interrupt capable, there should be one of these available on a header. You can see in the STM32F1 example that it will be possible to have different pins for different boards.
Last edit: 4 years 10 months ago by scotta.

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

More
4 years 10 months ago #229434 by scotta

Then, for the fysetc spider, I need shared SPI, so my thing will look more like the skr_mini_e3, with sdblockdevice on spi1 with shared spi,
I have a question about the software nss pin, where do I actually connect it to? Is this another pin that goes to the RPI io? Can I connect it to what ever pin is convenient?
The pin I would be using for the reset pin (pb_10) is also shared with the SD card SD_DET/CS, does this mean I cannot use it as the reset pin?

 

since there is now a shared SPI option, for boards with out an SD card slot, like fysetc S6, btt rumba32, and BTT002, if I connected the spi1 to and sd-spi breakout/spi-flash breakout like the ones featured below, in the same fashion the shared SPI is connected, could I use them in place of onboard sd card slot?

www.adafruit.com/product/254
www.adafruit.com/product/4718
learn.adafruit.com/adafruit-microsd-spi-sdio
(I think jelper works for adafruit or something...)


lastly, it seems a lot of these boards have I2C eeprom that appear to have mbed libraries, would it be possible to use these as an alternative to SD card?
I think the answer is yes. Remora does not use the chip detect pin but you could connect one of those modules as if it were on the display board and parallel up with the RPi comms with the software NSS pin for the RPi SPI.

I've got one board with onboard EEPROM. I'm tempted to have a look at storing the config on it. But first I really want to get Remora-ethernet running. Finally got a UDP echo working on an SKRv1.3 so getting much closer. Learning a lot about ethernet, ports and sockets now....

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

More
4 years 10 months ago - 4 years 10 months ago #229446 by scotta
The chip shortage is starting to impact controller board availability, my order for another STM32F1 based board had to be refunded due to lack of stock. 

So I just ordered one of these 6-axis bundles with an MPG. Anyone know what serial communication protocol the MPG uses for the display? Hopefully this will be a Remora-ethernet development platform.... will be pretty cool to get the display working.

 
Last edit: 4 years 10 months ago by scotta.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.312 seconds
Powered by Kunena Forum