cancel
Showing results for 
Search instead for 
Did you mean: 

ADC1 behaving strangely on a STM32L496AGI6.

kvresto
Senior

Hi forum.

I have a question regarding the STM32L496G-discovery board. I want ADC1 to sample PC4 located on the on board Arduino connector, take 10 samples for this example and have the DMA xfer these to memory.

I have a CubeIde project set up and have set up all the ADC and DMA components to work. This same project works as expected when I use the NUCLEO-L496ZG which is fitted with the STM32L496ZGT6U, but when I run the same code on the STM32L496G-discovery board which is fitted with a STM32L496AGI6, I find the output from the ADC sits about mid point.

Then when I take the analog pin PC4 to ground or 3V, nothing happens.

I have looked into the ref manual, and in fact this was the same data I used when setting this example up for the NUCLEO-L496ZG, but I cannot find anything that may be specific to the STM32L496AGI6.

Has anyone had the same experience. Is there something strange about the

STM32L496G-discovery board, or is the problem with my understanding. I have posted my setup code, I hope that helps clear up what I talking about.

By the way the only ADC sampling I can see in the STM32L496G-discovery boards schematic is for the IDD measure which feeds in to on board MFX_V3, a STM32L152CCT6, so there seems to be no other ADC use.

Thanks.

5 REPLIES 5

Isn't the given pin connected to any other onboard peripheral on the Disco board?

Can't the difference be in how VREF pins are connected?

JW

kvresto
Senior

right on JW. I made an assumption based on other ST boards I have used, and didn't go back and double check.

Thanks

Thanks for coming back with the information.

Can you please be more specific what did you do, for others who come across this thread? I don't use the 'L496 Disco.

Thanks,

JW

kvresto
Senior

JW, R18 that feeds into VREFP pin of the L496 is not populated. This is actually documented, but I didn't even think at the time to check. I assumed VREF was connected to something, as are most if not all other demo boards, at least the ones I have used, so your reference to VREF although a bit confusing led me to go back and double check.

Thanks.

EDIT: Also the other problem was my experience here.

Thanks for coming back with the information. This indeed may be confusing if you don't look very carefully... :)

JW