This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CMSIS v5 USARTn_IRQHandler multiply defined

Hi,

I have been learning how to use CMSIS v5 Beta to program an LPC4357, and so far so good.

I got 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 version1.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.

I have realized that there are hardly any CMSIS examples around, especially UART. Though of course i might be wrong.


void USART3_IRQHandler()
{
        volatile unsigned long iir;

        iir = LPC_USART3->IIR; //clear Interrupt

        NVIC_DisableIRQ(USART3_IRQn);

        NVIC_ClearPendingIRQ(USART3_IRQn);

        Driver_USART3.Send("\nCCCCCCCCCCCCCCCCCCC\n", 24);
        while (Driver_USART3.GetStatus().tx_busy);

        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.

I am grateful for any help given.