Hello,
I'm trying to use the interrupt of the RM48 using halcogen.
I have done a simple control to the push button ( polling ).
---------------------------
if( gioGetBit(gioPORTA,7)) { hetREG1->DOUT = 0x00000000; } else { hetREG1->DOUT = 0xFFFFFFFF; }
----------------------------
and it is working. But when I run
" gioEnableNotification(7); "
nothing happens, I've putted a breakpoint the callback "gioNotification(int bit)".
To configure the interrupts in HalCoGEN I've done the following steps.
1. Created a RM4x, TMDXRM48HDK project.
2. Set GIO driver compilation in Driver Enable Tab
3. Enabled IRQ Handling via VIC Controller in Cortex-R4F tab
4. Set IRQ to vectored mode in Interrupts Bab
5. Enabled GIO Low Interrupt ( 23 ) to IRQ in VIM Channel 0-31
6. Enable the Interrupt in Gio Tab to Pin 7
6.1 Diretion is input
6.2 Pull down enabled
6.3 Falling Edge interrupt
6.4 Low Priority interrupt
In the sys_main I've called :
gioInit();
gioEnableNotification(7);
runned it and pushed the button, but no gioNotification was generated.
I'm missing something ? Is there any Init() I've to do to activate interrupts ?
Thanks,
Cristiano
Cristiano,
I'm trying to duplicate your problem.
I will be back to you as soon as I have a result.
By the way, are you enabling IRQ interrupt at the CPU level?I don't see in your code a call to _enable_IRQ();
By default, after reset, the interrupt (IRQ and FIQ/NMI) are disable at the CPU level.You have to enable interrupt once your application is ready.
The init in VIM will just send the request (IRQ or FIQ/NMI) to the CPU. If the CPU is not interrupt ready, your code will not jump in your ISR.
Please can you confirm this point?
Thanks and Regards,
Jean-Marc
Best regards,
Application Engineer
If my reply answers your question please click on the green button "Verify Answer".
Hello Jean-Marc,
yes, in _enable_interrupt_(); call was missing, I think the name changes from version to version in Halcogen.
but using it made it work.
I thought the gioEnableNotification(7); did it, and the global got enabled by default.
one sugestion to the HalCoGen team is to do more interrupt examples, it has only one.
Thanks a lot for your help !
Thanks for your comment.
I will communicate this to our Halcogen Development team.All inputs are always welcome.
I want to make one additional comment.The GIO capture are only working when the CPU is running.In other words, when you stop execution, if you try to set and clear an IO pin in order to generate a rising/falling edge, the capture block in the GIO module will not capture the edge.
Best Regards,