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.

TMS320F28379D: ECAP Interrupt configuration

Part Number: TMS320F28379D


Hi,

I am using ECAP1-ECAP2-ECAP3 to calculate the the pulse period. All the three ECAP's are configured with interrupt on both edges.
The reference manual says that these ECAP's belongs to a INT4.y group in 2.4.5 PIE Channel Mapping that the ECAP1 has high priority.

Question:
1. Is it possible to configure the interrupt priority by the user, So that ECAP1 can have low priority than ECAP2 and ECAP3.? 
I don't prefer any nested interrupts.

  • HI,

    This seems to be a query on generic interrupt configuration in PIE. I am forwarding this thread to PIE expert

    Thanks an Regards,
    Veena
  • Hi Manohar,

    If i understand you correctly, what you are describing can be achieved by nesting interrupts so not sure what you mean by "I don't prefer any nested interrupts".

    By default, if ECAP1, ECAP2 and ECAP3 interrupts come in simultaneously, ECAP1's interrupt will be serviced first. You have no control over this. However, what you can do is follow the nesting interrupts approach and within ECAP1's ISR, re-enable interrupts. This will cause ECAP2 and ECAP3's interrupts to be serviced. After those are complete, code will return to ECAP1's ISR.

    I think a simpler approach is probably just swapping the signals. What i mean is, you currently have 3 signals on ECAP1-3 but want the signal on ECAP1 to have the lowest priority. Why don't you just swap the signal on ECAP1 with ECAP3?
  • Hi Frank,

    Thank you for the details.

    1. By default, if ECAP1, ECAP2 and ECAP3 interrupts come in simultaneously, ECAP1's interrupt will be serviced first. You have no control over this.

    This is what I need to know, whether we can control the servicing of ECAP's ISR if triggers at a time.
    So as you mentioned, there is no control to service particular ISR when all ECAP's trigger.

    2. However, what you can do is follow the nesting interrupts approach and within ECAP1's ISR, re-enable interrupts. This will cause ECAP2 and ECAP3's interrupts to be serviced. After those are complete, code will return to ECAP1's ISR.

    This is the way I mentioned as nesting interrupt, but I don't want to perform this.


    3.I think a simpler approach is probably just swapping the signals. What i mean is, you currently have 3 signals on ECAP1-3 but want the signal on ECAP1 to have the lowest priority. Why don't you just swap the signal on ECAP1 with ECAP3?

    I will try to implement to switch the ECAP's


    Thanks for your valuable comments.



    Regards,
    Manohar
  • Manohar,

    Glad we were able to answer your question. Let us know if you ran into anymore issues.