Skip to content

ADC data abnormal in some channel for LPC55s69 #68088

Answered by MarsMSWu
MarsMSWu asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @DerekSnell ,

It 's very thanks for your feedback.
I think maybe is wrong data type then also get a incorrect result.

We use a integer type to get the data and put to unsigned integer type and conversion to mV.
I don't know why buf data is negative...then if assign to unsigned integer type will get a huge and incorrect result.

If we use unsigned integer data type for buf then can get correcr result.

Because that channel is using external pull-hi 3.3V so print the value in console is 65xxx, it meet our expected in early study.
The value 65xxx show on console should be mV data type which conversion by API function "adc_raw_to_millivolts_dt".

Thanks.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MarsMSWu
Comment options

Answer selected by DerekSnell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants