adc_readSampleRaw gets negative value

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

In SDK2.1.1, I tested adc function in BCM920736.

When 0.2xxV is applied, adc_readSampleRaw outputs negative value.

I understood that too high voltage over Vadc can make the output negative, but can the too low voltage affect like this?

I just set like following.

adc_SetInputRange(ADC_RANGE_0_3P6V);

adc_adcCalibrate(3300,(ADC_INPUT_CHANNEL_SEL)Mon_cfg.adcInputConnectedToBattery);

measurement = adc_readSampleRaw((ADC_INPUT_CHANNEL_SEL)Mon_cfg.adcInputConnectedToBattery);

Thank you.

0 Likes
1 Solution
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

This might be a useful insight into ADC: Re: BCM20732S ADC Configuration

View solution in original post

0 Likes
2 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

This might be a useful insight into ADC: Re: BCM20732S ADC Configuration

0 Likes
ShawnA_01
Employee
Employee
10 questions asked 5 comments on KBA First comment on KBA

eyan

I see in your code sample you use:   adc_adcCalibrate(3300,(ADC_INPUT_CHANNEL_SEL...

However, the API for adc_adcCalibrate() wants the first parameter (a UINT32) in micro-volts. You show 3300 as if the units were in milli-volts instead...   Could this be your problem?  What happens if you use 3300000?

0 Likes