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.

TMS320F280039C: Is it possible to use ADC PPB zero-crossing for positive range Values

Part Number: TMS320F280039C

Hello there,
I'm trying to configure ADC PPB limits by setting TRIPHI as 3V and TRIPLOW as 1V, where the VREF is 3.3V, I tried setting Zero crossing at 2V, where OFFREF = (2000/3300) * 4096 = 2482 LSBs by this calculation the ADCEVTSTAT registers PPB1ZERO is set High(1) but even after clearing register by(ADC_clearPPBEventStatus(MCAL_ADCA_BASE, ADC_PPB_NUMBER1, ADC_EVT_ZERO);) the register is not getting cleared. Please Clarify the concept.

  • Hello Tejas,

    If the ADCEVTSTAT bit is not getting cleared when you write to ADCEVTCLR, there are two possible reasons:

    1. The write operation happened on the same cycle that the hardware was trying to set it (for a new event). The hardware gets the priority.
    2. The bit actually gets cleared, but a new ADC conversion caused it to get set again before you could read it.

    If you are running this from within ISR code (and your PWM trigger period is long enough to accommodate the ISR processing), then there shouldn't be a problem. More likely is that you're trying to read this from the debugger, and the background operation of the PWM/ADC is preventing you from being able to observe the register being cleared.

    Best regards,
    Ibukun