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] Added support for STLINK-V3PWR #1389

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

Sazerac4
Copy link
Contributor

I propose the integration of stlink-V3PWR.
I'm not sure about the name : STLINK_USB_PID_STLINK_V3P

This PR is a follow-up to #1388

@Nightwalker-87
Copy link
Member

@florrant Is this version verified to be functional with the related device, or is this contribution yet incomplete?
I am not able to test this without the respective hardware.

@Sazerac4
Copy link
Contributor Author

I got the "stlink-v3pwr" and this patch allow me to flash my programs:

  • st-flash --reset --format=ihex write ./program.hex
st-flash 1.8.0-17-g1e41e0e
2024-04-26T11:32:29 INFO common.c: STM32L47x_L48x: 96 KiB SRAM, 1024 KiB flash in at least 2 KiB pages.
2024-04-26T11:32:29 INFO common_flash.c: Attempting to write 62000 (0xf230) bytes to stm32 address: 134283264 (0x8010000)
EraseFlash - Page:0x20 Size:0x800 -> Flash page at 0x8010000 erased (size: 0x800)
...
EraseFlash - Page:0x3b Size:0x800 -> Flash page at 0x801d800 erased (size: 0x800)
EraseFlash - Page:0x3c Size:0x800 -> Flash page at 0x801e000 erased (size: 0x800)
EraseFlash - Page:0x3d Size:0x800 -> Flash page at 0x801e800 erased (size: 0x800)
EraseFlash - Page:0x3e Size:0x800 -> Flash page at 0x801f000 erased (size: 0x800)

2024-04-26T11:32:30 INFO flash_loader.c: Starting Flash write for F2/F4/F7/L4
2024-04-26T11:32:30 INFO flash_loader.c: Successfully loaded flash loader in sram
2024-04-26T11:32:30 INFO flash_loader.c: Clear DFSR
2024-04-26T11:32:31 INFO common_flash.c: Starting verification of write complete
2024-04-26T11:32:31 INFO common_flash.c: Flash written and verified! jolly good!
2024-04-26T11:32:31 INFO common.c: Go to Thumb mode
  • st-info --probe show this too :
Found 1 stlink programmers
  version:    V4J5
  serial:     003A002A343251XXXXXXXXXX
  flash:      1048576 (pagesize: 2048)
  sram:       98304
  chipid:     0x415
  dev-type:   STM32L47x_L48x

It is work with a STM32U575 too :

  • st-flash --reset --format=ihex write *.hex
st-flash 1.8.0-17-g1e41e0e
2024-04-26T11:42:59 INFO common.c: STM32U575_U585: 786 KiB SRAM, 1024 KiB flash in at least 8 KiB pages.
2024-04-26T11:42:59 INFO common_flash.c: Attempting to write 94128 (0x16fb0) bytes to stm32 address: 134217728 (0x8000000)
-> Flash page at 0x8000000 erased (size: 0x2000)
...
-> Flash page at 0x8012000 erased (size: 0x2000)
-> Flash page at 0x8014000 erased (size: 0x2000)
-> Flash page at 0x8016000 erased (size: 0x2000)

2024-04-26T11:42:59 INFO flash_loader.c: Starting Flash write for WB/G0/G4/L5/U5/H5/C0
  1/11  pages written
...
  8/11  pages written
  9/11  pages written
 10/11  pages written
 11/11  pages written

2024-04-26T11:43:03 INFO common_flash.c: Starting verification of write complete
2024-04-26T11:43:04 INFO common_flash.c: Flash written and verified! jolly good!
  • st-info --probe :
Found 1 stlink programmers
  version:    V4J5
  serial:     003A002A343251XXXXXXXXXX
  flash:      1048576 (pagesize: 8192)
  sram:       804864
  chipid:     0x482
  dev-type:   STM32U575_U585

I don't plan to change anything else, unless you think I forgot something.

@Nightwalker-87 Nightwalker-87 self-requested a review April 26, 2024 16:58
@Nightwalker-87 Nightwalker-87 added this to the v1.8.1 milestone Apr 26, 2024
@Nightwalker-87 Nightwalker-87 changed the title [Feature] Add support for stlink-v3pwr [feature] Added support for stlink-v3pwr Apr 26, 2024
@Nightwalker-87 Nightwalker-87 changed the title [feature] Added support for stlink-v3pwr [feature] Added support for STLINK-V3PWR Apr 26, 2024
@Nightwalker-87 Nightwalker-87 merged commit 765ebda into stlink-org:testing Apr 26, 2024
10 checks passed
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[STM32L471RG]: STLINKV3 : can't flash the device. Programmer not supported ?
2 participants