At some point when a program runs it gets an exception
/* ** =================================================================== ** Method : Cpu_Cpu_Interrupt (component MK10FN1M0LQ12) ** ** Description : ** This ISR services an unused interrupt/exception vector. ** This method is internal. It is used by Processor Expert only. ** =================================================================== */
PE_ISR(Cpu_Interrupt)
{
/* This code can be changed using the CPU component property "Build Options / Unhandled int code" */ PE_DEBUGHALT();
}
How can I now the cause of the problem? In IAR for instance there is a Call Stack window were we can see the last function before the exception.
On Debug window I see this (the picture). Does it mean the exception was thrown from main()?
Please refer: Debugging Hard Faults on ARM Cortex-M
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi
This is an interrupt firing without any interrupt handler installed (thus it is calling the default handler that doesn't nothing but stop the processor operation so that the error can be detected).
If you look in the NVIC registers you should be able to see the pending source flag so that you know which interrupt source (often peripherals) has generated the interrupt.
If this doesn't clearly indicate the source you can add different interrupt handlers for each possible interrupt source (rather than the general one) so that it is then clear which source has fired.
Finally you need to work out why an interrupt has been configured without having a handler installed for it - maybe you missed adding its handler (?)
Regards
Mark
Complete Kinetis solutions for professional needs, training and support: http://www.utasker.com/kinetis.html