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.

TMS320F28P650DK: CLB Input Logic Detection

Part Number: TMS320F28P650DK


Tool/software:

Hi,

I have been working on setting up some hardware fault detection using XBAR + CLB. I have the following signals

Input 0 -> goes high = fault

Inputs 1-3 -> goes low = fault

I would like these faults to trigger and ISR so i can force trigger a TZ on my ePWM modules. So far, I have routed these inputs into the CLB tile using XBAR (I can see them toggling in the CLB_DBG_OUT_2 register) and put them into LUT0 with the following logic (i0) | (~i1) | (~i2) | (~i3).

If i manually trigger one of the faults, I cannot see the LUT40_OUT being set but my HLC continously sends an interrupt request using ePIE using the INTR11 instruction (set to be triggered during an event 0). I cannot get this isr to stop triggering. Here is the routine to show that I am clearing and acknowledging the interrupt.

__interrupt void clbTripISR(void)
{
    /* Force EPWM trip zone event to disable gating */
    // EPWM_forceTripZoneEvent(EPWM1_BASE, EPWM_TZ_FORCE_EVENT_DCAEVT1);
    CLB_clearInterruptTag(CLB1_BASE);
    Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);

}
 
I have a couple of questions i would like to clear up before continuing.
 
1. Does the CLB_DBG_OUT_2 register indicate what my tiles see at the boundaries? With the logic I have implemented above, I can see 0xE (1110) at the input but the EVENT is still triggering.
2. How does the HLC trigger an event? Is it an active high or low signal from the output of the LUT? Is this configurable? I haven't been able to find anything in driverlib on the matter.
If you have any further instructions on how to debug the matter, it would be greatly appreciated.
Thank you
  • Hello,

    The HLC trigger events are active-high. You can invert the outputs of the LUTs to reverse the polarity as needed.

    Question: when a fault condition actually occurs, do you want the HLC routine to execute repeatedly? Or just once on the rising/falling edge of the trip condition? If so, it may help to add edge conditioning so that the HLC routines are triggered only on rising and falling edges as needed.

    Thank you,

    Luke

  • Hi Luke,

    Thanks for the information. I would ideally just like a single shot HLC routine to run in order to force a TZ event and set the necessary flags to report back to our main controller. The only issue I forsee with edge conditions is one of the inputs is a 16 channel MUX, and one input would cause a repeated edge condition while cycling through the MUX.

    Do you have any further ideas on how to debug this continuous false trigger? Would you recommend implementing a glitch filter on the GPIO? I can include the initialization code if needed.

    I have been looking into the CLB_OUT_EN register. Can you confirm that only the events enabled at this register are actually able to cause an HLC event (assuming its configured correctly)?

    Thanks again

  • Hi Ayden,

    I would expect you would still get the MUX cycling issue even without edge filtering. Perhaps you can disable the output of the MUX when its input is being changed and use rising edge filtering?

    To achieve the one-shot HLC routine behavior you're describing edge filtering is the only option. Not using edge filtering will result in repeated HLC program triggers.

    Enabling the CLB output override function using the CLB_OUT_EN register has no impact on whether a signal can trigger the HLC. In fact, CLB_OUT_EN is only related to OUTLUTs which are not a selectable input for the HLC triggers if I'm not mistaken.

    Thank you,

    Luke