2009-01-28 07:13 PM
STM32F101x4 DMA PeripheralBaseAddr
2011-05-17 04:01 AM
Hello, Please I would like to know what is the DMA base address to be used with STM32F101x4:
DMA_InitStructure.DMA_PeripheralBaseAddr = (u32)ADC1_BASE;//ADC1_DR_Address;//0x40012444C; When I used 0x40012444C, DMA2 was addressed and not DMA1. With ADC1_BASE DMA1 is addressed but I'm not getting the ADC result from the array. I know that ADC is being done. Once ok, I will place all my code on this forum. Thanks Johann (STM32F101x4)2011-05-17 04:01 AM
Hello again. DMA_InitStructure.DMA_PeripheralBaseAddr = (u32)ADC1_DR_Address
(u32)ADC1_DR_Address should be set as follows. Take the base address of ADC1, i.e. (u32)ADC1_BASE. Then need to add an offset of 19 32-bit registers, i.e. 19 * 4 bytes = 76d= 0x4C. 19 because there are 19 registers associated with ADC1 and the result is the last one. By definition, ADC1_BASE = (APB2PERIPH_BASE + 0x2400); APB2PERIPH_BASE = (PERIPH_BASE + 0x10000); PERIPH_BASE = ((u32)0x40000000). Adding these numbers together, the base address should be 4001244C. This is where the number is obtained. It is used in examples but not clear from where it is obtained.