Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
17 Dec 2021 23:42 #229350 by scotta

What are my options for boards with no SD card slot, and for boards with the SD card slot hooked into spi ?
I just got 2 fysetc boards in the mail, and forgot to figure it out before hand, the S6 has no sd slot and the Spider looks like sd slot is connected to an spi channel,



bari, the ethernet board is a 407

I personally needed 45KHz using 4mm pith and 16x micro-stepping to get the speeds I needed.

explain, because I have not observed or read about microstepping having any relation on speed. but those who do want higher output frequencies, mxmaster made some kind of stepgen multiplier
github.com/kubroid/steps-frequency-multiplier

Hi, for the Fysetc Spider we'll need to create another firmware variant to account for the SD card being over SPI vs SDIO. It looks like they may share the SPI on the EXP port with the SD card. I've got a shared version working for the STM32F1 boards, so the same should work for this board. The schematic needs some more study to config though.

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

More
18 Dec 2021 01:05 #229360 by cakeslob
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?

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

More
18 Dec 2021 01:34 #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
18 Dec 2021 18:58 #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
#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?


 
Attachments:

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

More
18 Dec 2021 20:22 #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?
Attachments:

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

More
18 Dec 2021 21:27 - 18 Dec 2021 21:42 #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: 18 Dec 2021 21:42 by scotta.

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

More
18 Dec 2021 21:48 #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
18 Dec 2021 22:47 - 18 Dec 2021 22:56 #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.

 
Attachments:
Last edit: 18 Dec 2021 22:56 by scotta.
The following user(s) said Thank You: tommylight

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

More
18 Dec 2021 23:12 #229450 by tommylight
Today i got 2 of Arduino Mega delivered that i bumped into yesterday, local seller with old prices, 30 Euro for both with shipping. The lowest i can find locally is 65 Euro a piece!
Now the question nobody is asking or wanting to hear: :)
Does Remora work on the Mega?
I also have a RAMPS 1.4, and a 1.6, with 5 drives each.
I'll go poke around github a bit...

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

More
19 Dec 2021 07:00 - 19 Dec 2021 07:05 #229470 by cakeslob
 
you go girl, ethernet would be sweet
if the stm32f103 is having supply shortage that probably explains why the new skr mini e3 that came out last month is based on the STM32G0B1RET6
 i got as far as i know how to go. it compiles without error, I will see if the monster8  breaks tomorrow. I know you are busy but if you could review my work and let me know if it looks kosher that would be appreciated

I need some help understanding this, 
if i wanted this to be pin pc_6, i dont know what the bottom nvic stuff is
else if (this->interruptPin == PC_6)
    {
        // interrupt pin is not the NSS pin, ie the board shares the SPI bus with the SD card
        // configure the SPI in software NSS mode and always on
        sharedSPI = true;
        HAL_NVIC_SetPriority(EXTI1_IRQn , 5, 0);


File Attachment:

File Name: remo_.rar
File Size:49 KB


tommy, i dont think you can use avr with remora
Attachments:
Last edit: 19 Dec 2021 07:05 by cakeslob. Reason: shouldnt have tried to edit

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

Time to create page: 0.210 seconds
Powered by Kunena Forum