2023-03-10 03: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.
2023-03-15 03:25 AM
Here is the output:
PS C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> ./STM32_Programmer_CLI.exe -c port=SWD -e all
-------------------------------------------------------------------
STM32CubeProgrammer v2.13.0
-------------------------------------------------------------------
ST-LINK SN : 53FF71065056705420540981
ST-LINK FW : V2J29S7
Board : --
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
Mass erase ...
Mass erase successfully achieved
PS C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> ./STM32_Programmer_CLI.exe -c port=SWD mode=NORMAL -r8 0x08080000 8 -r8 0x08080C00 8
-------------------------------------------------------------------
STM32CubeProgrammer v2.13.0
-------------------------------------------------------------------
ST-LINK SN : 53FF71065056705420540981
ST-LINK FW : V2J29S7
Board : --
Voltage : 3.21V
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 00 00 00 00
0x08080C00 : 00 00 00 00 00 00 00 00
PS C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> ./STM32_Programmer_CLI.exe -c port=SWD mode=HOTPLUG -r8 0x08080000 8 -r8 0x08080C00 8
-------------------------------------------------------------------
STM32CubeProgrammer v2.13.0
-------------------------------------------------------------------
ST-LINK SN : 53FF71065056705420540981
ST-LINK FW : V2J29S7
Board : --
Voltage : 3.20V
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 00 00 00 00
2023-03-15 04:36 AM
My guess is that this is related to the dual-bank operation and its related flags (UFB maybe?).
With hot-plug, the running program may switch the mapping without knowledge of the programmer, and then it's always questionable, how far the programmer/debugger should force its settings to the application.
JW
2023-03-15 06:13 AM
Thanks for sharing @ADiet.1 !
Now with the flash erased, try to write data in EEPROM (starting from 0x08080000), and verify if the issue persists (you can use the -w32 option via CLI)
Then, visualize the EEPROM data, you will find that the same data is displayed in both modes(Hotplug and Normal)
Do you confirm this ?
2023-03-21 09:33 AM
Hello, here is the output:
PS C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> ./STM32_Programmer_CLI.exe -c port=SWD mode=NORMAL -r8 0x08080000 8 -r8 0x08080C00 8
-------------------------------------------------------------------
STM32CubeProgrammer v2.13.0
-------------------------------------------------------------------
ST-LINK SN : 53FF6E065056705437210781
ST-LINK FW : V2J29S7
Board : --
Voltage : 3.23V
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 00 00 00 00
0x08080C00 : 00 00 00 00 00 00 00 00
PS C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> ./STM32_Programmer_CLI.exe -c port=SWD mode=HOTPLUG -r8 0x08080000 8 -r8 0x08080C00 8
-------------------------------------------------------------------
STM32CubeProgrammer v2.13.0
-------------------------------------------------------------------
ST-LINK SN : 53FF6E065056705437210781
ST-LINK FW : V2J29S7
Board : --
Voltage : 3.23V
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 00 00 00 00
2023-03-21 09:47 AM
Would perhaps help not to carry multiple duplicate threads?
https://community.st.com/s/question/0D53W00002B9rrzSAB/how-to-write-bytes-to-flash-without-restart
2023-03-21 10:52 PM
Yes that is right! Feel free to close this thread. I do not see that I can do it
2023-03-22 01:46 AM
Hello @ADiet.1 ,
The output you shared is similar to the previous one (first words of EEPROM1 and EEPROM2 are empty).
=> This doesn't show the inconsistent reads you are getting.
Please run the following CLI instructions with the flash erased and share the full log in an attached text file :
>STM32_Programmer_CLI -c port=SWD -blankcheck
>STM32_Programmer_CLI -c port=SWD -w32 0x08080000 0xAAAAAAAA
>STM32_Programmer_CLI -c port=SWD -w32 0x08080C00 0xBBBBBBBB
>STM32_Programmer_CLI -c port=SWD mode=NORMAL -r8 0x08080000 8 -r8 0x08080C00 8
>STM32_Programmer_CLI -c port=SWD mode=HOTPLUG -r8 0x08080000 8 -r8 0x08080C00 8
Thanks,
Aziz
2023-03-22 02:39 AM
I guess the inconsistency is another ticket.
2023-03-22 02:54 AM
Hi @ADiet.1 ,
I mean the issue you talked about here on this post:
Aziz
2023-03-22 02:57 AM
Maybe what I mean is the following:
Checking the flag BFB2 on UI and command line gives inconsistent results! I have no idea to know which one is correct!