2024-06-28 02:53 PM
Hi ,
While exploring flashloader macro using IAR IDE to update Option bytes , I programmed FLASH_OPTR register with Readout Protection level 1.
Since then I am not able to communicate to device using STLink and following is the error
Is there anyway I can establish communication with device using debugger to rewrite the readout protection level bit to level 0. Please share your thoughts.
Regards,
Hareesha
Solved! Go to Solution.
2024-07-01 10:30 AM
Hi All,
I am using customized Hardware for my development. I am able to establish communication with my device using debugger. Followed following steps-based info provided above by forum folks.
1. Pulled PH3-BOOT0 pin high to boot from bootloader
2. Connected to my target board using UART interface as follows
3. Followed steps mentioned in forum to disable Security Zone (TZONE)
Security:How to disable TrustZone in STM32L5xx devices during development phase - stm32mcu
Thank you all for your support.
Regards,
Hareesha
2024-06-28 05:27 PM - edited 2024-06-28 05:48 PM
From AN4758:
The appnote talks about L4+, but the same principle applies across families.
If you can connect to your board with STM32CubeProgrammer, it has a dedicated screen for modifying options bytes. Reset the RDP option byte to level 0, wait for the chip to fully erase, and you should be ok.
If you can't connect over ST-Link, all may not be lost. All STM32 chips by default have a built-in bootloader (See AN2606 for details). You can try to activate this built-in STM32 bootloader. STM32CubeProgrammer can then connect to the board over USB or UART, and modify the Option Byte over that connection.
Untested Instructions (for connecting via bootloader):
1. Download and install STM32CubeProgrammer.
2. Connect a USB cable to your board.
3. Get into bootloader mode. If you have such buttons (most eval boards do), you do this by holding nRST+BOOT0 buttons, and then releasing the nRST button, wait a moment, then release the BOOT0 button. You should now be in bootloader mode, and the board should show up on your system as a USB-DFU device.
4. Open STM32CubeProgrammer. Connect to the board by seting the connection type to "USB" and clicking connect.
5. Once connected, go to the "OB" pane (The "Option Bytes" pane), and reset the RDP option byte to level 0.
Wait until the process completes.
6. Your board should now be functional again.
Good luck.
Update:
for good measure, read this official ST thread
2024-06-28 10:42 PM
v2.10 is little old for U5
2024-06-29 02:41 AM
> v2.10 is little old for U5
but is supported.
2024-07-01 10:30 AM
Hi All,
I am using customized Hardware for my development. I am able to establish communication with my device using debugger. Followed following steps-based info provided above by forum folks.
1. Pulled PH3-BOOT0 pin high to boot from bootloader
2. Connected to my target board using UART interface as follows
3. Followed steps mentioned in forum to disable Security Zone (TZONE)
Security:How to disable TrustZone in STM32L5xx devices during development phase - stm32mcu
Thank you all for your support.
Regards,
Hareesha
2024-07-01 10:37 AM - edited 2024-07-01 10:37 AM
Well, I'm glad someone got accepted as solution.
Also helpful that you waited to mention you've previously enabled TrustZone (It's disabled by default) until your final post. Good work.:thumbs_up: