2014-12-09 10:30 PM
I am using DMA2 for ADC3 Channel 13,Continuous conversion.
#define ADC3_Buffer_Storage_Address ((u32)0x40013C4C)
DMA_Struct_Object.DMA_PeripheralBaseAddr=(u32)ADC3_Buffer_Storage_Address;//ADC3 Address Location
DMA_Struct_Object.DMA_MemoryBaseAddr=(u32)ADC3_Count_From_DMA; //ADC3 Buffer Base address
DMA_Struct_Object.DMA_DIR=DMA_DIR_PeripheralSRC; //Peripheral is the source PTM (Peripheral to memory)
DMA_Struct_Object.DMA_BufferSize=1500;
DMA_Struct_Object.DMA_PeripheralInc=DMA_PeripheralInc_Enable;
DMA_Struct_Object.DMA_MemoryInc=DMA_MemoryInc_Enable;
DMA_Struct_Object.DMA_PeripheralDataSize=DMA_PeripheralDataSize_HalfWord; //2 bytes
DMA_Struct_Object.DMA_MemoryDataSize=DMA_MemoryDataSize_HalfWord;
DMA_Struct_Object.DMA_Mode=DMA_Mode_Circular; //Circular buffer
DMA_Struct_Object.DMA_Priority=DMA_Priority_VeryHigh; //Very high prirority
DMA_Struct_Object.DMA_M2M=DMA_M2M_Disable; //Not memory to memory
DMA_Init(DMA2_Channel5, &DMA_Struct_Object);
when i have enable Transfer completed interrupt mask & ADC3 DMA. an interrupt is not triggering.but when i change DMA_Peripheral address it was working fine.
#define ADC1_Buffer_Storage_Address ((u32)0x4001244C)
DMA_Struct_Object.DMA_PeripheralBaseAddr=(u32)ADC1_Buffer_Storage_Address; //ADC1 Address Location
Here the problem is that when i assign ADC1 peripheral address it is working.but with ADC3 peripheral address interrupt is not triggering.
2014-12-10 05:00 AM
Going to guess this is a STM32F1xx device.
You could try using the address in the form (u32)&ADC3->DR less chance of that being wrong. Clocks on DMA2? May be you can show some more complete code/context.