Hi again
I'm making good progress learning the RM4 environment. Now I'm strugling with interrupts.
I used HalCoGen to configure a PWM (using the blackbox driver of HalCoGen). The PWM works fine.
Now I want to generate an interrupt synchronous with the PWM. I found a thread in this forum describing the steps needed to generate interrupts.
I think I did them all, but the interrupt routine is not called. So I probably miss something. But what?
These are the things I do:
(I'm using PWM0 of HET1)
- In HalCoGen connecting the ''End Of Period'' event of PWM0 to the High Level interrupt
- Enabling interrupt 10 (Het High) to the FIQ
- In my main() routine calling hetInit(); and pwmEnableNotification(hetREG1,pwm0,pwmEND_OF_PERIOD); (both found in het.c)
- In the main() routine calling HW_Vec_Init(); to enable the vector interrupts of the processor
The HW_Vec_Init(); function is an assembly routine with the following contents:
.global HW_Vec_Init
HW_Vec_Init
stmfd sp!,{r1,LR}
MRC p15 ,#0 ,R1 ,c1 ,c0 ,#0
ORR R1 ,R1 ,#0x01000000 ;mask 0-31 bits except bit 24 in Sys Ctrl Reg of CORTEX-R4
MCR p15 ,#0 ,R1 ,c1 ,c0 ,#0 ;enable bit 24
ldmfd sp!,{r1,PC}
When I run the application, the PWM is started, but the het1HighLevelInterrupt(); routine in het.c is never called!
So what do I miss here?
Do I have to call other routines generated by HalCoGen ?
I attached my project.