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.

TMS320F28377S: ADCPPBxCONFIG CBCEN Bit Not Included in C2000Ware/Controlsuite Header Files

Part Number: TMS320F28377S


Hi all,

I am working on FW development for an interleaved converter and as part of the converter design I am using inductor current measurements, and digitizing them with the on chip ADC in the uC.  I had setup my code to use the post processing block to set a lower and upper threshold to allow me to shut off the EPWM modules if excessive current was being drawn.  That works just fine, but I wanted to make the fault condition able to be cleared without having to cycle power the microcontroller.  I created a macro that allowed me to send the TZCLR bits to the DCAEVT1/DCBEVT1 flags I was using.  I can see that code being executed but the faults persist.  I looked at my ADC configuration and I noticed in the technical reference manual for the part, there is mention of the CBCEN bit to allow the post processing block to self clear the ADCEVTSTAT bit.  I would prefer to not have to manually clear that bit in addition to clearing the TZFLG bits. I'm using 8 EPWM modules, and it's a lot of extra overhead.  I went to look at enabling the CBCEN functionality, but I noticed that in the header files provided for reference this particular register is omitted.  Is this intentional, or an oversight?  If I modify the header files to allow use of the CBCEN bit for the associated ADC, will it work?  I'm just trying to figure out what my options are. 

Best regards,

Lance

  • Hi Lance,

    Unfortunately this device does not have this feature. This was added going from the slightly older F2837x device family to the newer F28004x family.

    When we updated the documentation, this bit made its way in due to issues with (incorrect) single-source data for documents for both families. The PPB block diagram ("ADC PPB Block Diagram") was also incorrect, but has since been fixed. I'll submit a ticket to fix the register definition.

    On this device, the PPB will actually produce a pulse output, not a latched output, so clearing the fault in the ePWM should be all that is necessary (event though the ADCEVTSTAT register will read that a trip has occured).

    As for the TZCLR write not working, is it possible that your code doesn't have EALLOW set, so write protection is preventing the write from having an effect? You can try adding an EALLOW to the macro, or you can try poking the bits directly in the expressions window.
  • Hi Devin,

    Thanks for the quick response. I had already been using EALLOW before setting the TZCLR registers. I was using TZCLR.all = 0x0028 to clear both the DCAEVT1 and DCBEVT1 registers simultaneously. I don't know if that was causing the issue or not. In order to get things to work reliably I had to first send the ADCEVTCLR PPBxTRIPHI and PPBxTRIPLO bits, followed by the TZCLR bits. It works fine like that, I was just hoping that the PPB would be self clearing. I checked to see if it was, and the TZCLR bits alone weren't letting the fault condition clear. I'm running my loop at a 1MHz rate, so adding in all those extra commands isn't ideal, but it works.

    Lance