Altera_Forum
Honored Contributor
8 years agoUART interrupt with HAL
Hello
I read a lot of threads about interrupts and UART and good resolution was this (http://www.alteraforum.com/forum/showthread.php?t=17224) but I'm looking something without write own driver. I tried following code but it not work:#include "system.h"# include "sys/alt_stdio.h"# include "alt_types.h"# include "sys/alt_irq.h"
void isr_timer_0(void* context);
int main()
{
void *my_context;
alt_ic_isr_register(UART0_IRQ_INTERRUPT_CONTROLLER_ID, UART0_IRQ, isr_timer_0, my_context, 0x0);
while(1);
return 0;
}
void isr_uart0(void* context)
{
alt_putchar(alt_getchar());
} Similar isr register for timer works great. I'm using RS-232 Serial Port from Qsys. Do you know any solution to use uart interrupt with build in uart driver? Mayby i should use another IP? Best regards Przemek