Hello @PatrickLai
I'm sorry for the late reply. I’m not sure why our internal system didn’t send me a notification when you updated this thread.
Anyway, I have tested your project and checked the issue. The problem is that ADC0_12 corresponds to channel (ADCH) 4, not 12. So please change
#define DEMO_LPADC_USER_CHANNEL 12U
to
#define DEMO_LPADC_USER_CHANNEL 4U.
Also, please configure the sample channel mode to "Single-ended mode, as only the B-side channel is converted" . As shown below.
After these changes, it works correctly.
Hope it helps.
Thank you.
BR
Alice