Hi team,
I have a question from my customer. Please see below.
- Fast Interrupt Request (FIQ). Fault2 (pin 25) is mapped to FIQ, but it does not trigger FIQ ISR at all. If I mapped the Fault2 to standard interrupt request, the ISR can be triggered, and everything is correct. The code is like this:
#define CIMINT_ALL_FAULT_PIN (0x40000000) // 30 Fault Pin Interrupt
…
GioRegs.FAULTINTENA.bit.FLT2_INT_EN = 1;
GioRegs.FAULTOUT.bit.FLT2_OUT=1;
GioRegs.FAULTDIR.bit.FLT2_DIR = 0;
GioRegs.FAULTIN.bit.FLT2_IN = 0; //1 - Fault pin must be driven High. 0 - Driven Low to trigger Interrupt
GioRegs.FAULTINTPOL.bit.FLT2_INT_POL = 0; //Interrupt will be generated on 1 = Rising Edge, 0 = Falling Edge
//write_reqmask(CIMINT_ALL_FAULT_PIN);
write_firqpr(CIMINT_ALL_FAULT_PIN);
enable_interrupt();
enable_fast_interrupt();
If I comment out write_firqpr, and put back write_reqmask instruction, everything works correct. It seems FIQ is not enabled. Here is the function enable_fast_interrupt();
void enable_fast_interrupt(void)
{
swi_single_entry(0,0,0,4); //code is 4;
}
- Besides DPWM0 and DPWM1, I also try to make PWM output from pin 8, but I cannot get PWM signal from that pin. The pin is always low. Here is my initialization code:
- TimerRegs.T16PWM0CMP0DAT.bit.CMP_DAT = 15870; //value to reset counter
- TimerRegs.T16PWM0CMP1DAT.bit.CMP_DAT = 7935; //50%50 duty cycle half of comp 0
- TimerRegs.T16PWM0CMPCTRL.bit.CMP0_INT_ENA = 1; //Enables compare 0 (reset) interrupt
- TimerRegs.T16PWM0CMPCTRL.bit.PWM_OUT_ACTION0 = 1;//1 is for clear pin
- TimerRegs.T16PWM0CMPCTRL.bit.PWM_OUT_ACTION1 = 2;//2 is for clear pin
- TimerRegs.T16PWM0CNTCTRL.bit.CMP_RESET_ENA = 1; //enable reset by comp 0
- TimerRegs.T16PWM0CMPCTRL.bit.PWM_OUT = 1; //make sure that default is a 0
- TimerRegs.T16PWM0CMPCTRL.bit.PWM_OUT_DRV = 1; //put zero into output latch
- TimerRegs.T16PWM0CMPCTRL.bit.PWM_OUT_ENA = 1; //enable pin as an output
- TimerRegs.T16PWM0CNTCTRL.bit.SW_RESET = 1; //allow counter to run
- MiscAnalogRegs.IOMUX.bit.EXT_TRIG_MUX_SEL=3;
- MiscAnalogRegs.IOMUX.bit.JTAG_CLK_MUX_SEL=0;
- MiscAnalogRegs.IOMUX.bit.SYNC_MUX_SEL=2;
I changed line k to m to different value, but it does not work.
Thank you!
Lauren