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 STM32U5-series #1096

Closed
5 tasks done
Nightwalker-87 opened this issue Mar 6, 2021 · 10 comments · Fixed by #1300
Closed
5 tasks done

[feature] Support for STM32U5-series #1096

Nightwalker-87 opened this issue Mar 6, 2021 · 10 comments · Fixed by #1300

Comments

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Mar 6, 2021

Currently the U5 family is not supported.

  • Programmer/board type: STlink/v2, STlink/v2-onboard, STlink/v3
  • Operating system: Linux, Mac OS X, Windows (with specific version)
  • Stlink tools version and/or git commit hash: v1.6.1
  • Stlink commandline tool name: st-info, st-flash, st-util
  • Target chip (and optional board): STM32U5-series
@Nightwalker-87 Nightwalker-87 added this to the v1.6.3 milestone Mar 6, 2021
@tarek-bochkati
Copy link
Collaborator

what does this mean ? I'm not aware of such thing !

The only real issue is that the WL55 and H7 have the same core_id

@Nightwalker-87
Copy link
Member Author

Nightwalker-87 commented Mar 6, 2021

There were unintended leftovers from another ticket which served as a template by mistake. I've removed it. Thanks for the note.
The U5 series has been announced by ST recently: https://www.st.com/en/microcontrollers-microprocessors/stm32u5-series.html

@tarek-bochkati
Copy link
Collaborator

indeed, I already added support of this device in OpenOCD
http://openocd.zylin.com/#/c/6108/
the flash delta's are in the commit msg ...

@Nightwalker-87
Copy link
Member Author

Nightwalker-87 commented Mar 26, 2021

Just copied the content to have it here directly:

Author: Tarek BOCHKATI
AuthorDate: 2021-03-16 16:10:59 +0100

flash/stm32l4x: add support of STM32U57x/U58x

this device flash registers are quite similar to STM32L5 with this changes :

  • flash size is up to 2MB
  • 2MB variants are always dual bank
  • 1MB and 512KB variants could be dual bank (contiguous addressing) depending on DUALBANK bit(21)
  • flash data width is 16 bytes (quad-word)

@Nightwalker-87 Nightwalker-87 modified the milestones: v1.8.0, v1.7.1 Apr 25, 2021
@Nightwalker-87
Copy link
Member Author

Related to #1005.

@Nightwalker-87
Copy link
Member Author

A first contribution to this topic is a (preliminary) chip-id file for the STM32U5 series in branch chipid_cleanup.

@dhollos
Copy link

dhollos commented May 13, 2022

Hi, is there any update on this? The device seems to be still unsupported..

Failed to parse flash type or unrecognized flash type
2022-05-13T13:44:04 WARN usb.c: skipping ST device : 0x483:0x5740)
Failed to enter SWD mode
Found 1 stlink programmers
  version:    V3
  serial:     0040001A3438510D34313939
  flash:      0 (pagesize: 0)
  sram:       0
  chipid:     0x000

detected chip_id parametres

# Device Type: unknown
# Reference Manual: RM0000
#
chip_id 0x0
flash_type 0
flash_size_reg 0x0
flash_pagesize 0x0
sram_size 0x0
bootrom_base 0x0
bootrom_size 0x0
option_base 0x0
option_size 0x0
flags 0

  dev-type:   unknown

$ st-flash --version
v1.7.0-186-gc4762e6

@Nightwalker-87 Nightwalker-87 removed their assignment Oct 23, 2022
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.7.1, Longlist Oct 23, 2022
@Nightwalker-87 Nightwalker-87 self-assigned this Jan 1, 2023
@Nightwalker-87 Nightwalker-87 modified the milestones: Longlist, v1.7.1 Jan 1, 2023
@Nightwalker-87
Copy link
Member Author

@tarek-bochkati:
The .chip config-file for the STM32U5 series, holding all device-specific configuration, is now complete.
It will be pushed to our nightly branch very soon to allow for a review.
We also seem to have most of the library functions for handling this device type.
Many of them appear to be equal or similar to the STM32L5 series.
However we now need additional know-how and contribution to address this issue...

Nightwalker-87 added a commit that referenced this issue Jan 1, 2023
@Nightwalker-87
Copy link
Member Author

We need people to test the changes and relevant features.

@Nightwalker-87
Copy link
Member Author

Hello everybody.
Getting in touch with staff on the ST-Microelectronics booth at the Embedded World 2023 resulted in a Nucleo STM32U575ZI-Q board as a give-away. 🎉
Of course one of the first subsequent ideas was to proceed here, now being able to do some testing myself.
I managed to get the board working with the toolset after fixing a wrong setting in the related chip-id file. Finally here is the result I get:

st-info --probe
Found 1 stlink programmers
  version:    V3J10
  serial:     001500093656501620363341
  flash:      2097152 (pagesize: 8192)
  sram:       804864
  chipid:     0x482
  dev-type:   STM32U5x5
st-flash write .../test.bin 0x8000000
st-flash 1.7.0-253-g186e38a
2023-03-19T00:02:52 INFO common.c: STM32U5x5: 786 KiB SRAM, 2048 KiB flash in at least 8 KiB pages.
file .../test.bin md5 checksum: 5761fe3885e985c3021dd8aceb38db9, stlink checksum: 0x00f78dcc
2023-03-19T00:02:52 INFO common_flash.c: Attempting to write 65536 (0x10000) bytes to stm32 address: 134217728 (0x8000000)
-> Flash page at 0x8000000 erased (size: 0x2000)
-> Flash page at 0x8002000 erased (size: 0x2000)
-> Flash page at 0x8004000 erased (size: 0x2000)
-> Flash page at 0x8006000 erased (size: 0x2000)
-> Flash page at 0x8008000 erased (size: 0x2000)
-> Flash page at 0x800a000 erased (size: 0x2000)
-> Flash page at 0x800c000 erased (size: 0x2000)
-> Flash page at 0x800e000 erased (size: 0x2000)

2023-03-19T00:02:52 INFO flashloader.c: Starting Flash write for WB/G0/G4/L5/U5
  8/  8 pages written
2023-03-19T00:02:58 INFO common_flash.c: Starting verification of write complete
2023-03-19T00:02:58 INFO common_flash.c: Flash written and verified! jolly good!

So maybe there will also be some progress at #1005 soon, as both MCU families do share some settings.

@Nightwalker-87 Nightwalker-87 unpinned this issue Mar 19, 2023
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.