How can I use the STM32CubeProgrammer windows executable to read a memory area without the device resetting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-10 3:48 AM
I have been trying to read a memory area as follows on windows power shell:
.\STM32_Programmer_CLI.exe -c port=SWD -r8 0x08080000 8 -r8 0x08080C00 8
but that triggers a reset of the device. I do not want a device reset, I just want to read the memory as specified. How to do that?
Solved! Go to Solution.
- Labels:
-
STM32CubeProgrammer
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-10 4:12 AM
This
should result in debugger connecting without reset. There should be a counterpart to this in the CLI too.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-10 4:12 AM
This
should result in debugger connecting without reset. There should be a counterpart to this in the CLI too.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-10 4:15 AM
I tried that, but when I use the mode HOTPLUG I get incorrect results! The application returns bytes that are incorrect!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-10 4:18 AM
I asked for 8 bytes at two different addresses and when using HOTPLUG I got the results swapped (checked with GUI application). now it seems to be working. I have the feeling I cannot rely on these tools. What can I do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-10 4:45 AM
If you can reproduce inconsistent or wrong reads, please post a bug report here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-10 4:48 AM
> I asked for 8 bytes at two different addresses and when using HOTPLUG I got the results swapped (checked with GUI application).
Show.
Also, try to read out a known piece of ROM memory, e.g. the device ID or Unique ID, and compare to expected values, and/or readout under reset.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-10 5:12 AM
I also noticed something else: I just did this command:
.\STM32_Programmer_CLI.exe -c port=SWD -w8 0x08080000 0xAA 0x00 0x00 0x00 0x00 0x00 -w8 0x08080C00 0x00 0x00 0x00 0x00 0x00 0x00 -v
to write some bytes, and this command did NOT trigger a reset. I thought with "mode=Normal" it is resetting?
I just connected with the GUI version and disconnected, and that did trigger a reset. Maybe the version (2.12.0) I am using on the CLI has bugs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-10 5:20 AM
Example of incorrect results: Is that flag AE now on 0x08080000 or on 0x08080C00? Which output is the correct one?
PS C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> .\STM32_Programmer_CLI.exe -c port=SWD mode=NORMAL -r8 0x08080000 8 -r8 0x08080C00 8
-------------------------------------------------------------------
STM32CubeProgrammer v2.12.0
-------------------------------------------------------------------
ST-LINK SN : 53FF6E065056705437210781
ST-LINK FW : V2J29S7
Board : --
Voltage : 3.24V
SWD freq : 4000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x447
Revision ID : Rev Z
Device name : STM32L07x/L08x/L010
Flash size : 128 KBytes
Device type : MCU
Device CPU : Cortex-M0+
BL Version : 0xB2
0x08080000 : 00 00 00 00 AE 00 00 00
0x08080C00 : 00 00 00 00 00 00 00 00
PS C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> .\STM32_Programmer_CLI.exe -c port=SWD mode=HOTPLUG -r8 0x08080000 8 -r8 0x08080C00 8
-------------------------------------------------------------------
STM32CubeProgrammer v2.12.0
-------------------------------------------------------------------
ST-LINK SN : 53FF6E065056705437210781
ST-LINK FW : V2J29S7
Board : --
Voltage : 3.24V
SWD freq : 4000 KHz
Connect mode: Hot Plug
Reset mode : Software reset
Device ID : 0x447
Revision ID : Rev Z
Device name : STM32L07x/L08x/L010
Flash size : 128 KBytes
Device type : MCU
Device CPU : Cortex-M0+
BL Version : 0xB2
0x08080000 : 00 00 00 00 00 00 00 00
0x08080C00 : 00 00 00 00 AE 00 00 00
PS C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> .\STM32_Programmer_CLI.exe -c port=SWD mode=NORMAL -r8 0x08080000 8 -r8 0x08080C00 8
-------------------------------------------------------------------
STM32CubeProgrammer v2.12.0
-------------------------------------------------------------------
ST-LINK SN : 53FF6E065056705437210781
ST-LINK FW : V2J29S7
Board : --
Voltage : 3.24V
SWD freq : 4000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x447
Revision ID : Rev Z
Device name : STM32L07x/L08x/L010
Flash size : 128 KBytes
Device type : MCU
Device CPU : Cortex-M0+
BL Version : 0xB2
0x08080000 : 00 00 00 00 AE 00 00 00
0x08080C00 : 00 00 00 00 00 00 00 00
PS C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> .\STM32_Programmer_CLI.exe -c port=SWD mode=HOTPLUG -r8 0x08080000 8 -r8 0x08080C00 8
-------------------------------------------------------------------
STM32CubeProgrammer v2.12.0
-------------------------------------------------------------------
ST-LINK SN : 53FF6E065056705437210781
ST-LINK FW : V2J29S7
Board : --
Voltage : 3.24V
SWD freq : 4000 KHz
Connect mode: Hot Plug
Reset mode : Software reset
Device ID : 0x447
Revision ID : Rev Z
Device name : STM32L07x/L08x/L010
Flash size : 128 KBytes
Device type : MCU
Device CPU : Cortex-M0+
BL Version : 0xB2
0x08080000 : 00 00 00 00 00 00 00 00
0x08080C00 : 00 00 00 00 AE 00 00 00
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-10 5:29 AM
Just opened a bug report. Something is definitively not correct with the STM32CubeProgrammer application!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-15 2:40 AM
Hello @ADiet.1​,
I can't reproduce the issue you're facing for now. However, could you please share the trace for the following CLI instructions ? Erasing the flash might change things depending on the application you're running. If this is the case, I will provide further details on what is happening.
>STM32_Programmer_CLI.exe -c port=SWD -e all
>STM32_Programmer_CLI.exe -c port=SWD mode=NORMAL -r8 0x08080000 8 -r8 0x08080C00 8
>STM32_Programmer_CLI.exe -c port=SWD mode=HOTPLUG -r8 0x08080000 8 -r8 0x08080C00 8
Your feedback will be very helpful.
Thanks,
Aziz
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
