Hi,all
I want to usr GIO_A0 and GIO_A3 as input interrupt signal ,How can I use this two pins ,the interrupt may come together or one after another in very short time. I check the "gioREG->FLG"?Do I need to configure "gioREG-> ENASET "?
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.
Hi,all
I want to usr GIO_A0 and GIO_A3 as input interrupt signal ,How can I use this two pins ,the interrupt may come together or one after another in very short time. I check the "gioREG->FLG"?Do I need to configure "gioREG-> ENASET "?
Jiaming,
I've attached a simple GIO project using a GIO pin as interrupt.
Please have a look and let me know if this is helpfull.
Dear Jean,
I tried some parts of your code and it did not work for me. Here it is what I do in Halcogen:
sys_main.c:
_enable_IRQ(); gioInit(); gioEnableNotification(gioPORTA,7); while(1);
When I try to debug, I use a breakpoint in notifications.c, gioNotification(). Debugger can not reach the breakpoint. Thanks for your help.
My problem is I have two interrupt from GPIO ,one is from GIOA0 ,and the other is from GIOA3,the two interrupts may come together.I do the test
void gionotify(gioPORT_t *port, sint32 bit)
{
if(port==gioPORTA && bit==0)
{ Message[0] = 0x01;
fpgaBlockRead( &Message[0], 0, 140);
WriteComQ(&TGMQABufApp, &Message[0], 140);
}
else if(port==gioPORTA && bit==3)
{
Message1[0] = 0x02;
fpgaBlockRead_1( &Message1[0], 0, 140);
WriteComQ(&TGMQBBufApp, &Message1[0], 140);
}
}
and when I create the conditon that the GIOA0 and GIOA3 encounter with interrupt signal (rising edge)together,I find the error pin of TMS570LS3137 is low which means something wrong with the TMS570.
How can I solve this problem?Hope to get answer soon.Thanks a lot !
Jan,
I've create 2 projects using your code example.
Push_Button_High to demonstrate the High level GIO interrupt and Push_Button_Low to demonstrate the Low level GIO interrupt.
I think your mistake is because of a naming in HalCogen.
The GIO module has 2 interrupt lines connected to the VIM module.
1 line is connected as request request 9 and named in Halcogen GIO int A and the other to request 23 and named GIO int B. In the GIO tab in Halcogen, you can select for each GIO input used for interrupt generation if they will activate the High or Low priority. By concept, the VIM module prioritize interrupt with the following scheme.
Request 0 > Request 1 > .... > Request 95.
So in order to make the GIO low interrupt to work, you have to select for the pin you want to use, "Low Priority" and enable at the VIM level the request 23 named GIO int B.
The rest of your code stay the same.
Please have a try and let me know if it is clear now.
Jan,
If your question has been answered, could you please mark my reply as verified so we can close this thread.