Skip to content

Conversation

wdx04
Copy link

@wdx04 wdx04 commented Aug 31, 2025

Summary of changes

This PR adds new target DISCO_STM32H573I (STM32H573I-DK) and the following features for the STM32H5 family:
QSPI with DMA (read speed increased from 4MB/s without DMA to 39MB/s with [email protected])
OSPI with DMA (read speed increased from 4MB/s without DMA to 60MB/s with [email protected])
USB

Impact of changes

Mbed CE now officially supports DISCO_STM32H573I (STM32H573I-DK).
QSPI, OSPI and USB features for the STM32H5 family are enabled.
OSPI DMA is also enabled and tested on B-U585I-IOT02A and STM32L4R9I-DISCO.

Migration actions required

Documentation

No documentation at the moment.


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[X] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

greentea-log-h573.txt

The following tests FAILED:
21 - test-mbed-usb-device-basic (Failed)
22 - test-mbed-usb-device-hid (Failed)
101 - test-mbed-connectivity-netsocket-nanostack-dns (Failed)
104 - test-mbed-connectivity-netsocket-nanostack-tcp (Failed)
105 - test-mbed-connectivity-netsocket-lwipstack-tls (Failed)
106 - test-mbed-connectivity-netsocket-nanostack-tls (Failed)
108 - test-mbed-connectivity-netsocket-nanostack-udp (Failed)
109 - test-mbed-connectivity-network-emac (Failed)
111 - test-mbed-connectivity-netsocket-nanostack-network-interface (Failed)

Apart from the tests related to netsocket, I'm unable to pass 'usb-device-basic' and 'usb-device-hid' tests. On boards known to have good USB support, such as NUCLEO-F413ZH, these tests also failed. Maybe these tests require a specific version of libusb to be installed?


@JohnK1987
Copy link
Member

Would be cool to hold the content of PR around its original idea. The name of PR is about add a STM32H5 dev board but inside is a lot of fixes for DMA and XSPI.

The 'usb-device-basic' is failing with every STM32 target and usually it was caused by a Endpoint Abort part, if I remember.
For usb-device-hid try to look for readme in USB driver folder and missing python modules.

@wdx04
Copy link
Author

wdx04 commented Sep 3, 2025

Would be cool to hold the content of PR around its original idea. The name of PR is about add a STM32H5 dev board but inside is a lot of fixes for DMA and XSPI.

The 'usb-device-basic' is failing with every STM32 target and usually it was caused by a Endpoint Abort part, if I remember. For usb-device-hid try to look for readme in USB driver folder and missing python modules.

No other STM32 board has actually used XSPI yet. I'm adding it here mainly to provide a complete featureset for this new target, while not breaking existing boards.

@JohnK1987
Copy link
Member

Ah, ok, my bad.

I did the GT test of USBHID with Nucleo-H563ZI and it pass - #437 (comment)

@wdx04
Copy link
Author

wdx04 commented Sep 6, 2025

I did the GT test of USBHID with Nucleo-H563ZI and it pass - #437 (comment)

I have already installed hidapi 0.14.0.post2, so that is not the issue.

The error message of the USB HID test is:

22: [+969ms][CONN][RXD] >>> Running case #2: 'Configuration descriptor, keyboard'...
22: [+980ms][CONN][INF] found KV pair in stream: {{__testcase_start;Configuration descriptor, keyboard}}, queued...
22: [+991ms][CONN][INF] found KV pair in stream: {{test_get_desc_cfg;0}}, queued...
22: [+3119ms][HTST][INF] TEST ERROR: Failed with "The device has no langid (permission issue, no string descriptors supported or device error)". Tried 20 times.

For the USB basic test, the error message is:

21: [+536ms][CONN][RXD] >>> Running case #1: 'usb control basic test'...
21: [+536ms][CONN][INF] found KV pair in stream: {{__testcase_start;usb control basic test}}, queued...
21: [+827ms][CONN][INF] found KV pair in stream: {{control_basic_test;0123456789 3368 517}}, queued...
21: <<< get_set_configuration_test >>>
21: [+1569ms][HTST][INF] TEST FAILED: Operation not supported or unimplemented on this platform

Both of these errors are related to pyusb.

@JohnK1987
Copy link
Member

My setup is

  • pyusb-1.3.1
  • hidapi-0.14.0.post2
  • libusb0-1.4.0 (installed over Zidag with Mbed configs)

Copy link
Collaborator

@multiplemonomials multiplemonomials left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK reviewed the first half of the change (up through USBPhy_STM32.cpp)!

Copy link
Collaborator

@multiplemonomials multiplemonomials left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still reviewing, not done yet but more comments!

moved all linker scripts of STM32H5 to the linker_scripts folder
fixed issues found in the review
Copy link
Collaborator

@multiplemonomials multiplemonomials left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this! Looks good, just a few last tiny things.

@multiplemonomials multiplemonomials merged commit 9048a88 into mbed-ce:master Sep 16, 2025
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants