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] Nucleo-H563ZI Board not recognized #1384

Open
Nightwalker-87 opened this issue Apr 6, 2024 Discussed in #1381 · 17 comments
Open

[feature] Nucleo-H563ZI Board not recognized #1384

Nightwalker-87 opened this issue Apr 6, 2024 Discussed in #1381 · 17 comments

Comments

@Nightwalker-87
Copy link
Member

Discussed in #1381

Originally posted by DF4OR March 26, 2024
Hi.
Beginner here.
I have sucessfully used other boards (e.g. Nucleo-F091RC) with the current st-link utils on Linux. The Nucleo-H563ZI board in contrast is not properly recognized and cannot be programmed.

Output of lsusb
Bus 003 Device 017: ID 0483:374e STMicroelectronics STLINK-V3

Output of st-info --probe

  version:    V3J10
  serial:     003A001B3132511138363431
  flash:      0 (pagesize: 0)
  sram:       0
  chipid:     0x000
  dev-type:   unknown

Outout of st-info --version
v1.8.0

System

  • Arch Linux, kernel 6.8.1-arch1-1
  • stlink utils installed with pacman

Any idea what's going on?

TIA,
Ekki

@Nightwalker-87 Nightwalker-87 added this to the Longlist milestone Apr 6, 2024
@Nightwalker-87 Nightwalker-87 changed the title STM32 Nucleo-H563ZI Board not recognized [feature] Nucleo-H563ZI Board not recognized Apr 7, 2024
@muxelplexer
Copy link

I'd be very much interested in helping on this issue as i've been trying to setup my Nucleo-H563ZI through stlink myself. Would you have any clues/guidance what is missing for this board for someone who hasn't been too involved with the codebase yet? @Nightwalker-87

As far as i've seen it should only be the flash that is not being picked up correctly? Or is it actually the Stlink-3VPWR that is throwing it off?

@Nightwalker-87
Copy link
Member Author

@muxelplexer Thanks for the feedback. However I'm not really sure, if I can give any useful advice here, as I am not aware of the technical specifics of this board and how they relate to certain parts in the code base. One should know that there are coexisting older and newer parts of the st-link library, which derive from different ways of implementation. This has not fully been resolved yet and I don't know if/how this affects this issue in any kind.

@antoinh
Copy link

antoinh commented Jun 26, 2024

I'm also interested on getting this to work with STM32H5 series. One of the quick thing I notice is that the stm32H5 requires connection on access port 1 instead of the traditional port 0 when using SWD. There might be some other changes but that is certainly a point to start with these new chips.

In ST-LINK utility or STCubeProgrammer there is such an option but I don't see this option in the open source stlink.

See this thread from ST where the ST employee mentions the connection via port1. I can also see that stm32cube programmer does the switch automatically to port1:

https://community.st.com/t5/stm32cubeide-mcus/unable-to-flash-nucleo-h563zi-with-stm32cubeide-v1-14/m-p/618423/highlight/true#M22695

image

@ypearson-bdai
Copy link

Any news here?

@tonyh1988
Copy link

No, sorry I don't have time to investigate this further at the moment. I just thought I would comment my findings to help someone that might want to dive deeper into this eventually or maybe even myself if I want to dive deeper on this later

@tonyh1988
Copy link

That being said the stm32cube programmer command line interface is freely available and should in theory work with STM32H5. I will need to investigate this further until the open source stlink driver catch up with these newer MCUs.

@Nightwalker-87
Copy link
Member Author

We are still waiting for any constructive input here...

@c-grant
Copy link
Contributor

c-grant commented Dec 14, 2024

Just a thought here. When I had an H7 board I had to add all the Chip ID/Memory map stuff for the H7 processors. I did a quick look in the code and I didn't see anything in gdb-server.c for the H5.

@Nightwalker-87
Copy link
Member Author

As to my knowledge gdb-server.c should not be needed for chip or board recognition.

@Nightwalker-87
Copy link
Member Author

Nightwalker-87 commented Jan 8, 2025

I now have this hardware available for testing.
However, I need detailed instructions on how to reproduce this on linux, preferably Debian.

@Nightwalker-87 Nightwalker-87 self-assigned this Jan 8, 2025
@Nightwalker-87 Nightwalker-87 moved this from Ready to In progress in Release v1.8.1 Jan 8, 2025
@Nightwalker-87 Nightwalker-87 unpinned this issue Jan 8, 2025
@Nightwalker-87
Copy link
Member Author

Problem report from @DF4OR verified on Debian 6.12.6-1 (2024-12-21).

@Nightwalker-87
Copy link
Member Author

Nightwalker-87 commented Jan 11, 2025

I found this reference for the implementation within the openocd project, which may help resolving this issue here as well. Implementation obviously needs to go to /src/stlink-lib/usb.c. Further ideas are welcome.

@Nightwalker-87 Nightwalker-87 pinned this issue Jan 11, 2025
@Nightwalker-87
Copy link
Member Author

@Ant-ON: You contributed to this file earlier regarding hardware specific commands.
Any idea on where to and how to define the access port number?

@tonyh1988
Copy link

@Ant-ON: You contributed to this file earlier regarding hardware specific commands. Any idea on where to and how to define the access port number?

Access port is a JTAG feature. How you access it through the stlink library I unfortunately can't help you since I am unfamiliar with the code base.

You can find documentation here on the JTAG AP :

https://developer.arm.com/documentation/ihi0031/a/Common-Access-Port--AP--features?lang=en

You can also also go directly here on how to access the AP through JTAG or swd:

https://developer.arm.com/documentation/ihi0031/a/Overview-of-the-ARM-Debug-Interface-and-its-components/Accessing-Access-Ports?lang=en

@tonyh1988
Copy link

In your case I guess you could look at openocd documentation and try to find the correct commands to use a different access port.

@Nightwalker-87
Copy link
Member Author

Nightwalker-87 commented Jan 11, 2025

@tonyh1988: I'm not familiar with this part of the codebase either, that's why I asked for support with focus on previous authors / contributors.

@tonyh1988
Copy link

I understand, when I initially looked quickly into this this summer I concluded it was not a super quick fix. One would need to dive deeper and understand what the difference is with official st cube programmer. Since I was able to use the official st tools to program my device I moved on with my project and didn't look any further into this.

FYI @antoinh is a different account of mine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

No branches or pull requests

6 participants