I'm exploring DMA on a Nucleo board and seeing unexpected behavior.
As I step through code I can see that various writes have no effect, i.e.:
After each statement the target registers are all 0 !!
All other registers that I write to, do modify the registers - like RCC, GPIOA (MODER) etc - all of these get changed as expected as I step through the code.
This seems like something very fundamental - but what?
As I step through code I can see that various writes have no effect, i.e.:
Code:
DMA2->HIFCR = 0x00000F40;
DMA2_Stream5->PAR = (uint32_t)&(DAC->DHR12R1);
DMA2_Stream5->M0AR = (uint32_t)&(SINEWAVE);
DMA2_Stream5->NDTR = 4096;
DMA2_Stream5->CR = 0x0E000000; // Channel 7
DMA2_Stream5->CR |= 0x00005440;
DMA2_Stream5->CR |= 0x00000016;
DMA2_Stream5->FCR = 0;
All other registers that I write to, do modify the registers - like RCC, GPIOA (MODER) etc - all of these get changed as expected as I step through the code.
This seems like something very fundamental - but what?