Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Support for setting option bytes to STM32L41x_L42x (according to RM0394) #1413

Conversation

ankurraji
Copy link
Contributor

@ankurraji ankurraji commented Jul 10, 2024

Hi,

I have made a feature request recently (#1412). This pull request adds support for STM32L41x_L42x to set and read option bytes.

I have tested the same with STLink V2 and V3 set on STM32L41x_L42x , and I was able to set/read the option bytes.

Some log flies if required

tester-pi@raspberry:~/Documents/stlink-1.8.0 $ st-flash --area=option read
st-flash 1.8.0
2024-07-10T08:35:19 INFO common.c: STM32L41x_L42x: 40 KiB SRAM, 64 KiB flash in at least 2 KiB pages.
fffff8aa


tester-pi@raspberry:~/Documents/stlink-1.8.0 $ st-flash --area=option write 0xfffff8bb
st-flash 1.8.0
2024-07-10T08:35:22 INFO common.c: STM32L41x_L42x: 40 KiB SRAM, 64 KiB flash in at least 2 KiB pages.
2024-07-10T08:35:22 WARN option_bytes.c: About to write option byte 0xfffff8bb to 0x1fff7800.
2024-07-10T08:35:22 WARN option_bytes.c: Writing option bytes 0xfffff8bb
2024-07-10T08:35:22 INFO option_bytes.c: Wrote 4 option bytes to 0x1fff7800!
2024-07-10T08:35:22 INFO common.c: Go to Thumb mode


tester-pi@raspberry:~/Documents/stlink-1.8.0 $ st-flash --area=option read
st-flash 1.8.0
2024-07-10T08:35:24 INFO common.c: STM32L41x_L42x: 40 KiB SRAM, 64 KiB flash in at least 2 KiB pages.
fffff8bb

Thanks ❤️

(Closes #1405) (Closes #1412)

@Nightwalker-87 Nightwalker-87 linked an issue Jul 13, 2024 that may be closed by this pull request
6 tasks
@Nightwalker-87 Nightwalker-87 changed the title Improve : added base address and size according to RM0394 [feature] Support for setting option bytes to STM32L41x_L42x (according to RM0394) Jul 13, 2024
@ankurraji
Copy link
Contributor Author

Thanks for the approve and edits 👍

@Nightwalker-87 Nightwalker-87 merged commit d7103ff into stlink-org:testing Jul 17, 2024
10 checks passed
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Jul 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
2 participants