I have hit a similar issue before and it was caused by an interrupt handler getting stuck in an infinite loop. I added an InterruptIn object with pull-up that would printf() some text (the contents of the stack in my case) on a falling edge and then call the mbed error() macro to cause the blue lights of death to blink. If I connected a wire from this pin to ground, then it would break into the running program, display the stack contents and then blink the LEDs. When everything was running normally, I could force this interrupt and get the dump but when I hit the hang, not even this code would fire. The code wasn't hitting a fault, it was just stuck in some interrupt handling code at priority level 0 so my interrupt couldn't fire either.
You could try lowering the priority level of the interrupts (using the NVIC_SetPriority() API) that you know you are using and then try out the InterruptIn (this interrupt left at priority level 0) hack to see if it can break in when your program hangs. If printf()'s will work from your device when it is in this state, then you can dump state about your application to try and figure out what is leading to the hang.
I have a program that I prototyped with the mbed and then moved to LPC1769 hardware for production and it occassionally (but consistantly) locks up with both platforms, most likey something to do with serial interrupts. It locks solid and stops responding and a full power cycle is required to restart.
I want to figure out what condition its getting in on the fault. I know with non-mbed devices I could put debug printf messages in all the fault conditions and start debugging from there. How do I get there from here?
I guess this would be similar to printing a message instead of the Blue lights of death??