Hi:
My MKE18F512VLL16 cannot download program anymore!The reason is that the JTAG/SWD pin is used as a GPIO,and then the board cannot download program anymore!
We have the following error message after click "Load" icon in spite of complete build without error.
Program Size: Code=980 RO-data=1076 RW-data=12 ZI-data=2060
"release\led_blinky.out" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:04
Load "release\\led_blinky.out"
Error: Flash Download failed - Target DLL has been cancelled
Flash Load finished at 10:49:46
Here is screen shot.
And the screen shot of "Options for Target" as following:
Now I want to know how to download program to cover the previous code.
Please help me,thanks!
Hi everyone,
Thanks for your attentions. Now my board can work again under a warm - hearted man's great answer, as the following websit.
Your kindly attention is enough to warm a world. Have a good day and wish you good luck.
qzy
Hi zy,
Please don't worry.
If you didn't also modify the reset pin to gpio, it's ok to recovery it.
Now, please change the on board debugger to JLINK at first. Then use the JLINK commander to do the mass erase at first.
1. change the on board debugger to JLINK
enter the bootloader mode, copy the JLINK firmware to the bootloader.
The firmware can be downloaded from this link:
SEGGER - The Embedded Experts - Downloads
The Jlink driver you also need to installed:
SEGGER - The Embedded Experts - Downloads
2. After you change your on board debugger to JLINK
open JLINK commander under the JLINK driver, press the reset button, then try to connect it.
If you can't connect it, press the reset button, and hold on it.
in the JLINK commander, input: unlock kinetis
This command will do the mass erase, then your SWD will be saved.
Please try it on your side.
If you still have question about it, please kindly let me know.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Kerry,
Today, I retry to input the "unlock kinetis" command with the J-LINK commander tool. And it writes that "Found SWD-DP with ID 0x2BA01477 Unlocking device...O.K."
But when I turn buck to bootloader mode, it is also cannot dowload program.
After the command--"unlock kinetis" works out , what should I do.
Looking for your help.Have a good day.
qzy
Hi Kerry,
I suddenly find that I did also modify the reset pin to gpio. I am very worry that If it cannot to be recovered.
I am so sorry to my board, making it being a unuseful brick.
Looking for your reply again.Have a good day.
qzy
Hi qzy,
Now, please follow my step at first.
1. power off the board
2. press the reset button, hold on it.
3. power on the board with usb cable, can you find the bootloader device?
Please check it at first.
After you test it, please let me know ASAP.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Kerry,
As you can see in the following figure, the J-link isn't connect successfully. And when I write "unlock kinetis", it warning that “Read from DP/AP register failed!”
Hi Kerry,
Thanks for your reply.
The bootloader device is as the following figure?
Looking for your reply again.Have a good day.
qzy
Hi Kerry,
Firstly, thank you for your quick reply. I think your idea is great, but I find it that my board hasn't a Interface of JLINK.
So, if there is another methods to solve this tricky problem?
Looking for your reply again.Have a good day.
qzy