Content originally posted in LPCWare by alexxx on Fri Feb 22 04:21:35 MST 2013
Hi!
I am new in cortex-m0 core, recently I made an application using LPC1227.
Sometimes when application starts, after reset and during oscillation initialization, the code fails to continue and brances into default handler and there it stays until I reset the code. This happens either with the debugger running or not.
I have found a solution, by initialising the watchdog before oscillation initialization, so after default handler application restarts via watchdog and then it runs properly.
But I don't like this solution, since I have yet no idea why this is happening.
Has anyone faced a similar problem?
Besides that, how can I write code inside the default handler? I have wrote code for other handlers (like sys tick and uart0), but when I create a function for default handler, all breakpoints inside it are deactivated during compile time and I get a warning "[I]Discarded breakpoint of type EMUL_CODE, unknown to the current driver.[/I]".
I am using external crystal 24MHz, IAR compiler.
Thanks in advance.