AnsweredAssumed Answered

DMA counter resetting by itself

Question asked by za kia on Mar 19, 2018
Latest reply on Mar 28, 2018 by za kia

Hello,

 

Could someone tell me what I am doing wrong here?

 

I would like to transmit on SPI (as slave) using DMA, and so have tied SPI transmit to a DMA channel, and set up an ISR to capture "transmit completed" interrupt from the DMA. But this interrupt gets called even though there are no SPI clocks present.

To test this I set up my DMA pointers and then set the counter to 2. Now, as soon as I enable the DMA, the count goes to zero.

Shouldn't the counter decrement after a byte gets transmitted? And isn't it that a byte gets transmitted on SPI only when a clock byte has been received from the master? I am scoping the clock line and I see no clocks, obviously since the host has been stopped.

 

Why is this counter getting reset?

 

This is on an STM32F072VBT6.

 

Thanks very much.

Attachments

Outcomes