[Solved] Connectivity problems with Blue Pill and ST-Link v2
Posted: Wed Sep 21, 2022 9:01 pm
Today I've had problems while trying to install Arduino IDE, configure it for STM32, and communicate with an STM32F103C8T6 connected through an ST-Link v2, trying both on macOS and in Windows 10. The STM32 and programmer were bought in this package: https://www.amazon.com/dp/B079B95L9Y .
On Mac, I've tried installing Arduino IDE 2.0.0 on a 2018 Intel MacBook Pro running macOS 12.6 Monterey, and also on a 2015 Intel MacBook Pro running macOS 10.15.7 Catalina. Neither computer sees the ST-Link v2 when it's attached to a USB port. It doesn't appear as an option in Arduino IDE, and doesn't show up as a device in Terminal in \dev\cu* .
On the Windows 10 PC, I tried installing Arduino IDE 1.8.19. When the ST-Link v2 was plugged in it didn't show up in Device Manager, so I went to st.com and downloaded the driver package stsw-link009. The driver install appeared to execute normally, and Device Manager now shows a USB device with name STM32 STLink, reporting "This device is working properly." If I go to Tools > Get Board Info, it says I first must select a port. However, the Port menu item is grayed out and can't be selected.
If I remove the STLink and plug in an Arduino Uno using its USB cable, it works normally on all three computers -- it shows up as /dev/cu.usbmodem14201 on the Macs, and on COM3 on the Windows PC.
I double-checked the plug-in wires between the ST-Link v2 and the Blue Pill, and verified that 3.3v, gnd, clock and IO were all connected correctly. Although the ST-Link doesn't appear to be recognized by any of the computers, the small red LED on the ST-Link is illuminated when it's attached to any computer. On the Blue Pill, the red LED near the ground connection pin lights solidly, while the LED near the 3.3v connection pin flashes.
Any suggestions on what to try next? I note that st.com only appears to have an ST-Link v2 driver for Windows -- is there another option for Mac? If the programmer I bought seems dodgy, I'm fine with investing in a new one if anyone has suggestions on one known to work well. Thanks for any ideas.
On Mac, I've tried installing Arduino IDE 2.0.0 on a 2018 Intel MacBook Pro running macOS 12.6 Monterey, and also on a 2015 Intel MacBook Pro running macOS 10.15.7 Catalina. Neither computer sees the ST-Link v2 when it's attached to a USB port. It doesn't appear as an option in Arduino IDE, and doesn't show up as a device in Terminal in \dev\cu* .
On the Windows 10 PC, I tried installing Arduino IDE 1.8.19. When the ST-Link v2 was plugged in it didn't show up in Device Manager, so I went to st.com and downloaded the driver package stsw-link009. The driver install appeared to execute normally, and Device Manager now shows a USB device with name STM32 STLink, reporting "This device is working properly." If I go to Tools > Get Board Info, it says I first must select a port. However, the Port menu item is grayed out and can't be selected.
If I remove the STLink and plug in an Arduino Uno using its USB cable, it works normally on all three computers -- it shows up as /dev/cu.usbmodem14201 on the Macs, and on COM3 on the Windows PC.
I double-checked the plug-in wires between the ST-Link v2 and the Blue Pill, and verified that 3.3v, gnd, clock and IO were all connected correctly. Although the ST-Link doesn't appear to be recognized by any of the computers, the small red LED on the ST-Link is illuminated when it's attached to any computer. On the Blue Pill, the red LED near the ground connection pin lights solidly, while the LED near the 3.3v connection pin flashes.
Any suggestions on what to try next? I note that st.com only appears to have an ST-Link v2 driver for Windows -- is there another option for Mac? If the programmer I bought seems dodgy, I'm fine with investing in a new one if anyone has suggestions on one known to work well. Thanks for any ideas.