This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541 Keyfob ADC Configuration Issues

Other Parts Discussed in Thread: CC2541, BLE-STACK

I am trying to apply voltage (maximum of 3V) to keyfob CC2541 ADC. I am applying the positive voltage to test pin1 which corresponds to P0-6. The ADC value read does not seem to be changing with respect to the applied voltage.



#define HAL_ADC TRUE uint16 Voltage =0x00; //initialize global variable

I have the following pin configuration:

P0SEL = 0;
P0DIR = 0xBC;
P0 = 0x43;

and using the following to read the ADC

HalAdcSetReference( HAL_ADC_REF_125V );

Voltage  = HalAdcRead (HAL_ADC_CHN_AIN6, HAL_ADC_RESOLUTION_10);


I’m using BLE Stack version 1.4 with the keyfob reference IAR project.

Do you have any idea what I’m doing wrong? Any feedback would be helpful.