DMA counter resetting by itself
- March 19, 2018
- 2 replies
- 833 views
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.
