cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L433CCU6 ADC problem (China PCBA)

CBuek.1
Associate II

Hi everyone, my project using STM32L433ccu6 MCU (PCBA from china). ADC value read out freeze 2048 (0x0800) , but in my prototype with component from Digikey or Arrow everything ok. And I try to replace MCU I bought from Digikey to PCBA board , It's work !!!!

Who has the same problem?

Thanks,

Chatchai B.

1 ACCEPTED SOLUTION

Accepted Solutions
CBuek.1
Associate II

Hi, I have solved.

Solved by add HAL_ADC_Stop(&hadc1);

But I'm still confused why some parts can work perfectly some parts not work.

HAL_ADC_Start(&hadc1);

if (HAL_ADC_PollForConversion(&hadc1, 1000) == HAL_OK) {

result_adc = (uint16_t) HAL_ADC_GetValue(&hadc1);

HAL_ADC_Stop(&hadc1); // add line for ADC stop

Thanks.

View solution in original post

2 REPLIES 2
TDK
Guru

Well, if you replace the MCU and run the same code and it gets fixed, the MCU was probably bad. ADC can be damaged by inputs outside the allowable range. Although 2048 is an odd value for it to report. Could be some other hardware issue.

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

Hi, I have solved.

Solved by add HAL_ADC_Stop(&hadc1);

But I'm still confused why some parts can work perfectly some parts not work.

HAL_ADC_Start(&hadc1);

if (HAL_ADC_PollForConversion(&hadc1, 1000) == HAL_OK) {

result_adc = (uint16_t) HAL_ADC_GetValue(&hadc1);

HAL_ADC_Stop(&hadc1); // add line for ADC stop

Thanks.