- Posts: 926
- Thank you received: 280
Please Log in or Create an account to join the conversation.
Great news that you have got this far. The SPI comms with the RPi should be straight forward now as it is using the same SPI as the SKR2 board (the board used for STM32 porting). For starters, do not connect the reset pin so as not to trigger an unwanted board reset. If the board resets after too many bad SPI packets then I would look at wiring issues. Try to use as short as practical ribbon cable for the connection between the RPi and the controller board.ok, not working yet, but closer. your patience and help is appreciated as always.
Like you said, SD card, so I read through sdblock, and theres some difference between sdsc and sdhc, so I loaded it and it can mount the file system with the sdhc. so something about my other sd card, it can load the firmware properly but no mount the file system.
So, what I have going now,
it reads the config file, finishes setup, then start, then goes into idle.
when I hit estop , in linuxcnc terminal i get bad spi payload=0 (or 32303a30 depending on what I set my spi1_clk_divsor to) and it goes back into estop.
in remora uart it reloads the setup and goes back into idle, here is the log when i hit estop here is my pinout also
I shifted the pru reset over to the next pin , which is btn_en2 aka PE_8, because the pin I would use, SPI1_DET aka PB_11 looks tied to vcap1 and since idk whats going on there, I just changed it to btn_en2.
Please Log in or Create an account to join the conversation.
Hmm, so how is the CS being handled then. I'll need to look into the API to see if it's rolling back to having the CS always low and software NSS configured.yeah, thats what I was trying to say with the software pin thing, I dont see it listed in the datasheet as an actual spi pin, its an SDIO pin, but not SPI cs, SPI3 cs is either on pin PA_15, or on PA_4 (same as spi1cs), as an alternate pin function
I did compile a version with this change after I read about the interrupt vector table, but I didnt make a difference so I there theres more I would have had to do, or it only works on SPI1
Code:else if (this->interruptPin == PC_9) { // 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(EXTI9_5_IRQn , 5, 0); yes, the joy of new boards I am 0/4 so far lol , I honestly though it would be easier once the framework was in place and it makes me appreciate all the hard work that went into it even more.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.