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 walter