cancel
Showing results for 
Search instead for 
Did you mean: 

Two ADC channel read while 7 channel are configured

Le Phuong
Associate II

0690X00000A9r6ZQAR.pngHI,

Im using stm32l4r5. i configured 7 channels of ADC1.And configured in regular conversion mode (7 ranks). Scan mode enable and continous disable. but when i debbug only two chanel transfer data to array and other element of array = 0 . any one help me resolve this problem 

3 REPLIES 3
Ozone
Lead

> Im using stm32l4r5. i configured 7 channels of ADC1.And configured in regular conversion mode (7 ranks).

I suppose the problem is in the initialization code you did not present here.

When extending the number of ADC channels from 2 to 7, you need to update the accompanying DMA transfer size, too.

I don't do Cube, by the way.

i chose word size for dma and uint32_t for variable

i fixed this problem when i reduce sample rate of adc. i dont know why and relate between dma clock and adc sample rate

Without the accompanying init code, it is difficult to understand what you mean.

DMA is a quite "dumb" mechanism that transfers a number of memory objects from A to B, fired up with the configured trigger event (I assume EOS in this case), and giving a "done" interrupt (TC) when finished. This is at least the way I use it.