AnsweredAssumed Answered

Change SPI baud rate on the fly: issue with DMA

Question asked by Guillaume FERLIN on Oct 9, 2017
Latest reply on Oct 9, 2017 by Guillaume FERLIN

Hi,

 

I am using SPI1 peripheral as master at 16 MHz on STM32L443, I can send and receive data correctly using DMA.

My application requires to speed down SPI to 1MHz during a moment so I changed SPI baud rate on the fly (by writing SPI_CR1 register). Using SPI polling API this is working fine but using DMA I noticed that SPI speed is still 16MHz.

I tried to:

- DeInit()/Init() DMA configuration

- Relink DMA to SPI

- DeInit()/Init() SPI with new baud rate

 

but result is the same.

For some reason it looks like first SPI configuration is permanent for DMA.

Did I miss something to reconfigure?

 

Thanks,

Outcomes