AnsweredAssumed Answered

STM32F030x DMA offset by 1 half-word (2 bytes)

Question asked by chris.chris.001 on Oct 9, 2015
Latest reply on Oct 9, 2015 by chris.chris.001
Hello,

I find that DMA works correctly, but that an internal hardware counter (register) [IMHO] starts the DMA off by one word.  Link to example is below.  (i.e. first sample is placed into array[1], last sample is placed into array[0].

Within the datasheet, the obvious culprets would seem to be:
1. DMA_CNDTRx,
2. DMA_CMARx
or,
3. Failure to clear out the DMA_InitStructure. 

For 1 and 2, I tried adjusting to 0, and buffer-size and buffer-size-1, Buffer-size+1, etc.
For 3, I memset the struct to zero.

I suspect that (in the case of the sample code below) the HW is not quite set-up correctly.  Even after reset.

I found some discussion of a M0AR register, which I can find no documentation for.

Is there a way to access the internal registers so that I could force an allignment?  Or, is there a-non-obvious bug I missed?

Advise, please.
 
-Chris




I refer to this link:
https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3a%2f%2fmy.st.com%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fSTM32F0%20ADC-DMA%20touble&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=1750

Outcomes