Forum Discussion
Altera_Forum
Honored Contributor
20 years agouart interrupt
hi !
i'm trying to use interrupt in NIOS II ide for the uart. Are two days that i study this problem . I saw sw development and reference handbooks , and found different informations about uart core and hal api functions , and also read a lot of driver devices and .h files . I found also an example writing by Kira and use it for my case the code is : # include "count_binary.h" volatile int t; volatile int uart_0; static void handle_uart_interrupt(void* context,alt_u32 id) { t++; IOWR_ALTERA_AVALON_PIO_DATA(PM_OUT_BASE, t); } int main(void) { IOWR_ALTERA_AVALON_UART_CONTROL(UART_0_BASE, 0x180); alt_irq_register(UART_0_IRQ,&uart_0,handle_uart_interrupt); while( 1 ) { } return(0); } but not run .On my development board i can see the led switch on when a caracter arrive , but the interrupt doesn't work Somebody know if i forget something else ? thanks ciao walter3 Replies
- Altera_Forum
Honored Contributor
Hi,
is it possible that your interrupt service routine does not clear the interrupt? may be, you can try to write zero to the status register?! - Altera_Forum
Honored Contributor
thanks
i resolved the problem and post the code to help if somedoby need something ciao - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by pmicro@Mar 23 2006, 07:41 AM thanksi resolved the problem and post the code
to help if somedoby need something
ciao
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13719)
--- quote end ---
--- Quote End --- Hi Can you post the correct code? PS: Are you italian?