My code works only with debugger connected and run but doesn't work if it works freely without debugger MKL34z64!!
What I have missed?
Solved! Go to Solution.
Hi kareem,
The PTA4 by default is a NMI function. Driving the NMI signal low forces a non-maskable interrupt, if the NMI function is selected on the corresponding pin.
If it is possible, please use another pin instead of using PTA4 as GPIO.
If you want use PTA4 as GPIO function, please refer below:
Using the NMI_b pin as GPIO on KL15 device
Disable NMI_b pin/interrupt KL04Z?
Need to use pin PTA4 but not as NMI_b (KL15)
Best Regards,
Robin
Thanks Robin,
I found the problem and found that I can disable the NMI using flash config, I've changed the flash config in the startup code to disable the NMI but nothing changed in the flash.
I attached a picture of what connected to PTA4 and when switched the connection to another pin it worked fine!!!
I've notied that PTA by default is a NMI so now i'm working on changing the default values and i'll keep you updated
Hi kareem,
The PTA4 by default is a NMI function. Driving the NMI signal low forces a non-maskable interrupt, if the NMI function is selected on the corresponding pin.
If it is possible, please use another pin instead of using PTA4 as GPIO.
If you want use PTA4 as GPIO function, please refer below:
Using the NMI_b pin as GPIO on KL15 device
Disable NMI_b pin/interrupt KL04Z?
Need to use pin PTA4 but not as NMI_b (KL15)
Best Regards,
Robin
I also have a similar problem. After I Download my code and it runs well, when I Reset, everything is gone.
Can Anyone help me fix this problem?
Hi kareem,
Have you test the project in SDK_1.3_MKL34Z64xxx4?
You can also test the Processor Expert project created by KDS3.2.0.
If the project still have problem on your customer board, please attach the schematic of your board.
What debugger are you using, Segger J-Link or PEmicro or the others?
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
hey Robin thanks for answering me.
I'm already using the SDK_1.3_MKL34Z64xxx4
and i'm also accessing the MCU using my own mapping files.
i got the FRDM-KL46Z which has a processor i believe it got the same architecture of the processor i use "KL34Z", the problem is when running the code on the FRDM board it works fine even after reset.
N.B: the on board debugger is PE-micro type
the problem is when i download this code on my custom board which has KL34Z the works fine only after downloading and while debugging but after reset it seems like it was downloaded on the RAM but it is not. I've read the code from my board after halting and it is the same code nothing missing N.B: i use J-LINK SEGGER as a debugger for my board
i doubted the debugger but when i used it with the FRDM board it worked just fine.
any suggestion??