I'm doing development on a custom board using the MKL26Z128CAL4R. I just got the boards in, and re-targeted the code from a FRDM board to my new PCB. When I try to debug my code on the new board, I get stuck in the default ISR without ever hitting main. I thought that the NMI pin might be to blame, since it's being used as GPIO, but disabling NMI in the flash config struct in the SDK files did not seem to help. I opened up the .elf binary in a hex editor to make sure that the bit was actually being cleared, and it looks fine. I also changed the pin mux setting for PTA4 to GPIO.
Some other information that might be helpful:
I can't think of anything else. If anyone has any theories on why this is happening, I'm all ears. As it is, I'm just looking at a very expensive brick.
Devin
If you hit an interrupt before you have enable the global interrupt it can only be the NMI (or a hard fault).
1. Check that the Flash configuration is in the Flash (read the memory in the debugger) and not just in the binary file to ensure that it has also actually been programmed as required.
2. Do a register dump of the NVC registers to see which interrupt is actually pending.
Regards
Mark
Kinetis: http://www.utasker.com/kinetis.html
KL26:
- http://www.utasker.com/kinetis/FRDM-KL26Z.html
- http://www.utasker.com/kinetis/TEENSY_LC.html
It was the NMI interrupt, and I managed to resolve the issue, although I didn't find a root cause. I reloaded KDS, cleaned and rebuilt the project, tried debugging again, and it worked. Could have been an issue with the programmer. Thanks for the quick response.