cr_startup_lcp11u.c problem with receive complete interrupt (solved)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

cr_startup_lcp11u.c problem with receive complete interrupt (solved)

781 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahendra_ms on Sun Jan 17 00:16:15 MST 2016
Hello community
I'm dealing with LPCXpresso 11U24 board with one project code provided by NXP.(with LPCXpresso v7.9.2)
In that code I've add-up chip's UART code with receive complete interrupt, right now every thing is working good and I'm able to send data through UART with my desired baud rate, but problem starts when i send any character from terminal tool. problem is controller won't get interrupted and send echo back!

I've starts it's debugging and further send charterer from terminal tool then i found that there is problem in it's startup file, controller get freeze at......(unexpected interrupt occurs in it's startup file)


//*****************************************************************************
//
// Processor ends up here if an unexpected interrupt occurs or a specific
// handler is not present in the application code.
//
//*****************************************************************************
__attribute__ ((section(".after_vectors")))
void IntDefaultHandler(void)
{
    while(1)
    {
    }
} 



all tips and solution welcomes
Thanks and regards,
Mahendra_ms
Labels (1)
0 Kudos
9 Replies

669 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahendra_ms on Mon Jan 18 22:20:45 MST 2016
problem is solved
thanks all of you for your precious comments,

hey guys as i told you in startup file the default alias for uart irq is  void UART_IRQHandler (void) ALIAS(IntDefaultHandler);
now in my uart.c I've declare isr having same name but still it wasn't fire up and MCU was freeze at...unexpected interrupt occurs in it's startup file,

project also has chip.h library file where macro was define for uart irq as...
/* Family specific IRQ handler alias list */
/*
#if (defined(CHIP_LPC11AXX) || defined(CHIP_LPC11EXX) || defined(CHIP_LPC11UXX))
#define UART_IRQHandler      USART_IRQHandler
#define USART0_IRQHandler    USART_IRQHandler
#endif
*/


and i simply did comment them, after building project again I've set debugger and give some command from terminal tool and finally my uart irq get fire
0 Kudos

669 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Jan 18 02:08:24 MST 2016
As stated by others, you really need to provide more details.

But as background information you might want to take a look at : https://www.lpcware.com/content/faq/lpcxpresso/startup-code-interrupt-handlers

Regards,
LPCXpresso Support
0 Kudos

669 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Mon Jan 18 02:03:12 MST 2016

Quote: mahendra_ms
thanks for reply,
in my application code I've added UART irq ruteen in my uart.c file.



And how did you define and declare it? Show us exactly your interrupt routine.

In the startup file, the function name is weak, meaning that any definition you provide (assuming it is correctly defined and declared) will override this weak reference and yours will be used. But it must be correct...
0 Kudos

669 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Jan 18 00:50:19 MST 2016

Quote: mahendra_ms
guys, is there any possible solution for this post?
any one help me?



:quest:

No one can help you if you don't describe your problem in detail  :exmark:

As mentioned already you have to find out why your UART interrupt isn't triggered...

That's not possible for us because you didn't post your project so we are just guessing what you are doing  J)
0 Kudos

669 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahendra_ms on Sun Jan 17 22:32:05 MST 2016
guys, is there any possible solution for this post?
any one help me?
0 Kudos

669 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahendra_ms on Sun Jan 17 02:06:02 MST 2016
thanks for reply,
in my application code I've added UART irq ruteen in my uart.c file.
0 Kudos

669 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mahendra_ms on Sun Jan 17 02:04:06 MST 2016
Thanks for reply,
but in cr_startup_lcp11U.c it has aliased for uart as default int. handler!
void FLEX_INT0_IRQHandler (void) ALIAS(IntDefaultHandler);
void FLEX_INT1_IRQHandler (void) ALIAS(IntDefaultHandler);
void FLEX_INT2_IRQHandler (void) ALIAS(IntDefaultHandler);
void FLEX_INT3_IRQHandler (void) ALIAS(IntDefaultHandler);
void FLEX_INT4_IRQHandler (void) ALIAS(IntDefaultHandler);
void FLEX_INT5_IRQHandler (void) ALIAS(IntDefaultHandler);
void FLEX_INT6_IRQHandler (void) ALIAS(IntDefaultHandler);
void FLEX_INT7_IRQHandler (void) ALIAS(IntDefaultHandler);
void GINT0_IRQHandler (void) ALIAS(IntDefaultHandler);
void GINT1_IRQHandler (void) ALIAS(IntDefaultHandler);
void SSP1_IRQHandler (void) ALIAS(IntDefaultHandler);
void I2C_IRQHandler (void) ALIAS(IntDefaultHandler);
void TIMER16_0_IRQHandler (void) ALIAS(IntDefaultHandler);
void TIMER16_1_IRQHandler (void) ALIAS(IntDefaultHandler);
void TIMER32_0_IRQHandler (void) ALIAS(IntDefaultHandler);
void TIMER32_1_IRQHandler (void) ALIAS(IntDefaultHandler);
void SSP0_IRQHandler (void) ALIAS(IntDefaultHandler);
void UART_IRQHandler (void) ALIAS(IntDefaultHandler);
void USB_IRQHandler (void) ALIAS(IntDefaultHandler);
void USB_FIQHandler (void) ALIAS(IntDefaultHandler);
void ADC_IRQHandler (void) ALIAS(IntDefaultHandler);
void WDT_IRQHandler (void) ALIAS(IntDefaultHandler);
void BOD_IRQHandler (void) ALIAS(IntDefaultHandler);
void FMC_IRQHandler (void) ALIAS(IntDefaultHandler);
void USBWakeup_IRQHandler (void) ALIAS(IntDefaultHandler);



and in my uart.c file I've also add uart irq ruteen
0 Kudos

669 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Sun Jan 17 01:50:02 MST 2016
Or, as the comment in the code says...
or a specific handler is not present in the application code.
0 Kudos

669 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sun Jan 17 00:48:15 MST 2016

Quote: mahendra_ms
all tips and solution welcomes :)



Obviously your UART interrupt isn't triggered and the default interrupt is used  :O


0 Kudos