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.

TMS320F28235: ECAP on GPIO24, failed to init an interrupt

Part Number: TMS320F28235

Hi, 

We faced one issue on F28235 GPIO24 as ECAP. 

GPIO24 is used as ECAP, to detect a falling edge and init an interrupt. Sometimes, the interrupt is not initiated. 

In details:

1) GPIO24 is external pullup by 10K resistor;

2) IGBT driver's fault signal (5V), goes to level IC (74xxxxx) and output 3.3V, it goes through 10 Ohm resistor to GPIO24. 1000pF is placed to GPIO24. 

3) When no error from IGBT driver, the signal on GPIO24 is always high (3.3V); when IGBT driver's error happens, the signal changes from high to low, without return back to high. It means that, there's only one falling edge. 

It happened that, 5% ECAP interrupt can't be initiated. 

What test we did:

1) Connected with the emulator and use emulator to control the code's start/stop, every interrupt can be initiated.

2) Connected with emulator, but CCS is not connected with the device, still, ECAP interrupt can't be initiated in a low rate.

3) Disconnect the 10 Ohm, and place a PWM signal to GPIO24, every interrupt can be initiated. 

4) GPIO24 sample window are changed, without any improvement. 

5) The oscilloscope on GPIO24, is nearly the same on case 1) and 2). The falling edge is quite good.

6) Pin123 is used as an input GPIO. If place an external 3.3K pull-down, 100% the issue happened.

7) Through the CAN port, we see that, when the IGBT driver is OK, GPIO24 is high (GPADAT.bit.GPIO24==1). When driver is not OK, GPIO24 switches to low (GPADAT.bit.GPIO24==0). There's the switch from 1 to 0, when CAP interrupt can't be initiated. 

8) We are quite sure that, there's no bug in the code. It works well. 

What could be the issue?

Thanks a lot.

Br, Jordan

  • Jordan,

    Please confirm if the edge is always captured even if the interrupt does not happen. I suspect that this will be the case.

    My initial thought is that there is another interrupt that is running when the eCAP interrupt flag is set. That interrupt completes and acknowledges both its own flag as well as the eCAP's interrupt flag keeping the eCAP interrupt from ever running. If this is not the case we can investigate other potential issues.

    Could you provide more details on number 6 above? What is Pin123 doing? Do you have any idea on why this would change the behavior?

    Regards,
    Cody 

  • Cody,

    Can we plan a call? This issue is urgent for customer?

    Some doubts:

    1) What's the typical R and C for Ecap pin?

    2) What's the request on the falling edge, which can be captured by ECAP? In my point of view, if GPADAT detects the high signal and then low signal on GPIO24, should it be a real falling edge which can be captured by ECAP?

    3) Inside F28235, is there any "connection" betweaen GPIO24 and GPIO68?

    Pin123 (GPIO68) works as GPIO input. ECAP1 GPIO24 is far away from GPIO68. On is in top layer, while the other is in the bottom layer. We can't see any "connection" between them. 

    Thanks a lot.

    Br, Jordan

  • Jordan,

    1. There is typically no need for a resistor or capacitor on the eCAP's pin. This is only required if the customer is trying to filter noise, even then I would suggest that they use the input qualifier to try and filter the noise. If the edge looks good then you should be OK.
    2. If the GPxDAT register latches the value then we can guarantee that the eCAP will also see the rising/falling edge.
    3. I do not know of any internal connection between GPIO24 and GPIO68.
      1. The fact that changing the state of GPIO68 has an effect on GPIO24 is very strange, but lets not read too much into that yet. It may just be a side effect of a another problem.

    Regards,
    Cody

  • Cody,

    1) We tried with internal input qualifier, but no improvement. Next Mon, I'll try to test without the resistor and capacitor.

    2) Agree with you. If GPADAT regiter latches the value, eCAP should detect the falling edge.

    If any other suggest, feel free to let me know.

    Thanks a lot.

    Br, Jordan