cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L152RC CubeMX multi-channel ADC with interrupt problem

Posted on October 17, 2017 at 07:54

Hello Geeks

I'm new bie with at STM, I need to read at-least 3 adc channel of STM32L152RC having interrupt

I've used Cubemx and generate the code having property of

scan->Enable

No of Conversion->3

Global interrupt ->Enable

Rank from 1-3->48 cycle Sampling rate

Now the problem is when i compile and load the code on MCU then it's working and shows 4095 Samples for 3.3V attached at IN0 but this result is same for all first 3 channel! it means all remaining 2 configured channel shows 4095 samples even they are floating!

here is the debug logs

ADC_raw[0]--->4095 ADC_raw[1]--->4095 ADC_raw[2]--->4095

-----------------------------------------------

ADC_raw[0]--->4095 ADC_raw[1]--->4095 ADC_raw[2]--->4095

-----------------------------------------------

ADC_raw[0]--->4095 ADC_raw[1]--->4095 ADC_raw[2]--->4095

-----------------------------------------------

ADC_raw[0]--->4095 ADC_raw[1]--->4095 ADC_raw[2]--->4095

-----------------------------------------------

ADC_raw[0]--->4095 ADC_raw[1]--->4095 ADC_raw[2]--->4095

In short I'm not Sensing individual channel and result remain same for all 3 configured channel!

here I'm attaching CubeMX project with Keil MDK5

any one help me here?

All Suggestions welcomes 

Thanks

1 REPLY 1
Posted on October 25, 2017 at 06:25

Hello there..

I'm eagerly waiting for the replay

Can any one help me?

Thanks