AnsweredAssumed Answered

CMSIS USART_LPC43xx.c USARTn_IRQHandler Multiply Defined issue

Question asked by Vincent Micallef on Oct 1, 2016
Latest reply on Oct 11, 2016 by Carlos_Mendoza

I hope someone can help.

Is this an issue with CMSIS v4.5.0 / v5?

In the Startup file there is defined USART3_IRQHandler

and in the CMSIS USART_LPC43xx.c there is a defined USART3_IRQHandler

Due to this, the compiler is stating that there is a multiply Defined.


CMSIS online states the following:

"The user application may simply define an interrupt handler function by using the handler name as shown below."


But the above is not possible in this case.

Can someone give me a solution? or a workaround?


I am stuck in creating an interrupt for USART3 (Rx). I am using numerous other interrupts with no problem. I receive the following error when compiling:

Error: L6200E: Symbol USART3_IRQHandler multiply defined (by usart_lpc43xx.o and main.o).

I am using the CMSIS Startup, system, DRIVER_USART, USART_LPC43xx files, and i receive the above error.

When debugging, and triggering an interrupt, it seems to go to the Hardfault handler??.

When examining the above files, there seems to be another "MX_USART3_IRQHandler", could someone explain this to me, or should i use this? How? I tried.

Could some one please help me out on this? Or/and provide me with a very basic program example for USARTn Interrupts using CMSIS v4.5.0 / v5.

void USART3_IRQHandler() {         volatile unsigned long iir;         iir = LPC_USART3->IIR; //clear Interrupt         NVIC_DisableIRQ(USART3_IRQn);         NVIC_ClearPendingIRQ(USART3_IRQn);         Driver_USART3.Send("\nC\n", 5);         NVIC_EnableIRQ(USART3_IRQn); }   void UART_Interrupt_Init() {         LPC_USART3->IER   = 0x03;         NVIC_EnableIRQ(USART3_IRQn); } 

UART3 without interrupts functions well. I did not place the UART3 Init code to simplify.


Thank you