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

Fixed support for STM32U5 chips #1355

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

marcelobarrosufu
Copy link
Contributor

I have been using the stm32U535 and I was getting an error when trying to write or erase parts of the flash with the st-flash.exe program. Analyzing the code I noticed that:

  1. There was only support for chip ID 0x482. I added the others with the appropriate flash/ram specs.

0x455: STM32U535/545
0x476: STM32U5Fx/5Gx
0x481: STM32U59x/5Ax
0x482: STM32U575/585

  1. It was not possible to delete a page from the flash because the original test was based only on the STM32L5x2xx (with one or two banks and 2k pages) while the U5 family has 8k pages and two banks.

As this is my first contribution I'm not sure if the way I solved the problems was the best. I remain at your disposal for further clarification.

@rcubee
Copy link
Contributor

rcubee commented Nov 14, 2023

Shouldn't flags none inside the .chip files be set to flags swo dualbank?

@marcelobarrosufu
Copy link
Contributor Author

marcelobarrosufu commented Nov 14, 2023

I didn't know that was one of the uses. If this is the recommendation, it might be interesting to make the code clearer. Any tips for filling out the rest of the file? I believe the option bytes region is missing too. I saw that these flags are not used when deleting a sector, for example. It would be simpler, especially to deal with the variety that exists between U5, L5 and F5.

@Nightwalker-87 Nightwalker-87 changed the title Fixing support for U5 chips (original U5x5.chip was not handling U5 chips) Fixing support for U5 chips Nov 23, 2023
@Nightwalker-87 Nightwalker-87 changed the title Fixing support for U5 chips Fixing support for STM32U5 chips Nov 23, 2023
@Nightwalker-87 Nightwalker-87 changed the title Fixing support for STM32U5 chips Fixed support for STM32U5 chips Nov 23, 2023
@Nightwalker-87 Nightwalker-87 merged commit 509d60e into stlink-org:develop Nov 23, 2023
10 checks passed
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Nov 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

STM32U575: Verification of flash failed at offset: 0
4 participants