AnsweredAssumed Answered

Stopping SPI clock in RXONLY mode

Question asked by stokic.srdjan on Feb 5, 2016
Latest reply on Feb 10, 2016 by Aussie Susan
Hello,

I'm using SPI in RXOnly mode with DMA transfers. If I setup DMA to transfer 7 bytes, it does so correctly and it triggers TC interrupt, but the clock never stops and this forces the data to continue to stream from external AD converter. This ofcourse corrupts my next read because some of the bytes have already been transfered, before I enable my next DMA read.

I did notice that the CLK generation stops if I completely disable SPI in my DMA complete interrupt, but since this is not the highest priority interrupt, I might be late, and 1 or 2 SPI clocks may already be clocked out.

Is there something I'm missing, or not configuring properly? How do I setup the DMA to disable SPI clk generation after set amount of bytes is received? I'm using STM32L151 chip.

Outcomes