cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030 problem reading two ADC channels with DMA

Mohamed eleuche
Associate II

Hello, I am getting really frustrated with this issue for almost a week.

I am trying to read PA1 and PA4 in DMA but I get only the reading of one channel and not the other one! I tried everything and I also looked at all the example online. Please help.

 

1 REPLY 1
TDK
Super User

I get only the reading of one channel and not the other one!

Why do you think that is the case? What readings do you get and what do you expect instead? Be specific.

> uint32_t adcValues[100]

> hdma_adc.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;

This should be an array of uint16_t, not uint32_t.

If you feel a post has answered your question, please click "Accept as Solution".