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.

RM46 FIQ does not Interrupt IRQ

Other Parts Discussed in Thread: HALCOGEN

Hi there,


I am using RM46 to develop a BLCD motor application. I have the hall sensors connected to HET and use the HET edge interrupts as FIQ to switch the commutation. I also use the RTI Compare 0 interrupt as IRQ to do some calculations. Now I want the HET Interrupt to have higher priority than the RTI Interrupt and I also want the HET interrupt to interrupt the RTI Interrupt. Now my understanding is that the FIQ do exactly that, however it does not work. The HET FIQ behaves exactly like an IRQ, i.e. the HET Interrupt runs only if there is no active or pending RTI Interrupt and it also does not Interrupt an active RTI Interrupt.

What I do is:


1) I use HalCoGen 4.02 to configure the RM46.


1.1) In the "Driver enable" tab I check RTI and HET1 driver


1.2) In the "VIM channel 0-31" tab I enable the RTI compare 0 channel as IRQ and the HET high channel as FIQ


1.3) I also configure the RTI and HET 1 drivers as required


2) I develop the application in Code Composer Studio 6.0.1

2.1) I implement the HET Interrupt handler in "edgeNotification" and the RTI Interrupt handler in "rtiNotification"


2.2) On initialization I call (among other driver initialization routines) "rtiInit" and "hetInit". Finally I call "_enable_interrupt_"

Everything works fine, except that the HET FIQ does not Interrupt the RTI IRQ.


Any clues what I am missing here? Thanks.

Johannes

  • Hi Johannes,

    Yes, FIQ will interrupt any IRQ execution once it is enabled. One thing to check is if you are actually generating the high-level interrupt request output from the N2HET1 module. This is configured in the "Edge Interrupts" tab for the N2HET1 module. Is it possible that you have enabled both the high and low-level interrupts from the N2HET1 and are generating the low-level request? Please confirm.

    Regards,
    Sunil
  • Hi Sunil,

    thanks for your quick response. On the "HET1/Edge Interrupt" tab I have edge 0, 1, 2 enabled and set as High Level Interrupt. I actually can only toggle between high and low level.
    I get the high level interrupt from the HET no matter if I configure it as IRQ or FIQ. The point is that if I configure it as FIQ it does not interrupt the RTI IRQ handler routine. This has the effect that if I keep the RTI interrupt routine busy the HET FIQ handler rountine is never called.

    Would it be possible that I attach my HalCoGen file here so you could check yourself if I misconfigured something?

    Thanks, Johannes
  • Johannes,

    I will try this out on my side as well. It would be great if you could upload your HALCoGen file and the zipped CCS project as well.

    Regards,
    Sunil
  • Hi Sunil,

    it is working now. My mistake. I got confused. It was not the FIQ handler that got no computation time, it was the main Loop with debug output and stuff. Sorry for waisting your time and thanks for your Support.

    Regards
    Johannes
  • No problem Johannes. I will mark this post as answered and close it.

    Regards,
    Sunil