--- Quote Start ---
originally posted by rugbybloke@Aug 12 2005, 04:22 AM
if you wish to use an isr you only need to call alt_irq_register as you do in your example 1.
it sounds to me like you either have a problem with your hardware or how you're controlling it, you need to look with the debugger to see if you're ever getting into your isr and if not is the bit corresponding to your uart's irq getting set in the ipending register?
also i notice you're using printf inside your isr you can't rely on this working. --- Quote End ---
Hi rugbybloke,
Thank you for your suggestions to me!
But I did use debugger in NiosII IDE to check my code,
but everytime after its sending AT command to the UART,
there always no response(It should response "OK" at least)
from that.And when the debugger comes to the breakpoint at the
---------------
while((IORD(GSM_UART_BASE,2)&0x80)!=0x80)
;
---------------
It would stop forever, without any forward actions any more.
Thus I really dont know where the rub of the code above is,
besides, are the code following right
when I register the interruption for my program?
--------------
alt_irq_register(GSM_UART_IRQ, (void*) &context, gsm_rxd);
IOWR_ALTERA_AVALON_UART_CONTROL(GSM_UART_BASE, ALTERA_AVALON_UART_STATUS_RRDY_MSK);
--------------
Because I have not used interruption in NiosII,
so I'm not sure about that...
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/huh.gif
Many thanks!
Regards,
Don