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.
Tool/software: TI-RTOS
I created a simple project with HALCOGEN for TMS570LS04x for Hercules LaunchPad development board with FreeRTOS support. I wanted just to blink the GIOA2 LED while pressing GIOA7 button on the board. In HALCOGEN I enabled interrupt for GIOA7 button triggered on falling edge then I generated the code for Code Composer Studio. In CCS I've added some code for blinking GIOA2 LED. I set the breakpoint in GIOA ISR handler.
The problem I've got is that the GIOA ISR is not fired at all. I mean the TMS570 CPU should set interrupt flag on channel 9 and fire my ISR for GIOA. Instead of it I noticed that I get interrupt flag on channel 23 (GIOB) in vimREG->INTREQ0 register.
I've checked VIM interrupt channel mapping and there is everything ok. It means that there is mapping INT_REQ9 -> INT_CHAN9 and INT_REQ23->INT_CHAN23. So when I press the GIOA7 button I should get interrupt on channel 9 but it appears as a interrupt on channel 23.
How to explain this effect?
Hello,
Channel 9 is Level 0 interrupt and Channel 23 is Level 1 interrupt. Check your GIO settings in HALCoGen to see the level of interrupt that is enabled.
Best regards,
Miro
Hello,
The following is GIO Block Diagram:
In HALCoGen you can set all registers shown in this diagram.
Regarding interrupts, If you enable GIO interrupt on a particular pin (GIOENASET/GIOENACLR), then you can select (by setting GIOLVLSET/GIOLVLCLR registers) two levels of interrupt for that GIO - level A/high level interrupt (serviced by VIM channel 9) and level B/low level interrupt (services by VIM channel 23).
After setting GIO module then in VIM module you could select whether this GIO pin is generating IRQ or FIQ.
HALCoGen generates interrupt handler in gio.c for the level you have selected . For example: void gioHighLevelInterrupt(void)
Best regards,
Miro
Hello Miroslav,
Yes, I set GIO->Port A the same as you: to Low Priority (selected with red circle). But it is not clear to me why GIOA interrupts will be serviced by channel 23 while in channel mapping (VIM Channel 0-31 tab in HALCoGen) for INTREQ9 I've got channel 9 (not 23).
Kind Regards