2019-09-02 09:20 AM
I'm in the early stages of a project involving SPI.
I need to send data to an stm32f303, from an rPi.
I also need to detect, from the rPi, a GPIO based interrupt to then go read from the stm32.
rPi is master, stm32 is slave.
Can anyone recommend a helpful starting point for getting these things talking?
I'd like to continue learning in C, although python on the rPi is also a possibility.
2019-09-02 10:27 AM
Use SPI 4 wires (MISO, MOSI, SCK, NSS).
On STM32, enable EXTI interrupt on both edges of NSS
I assume the SPI has only 1 master and 1 slave.
Then program the SPI DMA to cyclically run over a RAM buffer (say 2 kbyte).
When NSS is going high, analyse the incoming payload and then reinit the DMA to the beginning of the buffer.
This will get you started.