2017-10-09 11:26 AM
Hello.
In my project, I use the ADC configured in scan mode, as seen on this screenshot from STM32CubeMX:
and the DMA configured as follows:
The problem is that I can't get any data transferred from ADC to memory, when I call
volatile uint32_t ADC1ConvertedValues[2];
HAL_ADC_Start_DMA(&hadc1, (uint32_t*)ADC1ConvertedValues, 2);
When I open the peripheral view on Keil uVision I can see that the ADC is working properly and the conversions are happening.
Can you tell me where's the problem?
#stm32f344 #adc #dma-adc2017-10-10 12:41 PM
Bump
2017-10-10 03:33 PM
Wouldn't the samples be uint16_t ? (HALF WORD)
Is the DMA peripheral indicating an error?
2017-10-26 05:28 AM
Hi Richard,
In the case of STM32F3, you can find some examples in STM32F3 FW package (can be downloaded here:
http://www.st.com/en/embedded-software/stm32cubef3.html)
.You can find an example corresponding to your deviceSTM32F334 here:
Using driver LL:...\Projects\STM32F334R8-Nucleo\Examples_LL\ADC\ADC_SingleConversion_TriggerSW_DMAAnd another example corresponding to device
STM32F303 here:
Using driver HAL:
...\Projects\STM32F303RE-Nucleo\Examples\ADC\ADC_Sequencer
Note: In CubeMx, you can select LL driver driver under:
Project Settings -> Advanced Settings -> Driver
Then, if you compare the examples versus your generated code, can you see what is the difference ?