STM32N6570-DK intermittent black screen during inference on macOS when powered through USB hub
I am facing an intermittent issue with the STM32N6570-DK when using it with macOS.
Setup
-
Board: STM32N6570-DK
-
Host: MacBook Pro
-
STM32CubeProgrammer: v2.23.0
-
Connection: USB-C hub with USB-A ports ( I am currently using the following USB hub: https://amzn.in/d/02O7R7zS)
-
One USB-A port is connected to the STM32N6570-DK USB1 USB-C port
-
Another USB-A port is connected to the STM32N6570-DK ST-LINK USB-C port
-
-
Application: AI inference application using the onboard display and USB communication to stream data back to the host
-
Initially, JP2 was configured on pins 1–2 (5V_STLK).
Issue
When using a direct USB-C-to-USB-C connection on Windows, I do not encounter this issue.However, on macOS, a direct USB-C-to-USB-C connection results in DEV_USB_COMM_ERR. Based on a suggestion from a related ST Community discussion (
ST-LINK stuck in DEV_USB_COMM_ERR until USB replug after connecting with no target | Community
),
Also, we found out that a known issue/ limitation regarding this (USB interoperability issue in macOS) has been mentioned in the release Notes:
STM32CubeProgrammer errata 2.23.x - stm32mcu
When the board is connected to the Mac through this USB hub, flashing and chip erase operations complete successfully.
The application also boots and runs normally. However, the following issue occurs intermittently when inference is started:
-
The application is running normally, and the LCD displays the expected output.
-
Inference is started.
-
During inference execution and USB communication with the host, the LCD suddenly goes completely black.
-
Both LD3 and LD4 turn red. The board recovers only after a power cycle.
-
With the same firmware and hardware setup, using a direct USB-C-to-USB-C connection on Windows works normally.
-
No firmware changes are required for the issue to disappear when switching to the Windows setup.
This makes us suspect that the issue may be related to the available power/current through the USB connection when the workload increases during inference and USB communication.
Observation After Changing JP2
As a test, we changed JP2 from pins 1–2 (5V_STLK) to pins 3–4 (USB_SNK) and powered the board through the corresponding USB power path.
With JP2 configured on pins 3–4, the black-screen issue has not been observed so far, and the inference application is working as expected.
However, with this configuration, LD3 is no longer ON.
STM32CubeProgrammer can still successfully:
-
Detect the ST-LINK and target
-
Connect to the target through SWD
-
Perform a mass erase
-
Program the external flash
-
Verify the programmed image
For example, STM32CubeProgrammer reports a target voltage of approximately 3.29 V, and programming and verification complete successfully.
Ideally, I would like to keep JP2 on pins 1–2 (5V_STLK) and have the application run reliably on macOS without requiring a change to the JP2 configuration.
Questions
-
Is the intermittent black-screen behavior with JP2 on pins 1–2 (5V_STLK) consistent with insufficient power/current being available through the ST-LINK USB power path when the AI inference workload and USB communication start?
-
Is there any limitation or concern with keeping JP2 permanently on pins 3–4 (USB_SNK) during development, including:
-
Flashing
-
SWD debugging
-
Repeated AI inference
-
USB communication with the host
-
-
When JP2 is configured on pins 3–4 (USB_SNK), is it still possible to perform a complete board power cycle using STM32CubeProgrammer commands such as:
STM32_Programmer_CLI --power off index=0 --power on index=0Or does this command only control the power supplied through the ST-LINK power path, meaning that it cannot power-cycle the board when the board is powered through USB_SNK?
-
Are there any specific USB-C power-source, USB-PD, or externally powered USB hub requirements/recommendations for using the STM32N6570-DK with a MacBook, particularly when running workloads such as AI inference that may increase the board's power consumption?
-
Are there any known differences in USB power negotiation or available current between a direct MacBook USB-C connection and a USB hub that could explain why the behavior differs between these configurations?
The main requirement is to have a stable macOS setup that supports flashing, USB communication, repeated inference, and software-controlled power cycling, preferably while keeping JP2 on pins 1–2 (5V_STLK).
Any recommendations on the appropriate power/USB configuration for this use case would be appreciated.
Thanks.
