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.

some confusion about cc2541 vref value.

Other Parts Discussed in Thread: CC2541

vref=1.15V  in the cc2541 document. but my actual measurement =1.2V , which is the correct value?

i  give a 3.0V power on cc2541,and use the adc 12bit convertion to measure the vdd/3  . when i use vref=1.2V to calculate the vdd,i get vdd=3V.  

if vref=1.15 ,why my above measurement indicate the vref=1.2V?

thanks

  • Hi,

    Revision C of CC2541 datasheet states that the reference voltage is 1.24 (not 1.15).

    Pay attention you have the up to date revision of the datasheet :)

  • Igor is right. There was a typo in the old datasheet, the correct value is 1.24 V.

    /F

  • Hi,

    VDD/3 seems to be referenced against approximately ~1.20V, looking at test data. Analog input pins are measured against ~1.24V.

    #define INFOPAGE_WORD9 0x7826 // VDD/3
    adcCalVdd3 =  *((uint8 *)INFOPAGE_WORD9 + 0) << 6 | *((uint8 *)INFOPAGE_WORD9 + 1) >> 2; // ADC registers stored on 3V for VDD/3 vs Intref.

    You can access the value stored during production test for measurement of 3.0V on VDD using the code above. Shift right to get 12 valid bits, or however many you need for comparison in your application. Note that this is for internal use, and is not guaranteed to be valid over different production runs, but could be useful for development.

    Best regards,
    Aslak 

  • Hi,

    Aslak N. said:

    You can access the value stored during production test for measurement of 3.0V on VDD using the code above. Shift right to get 12 valid bits, or however many you need for comparison in your application. Note that this is for internal use, and is not guaranteed to be valid over different production runs, but could be useful for development.

    is the above still valid (late 2014)?

    I'm working on very low cost mass produced devices, so factory calibration with known voltage isn't an option. I'd like to use this 3.0V calibration offset stored on the chip.

    If this method still works, how many bits do I need to shift it? I shifted it right 6 bits to get what I think should be the 10-bit ADC reading for 3.0V. I get a value of 104, which doesn't make sense to me, as the internal reference would then become almost 5 V.

    Here's my code:

    const uint8* lo = (uint8*)0x7826;
    const uint8* hi = (uint8*)0x7827;
    uint16 adcCalVdd3 = (*lo << 6) | (*hi >> 2);
    
    printf("3V adc=%d", adcCalVdd3 >> 6);

    If I shift only 5 bits, I get a reasonable value using which I calculate the Vref to be 1.20 V. 

  • Hi Prashant,

    The shifting depends on how many bits resolution you have on your reading, or on your algorithmic 'this is 3V' reference

    If you find that the VDD/3 reference is 1.20, then you are right. This is approximately how the reference looks for this input source - whereas 1v24 for AINx. Actually it's Vref*k = 1.20, where k comes from the voltage division, but from the application point of view the effect is the same.

    Best regards,
    Aslak

  • Thank you for the response. I have to make a correction, I shifted 4 bits to get a 10-bit ADC reading for the 3.0V calibration value. On my dev chip I measure ~1.991 V. Using this I was able to measure voltages to an accuracy of ±0.02V after accounting for Vdd-dependent coefficients (but not temperature).

    Unfortunately, in the end the variation among chips even after calibration was too much when we tried it during production testing; I do not know why. In the end we decided not to use this method for what we were initially planning - quick battery quality check during production.

  • Hi Prashant,

    I'm sorry to hear that.

    Note that the battery voltage, if it's a lithium/coin-cell type, will vary quite a lot with the current draw. So if the conditions are not exactly the same (meaning what activity has preceded the measurement and the relative timing) during measurements, the input voltage may be different.

    I guess you may be aware of this, but I thought I should mention it.

    BR,
    Aslak