Thanks for the report.
SMC_PMSTAT is checked because flashing in VLPR mode is not possible.
When I implemented this check, I did not know about "Initial Product Rev" (Z
part).
RM reads that Z dev has a Mode Controller instead of SMC at 0x4007e000.
So to fix this problem correctly, we should introduce a new item in enum
sysmodectrlr_type,
set it for KINETIS_K_SDID_K10_M100 and KINETIS_K_SDID_K20_M100 if REVID == 0
and detect VLPR from MC_PMCTRL RUNM bits.
Do you want to contribute such change?
---
** [tickets:#236] Cannot flash Kinetis Z parts**
**Status:** new
**Milestone:** 0.9.0
**Created:** Thu May 02, 2019 09:41 AM UTC by Ramy
**Last Updated:** Thu May 02, 2019 09:41 AM UTC
**Owner:** nobody
I am using a Kinetis MK20DN512**Z**VLQ10 which is an earlier version of the
MK20DN512VLQ10. Flashing the non-Z part works fine in OpenOCD 0.10, but when
flashing the Z part, the following error occurs:
"Flash operation not possible in current run mode: SMC_PMSTAT: 0x0"
It looks like the code in the kinetis_check_run_mode function reads the
SMC_PMSTAT register on the target device to check that it is in run mode. This
register does not exist on the earlier revision K20 device, so pmstat is always
0 and OpenOCD refuses to program the device.
I have attempted to use earlier versions of OpenOCD which don't have this
check, but they fail when trying to flash either device.
---
Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/openocd/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/openocd/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel