2016-02-05 08:50 AM
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. #stm32 #dma #spi #stm32l1512016-02-09 03:37 AM
Somebody, any hint on this?
2016-02-09 03:43 AM
> Somebody, any hint on this?
Don't use the RXONLY mode? JW2016-02-09 06:31 PM
I'm still very much a beginner on these chips but I've seen similar things on other devices.
Make sure that the DMA is transferring the current number of ''values'' be they 8 or 16 bits. It can be quite easy to set up the DMA to transfer ''x'' 16-bit values while the SPI is in 8-bit mode.Susan