Hi everyone,
I dont know what should I do to let the keil compiler know refer to which function when interrupt occur. I know interrupt functions are followed with _irq prefix but there may be several of these functions!
The same source code bundle where you did find this UART ISR did also contain the source code to initialize the UART - and that code did contain a source code line that used the name of the ISR function. That's the line that associate the UART ISR with that specific UART.
It's always a good idea to not just cut some lines from example programs but to actually try and run the examples and to use the processor datasheet/user manual and lookup the description of how different parts of the processor works until you understand exactly what the source code deoes.
Dear all friends,
Thanks for your helpful advises. Yes I see that the function USARTInit() installs my usart function 'UART0Handler' in the VIC table by following code:
if ( install_irq( UART0_INT, (void *)UART0Handler ) == FALSE ) { return (FALSE); }