2025-02-01 09:09 PM
Hello,
I am trying flash my STM32F746G Discovery board with new code from Linux. I run into this issue after running "dmesg -w": "can't set config #1, error -32". ST-Link is not being detected by either STMCubeIDE and STMCubeProgrammer. Has anyone run into this issue before?
Furthermore, I had code flashed to the Discovery board that had a screen show, but I am met with a black screen when I connect it to power. The LED next to the ST-Link flashes red. I've also tried changing my debugger from ST-Link to SEGGER, but I met with the error "Could not determine GDB version using command: arm-none-eabi-gdb --version," and I am currently looking into this.
I'm hoping that this is not a board issue but rather a software issue, but at this point it seems like this may be a board issue.
Regardless, has anyone had any issues like this, and can provide any tips on what to do from here?
Solved! Go to Solution.
2025-02-05 01:55 PM
I had tried 2 wires before making this post. I tried a third out of desparation. The ST-Link is detecting.
To everyone who responded to this post, I am thankful and also sorry that I ended up wasting your time.
I learned a lot from those who responded, thank you again.
2025-02-01 11:48 PM
@jindo85547 wrote:Hello,
I am trying flash my STM32F746G Discovery board with new code from Linux. I run into this issue after running "dmesg -w": "can't set config #1, error -32". ST-Link is not being detected by either STMCubeIDE and STMCubeProgrammer. Has anyone run into this issue before?
[...]
udev rules setup correctly?
2025-02-02 02:01 AM - edited 2025-02-02 03:50 AM
Hi,
after plug st-link to a usb, you should see on dmesg output:
If nothing - take another cable+port , if on not-just-charger cable no st-link found . its defective.
+ Try on other PC/Labtop...to be sure.
2025-02-02 10:58 AM
Hello,
I get most of that output, but after the manufacturer details I get "can't set config #1, error -32". I will try this on a different laptop and get back to you later today.
2025-02-02 10:59 AM
I've not looked into this yet, I'll try this later today and get back to you.
2025-02-02 12:56 PM
afair error -32 : i seen on defective USB sticks and hubs (- reset , not responding.) ....
2025-02-03 05:00 PM
I've just tried plugging the ST-Link into a Windows machine, but the ST-Link is not detected there either. This is probably more indicative of a board malfunction, no?
2025-02-03 10:21 PM
Hello,
I looked into this suggestion and tried to configure the udev rules with this post as a guide. https://community.st.com/t5/stm32cubeprogrammer-mcus/error-connecting-with-st-link-in-linux/td-p/691415
The ST-Link still doesn't appear in lsusb nor dmesg.
I am going to check the pins on the ST-Link using a multimeter to check for a short circuit.
2025-02-03 10:43 PM
Does the ST-Link show up in the lsusb output ?
> I've also tried changing my debugger from ST-Link to SEGGER, but I met with the error "Could not determine GDB version using command: arm-none-eabi-gdb --version," and I am currently looking into this.
I can't quote the actual groups names from memory, but you additionally need to add your user to the group allowed to access such USB devices. Use your favourite search engine.
As a side note, I have most of my onboard ST-Links converted to JLinks (with Segger's firmware), since I use their Embedded Studio IDE under Linux.
2025-02-04 02:52 PM
Hello,
I tried adding my user to group dialout, but I was told in terminal that I was already in that group.
I checked the voltage across the power pins of the ST-Link (Pins 1 and 4 according to this link https://www.st.com/resource/en/user_manual/um1907-discovery-kit-for-stm32f7-series-with-stm32f746ng-mcu-stmicroelectronics.pdf pg 26/37) and I'm getting fluctuating values of DC Voltage around 0 volts (ranging from around 0 - 0.1 Volts).
I'm going to try to use one of the external ST-Links to debug.