cr_startup_lpc13xx.c AND INTERRUPT PROBLEM

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by dimaios on Wed Jul 22 09:09:22 MST 2015
     I'm using version LPCXpresso v7.8.0 [Build 426] [2015-05-28] of the IDE.

I've created a new project importing the library lpcopen_2_05_lpcxpresso_nxp_lpcxpresso_1347.zip

I'm using a testing board LPCXpresso LPC1347.

I've built and debugged the sample periph_uart_rb and [u]everything was ok[/u].

I've created a new project to test the UART starting from the file uart_rb.c.

The IDE [u]auto generates[/u] the files sysinit.c and cr_startup_lpc13xx.c.

I've simply copied the content of uart_rb.c into my main file.

RESULT : the application doesn't work.

The problem starts when the UART interrput is enabled.

[color=#06f]NVIC_EnableIRQ(UART0_IRQn); [/color]<<<===== Put a breakpoint here

.... pausing the code execution you can see that the program is running into this code section of the cr_startup_lpc13xx.c file.

// Processor ends up here if an unexpected interrupt occurs or a handler
// is not present in the application code.
void IntDefaultHandler(void) {
// Go into an infinite loop.
while (1) {


The cr_startup_lpc13xx.c file generated by the new IDE is different from the old one you can find into the  uart_rb.c folder.

Overwriting the new file ( auto generated by the IDE ) with the old one everything works well!  :~

I don't understand why .... it seems that the interrupt isn't correctly linked to the callback ....
I've checked all compiler directives and option .... I never found differences.

Any idea ?