2017-05-18 02:17 PM
I am working with the STM32F405 microcontroller and I have a an SPI-bus across a detachable cable (please no comments about this, it works fine and it's not the point of this post) and I'm using the DMA-controller to be able to handle large bursts of data. Problem arises when the user unplugs the cable in middle of a transaction and then plugs it back in again. Since the DMA transfer was stopped halfways when the cable was unplugged, the internal pointers in the DMA-controller will be in the wrong position when cable is plugged in again and a good, complete packet is received. I found a good link on the internet,
https://blog.frankvh.com/2011/08/18/stm32f2xx-dma-controllers/
and using the terminology from that webpage my questions is, how can I reset the 'internal shadow M0AR-register' so that it points to the beginning of the buffer again?#stm32f4-dma2017-05-18 02:27 PM
Write the desired starting address into it.
JW
2017-05-18 04:29 PM
You mean I should write to M0AR, that is, the non-internal non-shadow register and this will reset the internal shadow
M0AR register
?2017-05-18 05:01 PM
Yes, write to the 'visible' address register writes to both to it and to the 'invisible' one.
This is described in the RM, but they use the word 'update' which may be confusing.
JW