I am having issues with programming NXP (Freescale) MK60DN512VLQ10 microcontrollers using the SEGGER J-Link Plus. Connecting to the microcontroller with J-Flash succeeds most times without errors, but programming its internal flash memory fails most times. I wonder if this could be caused by trying to program older microcontroller device revisions, 4N30D, 8N30D, etc. and that J-Flash can only program more recent devices (like 4N22D, 5N22D). J-Flash doesn’t let you choose among different device revisions when selecting an MCU.
The electrical connections seem to influence the success rate, but I am not certain about which connection between J-Link and the MCU device could be wrong. The only issue I have been able to resolve is the state of the RESET signal: it should not be pulled down; the J-Link status LED will change from green to red otherwise, and programming is impossible. Signals nTRST, TCK, TDI, TDO, TMS all have pull-up resistors to VTref (2.5 V), signal RTCK is connected to ground and signal DBGRQ is left open. Signal shapes of TDI, TCK look good, but some MCU devices do not send data out on TDO.
If have also noticed that the RESET line can be pulled down by the MCU device itself: it seems that the MCU can reset itself periodically. This may be caused by an active watchdog in an unprogrammed device.
Sometimes the “unlock kinetis” command (using J-Link commander) seems to help.
When connecting to a device, error messages “Could not find core in Coresight setup” or “InitTarget(): PCode returned with error code -1” are shown. When trying to program and verify a device, error message “JTAG Connect (1000 kHz, Core ID: 0x4BA00477) OK; Verification of RAMCode failed @ address 0x1FFF0000. Write: 0xA801BE00 F0009900 Read: 0x00000000 00000000. Failed to download RAMCode!” appears.
Does anyone recognize these programming-related problems? Has anyone been able to resolve these?
Kind regards,
Hans
The electrical connections seem to influence the success rate, but I am not certain about which connection between J-Link and the MCU device could be wrong. The only issue I have been able to resolve is the state of the RESET signal: it should not be pulled down; the J-Link status LED will change from green to red otherwise, and programming is impossible. Signals nTRST, TCK, TDI, TDO, TMS all have pull-up resistors to VTref (2.5 V), signal RTCK is connected to ground and signal DBGRQ is left open. Signal shapes of TDI, TCK look good, but some MCU devices do not send data out on TDO.
If have also noticed that the RESET line can be pulled down by the MCU device itself: it seems that the MCU can reset itself periodically. This may be caused by an active watchdog in an unprogrammed device.
Sometimes the “unlock kinetis” command (using J-Link commander) seems to help.
When connecting to a device, error messages “Could not find core in Coresight setup” or “InitTarget(): PCode returned with error code -1” are shown. When trying to program and verify a device, error message “JTAG Connect (1000 kHz, Core ID: 0x4BA00477) OK; Verification of RAMCode failed @ address 0x1FFF0000. Write: 0xA801BE00 F0009900 Read: 0x00000000 00000000. Failed to download RAMCode!” appears.
Does anyone recognize these programming-related problems? Has anyone been able to resolve these?
Kind regards,
Hans
The post was edited 2 times, last by HansKinetis ().