Reset problem witk MKL26Z
My custom board will run fine if the P&E Multilink is connected and I execute Flash from file, and it will continue to run if I then disconnect the SWD header(probably not advisable, but proved a point). However, it refuses to run if I then power cycle it. The reset pin still measures 3V3, and there do not appear to be any pulses on the reset pin according to my scope.
The original design had a 100nF cap to ground, and a 10k to 3V3, but I removed the cap some time ago, as I was having problems, which later turned out to be the result of P&E numbering their headers the wrong way round, which had confused our hardware designer.
Would be grateful for any insight.
I have now tried replacing the 100nF cap, but to no avail. I don't think the reset pin on the chip is the problem, as it does reset the chip if pulled low(it kills the running code, anyway), but the processor won't start up again. I have added a small piece of code to turn on an LED, that happens before even initializing the PLL, bit it doesn't even get that far.
I'm at a loss to know how to debug this, as when the debugging tool is connected, it works perfectly!
John
Is your code handling the watchdog (eg. disabling it immediately) or possibly NMI interrupt out of reset (if not disabled in Flash configuration parameters). There is a possibility that the debugger is using a script that handles such things on connection so that they don't cause problems but without debugger the troubles start.
Please post the binary so that I can check the startup and flash config code.
Regards
Mark
Kinetis for professionals: http://www.utasker.com/kinetis.html
KL26: http://www.utasker.com/kinetis/FRDM-KL26Z.html / http://www.utasker.com/kinetis/TEENSY_LC.html
Hi Mark, and thanks for responding.
I have just this minute solved the problem. It was because I had been using semihosting. I have turned off semihosting for P&E Multilink, removed all printf statements that were using semihosting, and modified the linker options back to standard(removed the -specs=rdimon.specs, replaced the -specs=nosys.specs).
I don't know if all those steps were strictly necessary, but now it's working.
I thought I'd read somewhere that semihosting didn't have this effect, but going back through the internet bookmarks, I think I misread something. It would be nice to have one checkbox or something that does all this, but I don't think I'll be bitten by this again, since I've been scratching my head since last night.
Kind regards,
John