How to check if RA4E2 interrupt timing is correct or not?

Hi,  I want to have GTP0 trough interrupt.  FSP5.5.0 seems only allowing it if I also enable the crest (cycle end) interrupt, is this behavior correct?

Below is fine with both Underflow and overflow interrupts enabled.

However, if I disable the overflow, I can't have the underflow (trough) interrupt on itself as below.  Why?

Also I want to check if the interrupt timing is correct or not, I try to toggle a couple pins in the interrupt routine, like below.  Do I do it correctly?   My scope does not indicate that the pins are toggle correctly.  timer_trough_callback is the callback for the interrupts.  

Parents
  • Hello,

    This seems like a bug of FSP configurator. When underflow/through is enabled, another interrupt must be also enabled otherwise it throws an error. I will need to confirm this internally but for now you can keep overflow/crest interrupt enabled.

    To detect the crest and through events in the callback you can use TIMER_EVENT_CREST and TIMER_EVENT_TROUGH events which are triggered in triangle-wave PWM only.

Reply
  • Hello,

    This seems like a bug of FSP configurator. When underflow/through is enabled, another interrupt must be also enabled otherwise it throws an error. I will need to confirm this internally but for now you can keep overflow/crest interrupt enabled.

    To detect the crest and through events in the callback you can use TIMER_EVENT_CREST and TIMER_EVENT_TROUGH events which are triggered in triangle-wave PWM only.

Children