cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5 SPI Continuous Communication

UL
Associate III

Hello,

 

I have been working with the STM32U5 MCU and to start I worked through the workshop found here:STM32U5 Workshop (rristm.github.io)

 

As part of the workshop the USART1 is setup in continuous communication mode. Is it possible to setup SPI in a similar way for continuous communication?

 

Thanks,

UL

1 ACCEPTED SOLUTION

Accepted Solutions
UL
Associate III

Incase anyone else is looking to do something similar. I do not think that it is possible to do continuous transmission in the same way that USART can be implemented. However, you are able to run the SPI in an autonomous mode with a GPDMA trigger that shows a similar result. The code that I have attached uses the internal timer15 inorder to trigger a DMA which will send a spi transmission. I do have 2 nodes 1 with an ADC read and one with the actual spi message. the ADC read is not relevant to me but the trigger wasn't working properly with only 1 node making the ADC read an easy and more importantly fast alternative to get the trigger working. I am still working on an implementation that will allow for only one Node in the LL. 

 

This example will allow for SPI communication at 200kHz with a SPI baud rate of only 10MHz. The SPI baud rate can be easily increased depending on the application, but my tools only allow me to easily measure up to 10MHz.

View solution in original post

1 REPLY 1
UL
Associate III

Incase anyone else is looking to do something similar. I do not think that it is possible to do continuous transmission in the same way that USART can be implemented. However, you are able to run the SPI in an autonomous mode with a GPDMA trigger that shows a similar result. The code that I have attached uses the internal timer15 inorder to trigger a DMA which will send a spi transmission. I do have 2 nodes 1 with an ADC read and one with the actual spi message. the ADC read is not relevant to me but the trigger wasn't working properly with only 1 node making the ADC read an easy and more importantly fast alternative to get the trigger working. I am still working on an implementation that will allow for only one Node in the LL. 

 

This example will allow for SPI communication at 200kHz with a SPI baud rate of only 10MHz. The SPI baud rate can be easily increased depending on the application, but my tools only allow me to easily measure up to 10MHz.