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.

TMS320F280049C: Removing an offset using the PBB

Part Number: TMS320F280049C


Dear TI hello,

I use this code to remove an offset, 

void
vDrvadc_SetupPPBOffset(int16 aOffset, int16 bOffset, int16 cOffset)
{

    /*
     * PPB1 is associated with SOC1
     * PPB1 will subtract OFFCAL value
     * to associated SOC
     * */
    ADC_setupPPB(ADCA_BASE, ADC_PPB_NUMBER1, ADC_SOC_NUMBER0);
    ADC_setPPBCalibrationOffset(ADCA_BASE,ADC_PPB_NUMBER1 , aOffset);

    /*PPB1 is associated with SOC1
     *PPB1 will subtract OFFCAL value
     *to associated SOC
     * */
    ADC_setupPPB(ADCB_BASE, ADC_PPB_NUMBER1, ADC_SOC_NUMBER0);
    ADC_setPPBCalibrationOffset(ADCB_BASE,ADC_PPB_NUMBER1 , bOffset);

    /*PPB1 is associated with SOC1
     *PPB1 will subtract OFFCAL value
     *to associated SOC
     * */
    ADC_setupPPB(ADCC_BASE, ADC_PPB_NUMBER1, ADC_SOC_NUMBER0);
    ADC_setPPBCalibrationOffset(ADCC_BASE,ADC_PPB_NUMBER1 , cOffset);

}

I am using the PBB to remove an offset of 48, my issue is it looks like the PBB is not activated and the offset still existing?

Thank you in advance,

S.Tarik

 

  • Hi S.Tarik,

    By default all the PPB blocks point to SOC0. There are chances that, as per priority, the higher order PPB's (i.e PPB2, PPB3, PPB4) offset will be considered over PPB1. Can you check by changing the SOC0 to SOC1?

    Thanks,

    Aditya

  • Thank you Aditya,

    This resolved my issue but I didn't understand your explanation, could please clarify.

    Thank you;

  • Hi S. Tarik,

    The 4 PPB blocks by default are linked to work on SOC0 with priority of PPB4 offset being highest and PPB1 being lowest. So, while using PPB1 with SOC0, the offset of PPB1 may be overwritten with any of the higher order PPB offset, which is not desired. That is why it is better to avoid using SOC0 to avoid unintentional overwriting.

    You may find some literature on this in the PPB section of the Technical Reference Manual for the device as well.

    Hope this helps.

    Thanks,

    Aditya