cancel
Showing results for 
Search instead for 
Did you mean: 

ADC giving value of 4095 on all configured channel

shafin388
Visitor

Hello Community,

I am working on a custom board using the STM32 MCU (STM32WLE5JCI6). I am configuring the ADC with two channels:

  • PB1 → ADC_IN5
  • PB3 → ADC_IN2

I performed the following test cases and observed unexpected ADC behavior.

Test Case 1

  • Applied VDD+ to Channel 2 (ADC_IN2)
  • Channel 5 (ADC_IN5) connected to GND

Observation:
Both ADC channels are reading 4095, even though Channel 5 is tied to GND.

Test Case 2

  • Applied VDD+ to Channel 5 (ADC_IN5)

Observation:
Instead of getting 4095 on Channel 5, both channels are reading approximately 1500.

I am also facing the same issue with another MCU: STM32L071KBT6TR.

Development tools being used:

  • STM32CubeIDE Version 2.1.0
  • STM32CubeMX Version 6.8.0

I have attached the main source file containing the ADC configuration for reference.

Could anyone please help identify what might be causing this issue?

Awaiting your valuable suggestions.

Thanks.

1 REPLY 1
Andrew Neil
Super User

Welcome to the forum.

 


@shafin388 wrote:

I am working on a custom board


In that case, you need to post the schematic - see:

How to write your question to maximize your chances to find a solution

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.