Hi *,
I am using MCU_Link and openocd to flash mkv31f devices. I've noticed that after I perform a mass erase the value of SIM_SDID is 0.
I read this value using the debugger and openocd.
If the chip has a valid image, the expected value is read back.
Is this the expected behavior? Isn't this register read only?
[Update 2024-05-27]:
When I run the command dap info from open ocd I get the answer:
AP ID register 0x24770011
Type is MEM-AP AHB3
MEM-AP BASE 0xe00ff003
Valid ROM table present
Component base address 0xe00ff000
Can't read component, the corresponding core might be turned off
Hi @bm31416 ,
I test your issue using an FRDM-KV31F and the value of the SIM_SDID isn't 0, the way I test it is the following:
Use the erase flash action that MCUXpresso have (I use PEMicro because of the bootloader please check which one do you have)
Once the flash is erased use the Attach to running target option.
With this you should be able to see the memory via MCUXpresso even though the flash is empty.
Search the SIM_SDID with the address of the Reference Manual
Knowing that I was using an MKV31F512 the lasts bits match the register of the SIM_SDID
0011 0001 0110 or 316
Try this method.
Hope it help you!
Hi @bm31416 ,
There is no log file of the reading process because this a tool that is directly on MCUXpresso but I can share you the erase log file, I'm using P&E so this log file may change.
Executing flash operation 'Erase' (Erase flash) - Wed Jun 05 09:51:24 CST 2024
Checking MCU info...
Scanning for targets...
Executing flash action...
P&E GDB Server for Arm(R) devices, Version 9.45.00.00
Copyright 2018, P&E Microcomputer Systems Inc, All rights reserved
Loading library C:\nxp\MCUXpressoIDE_11.9.1_2170\ide\plugins\com.pemicro.debug.gdbjtag.pne_5.7.8.202404031741\win32\gdi\unit_ngs_arm_internal.dll ... Done.
Command line arguments: -device=NXP_KVx_KV31F512M12 -startserver -singlesession -serverport=7225 -gdbmiport=6225 -interface=OPENSDA -speed=5000 -port=USB1 -streamingport=10224 -configfile=C:/workspace/MCUXpresso11.9.1/.metadata/.plugins/com.pemicro.debug.gdbjtag.pne/config.ini -programmingtype=3 -flashobjectfile=C:\workspace\MCUXpresso11.9.1\frdmkv31f_led_blinky_aaaaah\Debug\frdmkv31f_led_blinky_aaaaah.axf -quitafterprogramming
Config file selected: C:/workspace/MCUXpresso11.9.1/.metadata/.plugins/com.pemicro.debug.gdbjtag.pne/config.ini
Device selected is NXP_KVx_KV31F512M12
User Specified Hardware Selection : Interface=OPENSDA and Port=USB1
Connecting to target.
Unable to load libusb0.dll
OpenSDA detected - Flash Version 1.18
Device is NXP_KVx_KV31F512M12.
Mode is In-Circuit Debug.
(C)opyright 2012, P&E Microcomputer Systems, Inc. (www.pemicro.com)
API version is 101
TARGET XML PATH is C:\nxp\MCUXpressoIDE_11.9.1_2170\ide\plugins\com.pemicro.debug.gdbjtag.pne_5.7.8.202404031741\supportFiles_ARM\target_v7m_vfp.xml
Server 1 running on 127.0.0.1:7225
Server 2 running on 127.0.0.1:7227
Server 3 running on 127.0.0.1:7229
Server 4 running on 127.0.0.1:7231
Server 5 running on 127.0.0.1:7233
Server 6 running on 127.0.0.1:7235
Server 7 running on 127.0.0.1:7237
Server 8 running on 127.0.0.1:7239
Server 9 running on 127.0.0.1:7241
Server 10 running on 127.0.0.1:7243
Server 11 running on 127.0.0.1:6225
Unable to load libusb0.dll
Copyright 2024 P&E Microcomputer Systems,Inc.
Command Line :C:\nxp\MCUXpressoIDE_11.9.1_2170\ide\plugins\com.pemicro.debug.gdbjtag.pne_5.7.8.202404031741\win32\pegdbserver_console -device=NXP_KVx_KV31F512M12 -startserver -singlesession -serverport=7225 -gdbmiport=6225 -interface=OPENSDA -speed=5000 Ð
OpenSDA detected - Flash Version 1.18
CMD>RE
Initializing.
Target has been RESET and is active.
CMD>CM C:\nxp\MCUXpressoIDE_11.9.1_2170\ide\plugins\com.pemicro.debug.gdbjtag.pne_5.7.8.202404031741\supportFiles_ARM\NXP\KVx\freescale_kv31f512m12_1x32x128k_pflash.arp
Initializing.
Initialized.
;version 1.06, 05/18/2017, Copyright 2017 P&E Microcomputer Systems, Inc. All rights reserved. www.pemicro.com [kv_31f512_n_pflash]
;device freescale, kv31f512m12, 1x32x128k, desc=pflash
;begin_cs device=$00000000, length=$00080000, ram=$20000000
Loading programming algorithm ...
Inaccessible blocks ...
block 0007E000-0007FFFF : Flash Access Control Enabled
Programming sequency is : erase only
CMD>EO
Erasing ranges ...
Range 00000000-00001FFF
Erased successfully.
CMD>RE
Initializing.
Target has been RESET and is active.
All Servers Running
Target Disconnected.
There is a chance where you can try to read the SIM_SDID in the way I explain before? this in order to narrow more what could be the issue.