2020-05-07 01:10 PM
Hi All,
I'm using a STM32F302R8 and want to transfer timer 2 capture/compare values to memory using DMA. What source address do I use for the TIM2 OC register? I'm calling HAL_DMA_Start() to do this and need the source address of TIM2->OR.
Thanks,
2020-05-07 01:23 PM
?
JW
2020-05-07 02:15 PM
&TIM2->CCR3
2020-05-08 07:10 AM
I saw the 'address offset' in the ref manual but didn't know what it meant or what it referred to. Now I realize there is a table of boundary addresses for the peripherals. -- Thanks
2020-05-08 07:22 AM
As Clive said below - albeit not exactly in these words - you don't need to be bothered about the particular addresses, as long as you use the CMSIS-mandated device headers, you just simply take the address of the register written in the headers' symbols.
JW
2020-05-08 07:25 AM
I tried this: HAL_DMA_Start(&hdma_tim2_ch1, (uint32_t) &TIM2->CCR1, (uint32_t) buffer1, 01);
and at least it compiled without error ;) --thanks