2020-10-05 12:44 AM
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.
Solved! Go to Solution.
2021-02-22 08:31 PM
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.
2020-10-05 06:10 AM
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.
2021-02-22 08:31 PM
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.