[Solved] Connectivity problems with Blue Pill and ST-Link v2

Post here first, or if you can't find a relevant section!
elroy
Posts: 8
Joined: Wed Sep 21, 2022 5:14 pm

Re: Connectivity problems with Blue Pill and ST-Link v2

Post by elroy »

With "STM32 MCU based boards" chosen, the boards available are these:

Image

I see in Windows that under Tools a "Board part number" can be selected to specify BluePill F103C8. However, on the Mac I'm not seeing a Tools > Board part number menu item, nor any other way to narrow down the board type beyond the series level.
ozcar
Posts: 143
Joined: Wed Apr 29, 2020 9:07 pm
Answers: 5

Re: Connectivity problems with Blue Pill and ST-Link v2

Post by ozcar »

You previously mentioned choosing "Generic STM32F0 series" as the board type.

I'm not sure if you subsequently realised that was wrong, because your latest image still shows the same incorrect selection. You will not be able to select Blue Pill until you change that (which, presumably you must have done at some point on the Windows system).

However that does not explain the "Board part number" menu item being missing under Tools >. Are any of the other STM32-specific menu items missing? Maybe you should show us what Tools > looks like.

Don't get fixated on whether a serial port appears when you plug the board in. With boards like Uno or Nano, there is a USB chip which is separate to the main processor. With a board like that, no code has to be loaded into the main processor for a USB port to show up when you plug the board in. However, Blue Pill boards are more like Leonardo, in that the USB support is provided by the main processor, and unless there is code loaded into the board to set up the built-in USB peripheral, you will not see a USB device when you plug the board in. This should not prevent you from uploading using STLINK, and a sketch like blink.ino does not even require USB support at all.

Blink.ino is as simple as it comes, but it is not likely to work if you have the wrong board selected.

I think I would be inclined to stick to using the Windows system, where apparently you did manage to successfully upload a sketch? At least until you can get blink.ino to work there, and have gained some familiarity with what to expect.
elroy
Posts: 8
Joined: Wed Sep 21, 2022 5:14 pm

Re: Connectivity problems with Blue Pill and ST-Link v2

Post by elroy »

ozcar wrote: Fri Sep 23, 2022 6:10 am You previously mentioned choosing "Generic STM32F0 series" as the board type. I'm not sure if you subsequently realised that was wrong, because your latest image still shows the same incorrect selection. You will not be able to select Blue Pill until you change that (which, presumably you must have done at some point on the Windows system).
Thanks for pointing that out. I just changed that to "Generic STM32F1 series," and the Blink sketch now compiles, uploads, and runs.
ozcar wrote: Fri Sep 23, 2022 6:10 am However that does not explain the "Board part number" menu item being missing under Tools >. Are any of the other STM32-specific menu items missing? Maybe you should show us what Tools > looks like.
Image

The Board menu item allows only selection of the board series (i.e. Generic STM32F1 series). There is no menu item for Board part number. If I click on "Get board info," it returns a message "Please select a port to obtain board info." The Port menu item shows only two unrelated bluetooth ports. If I select either of them anyway and then select "Get board info," this appears:

Image

It returns this exact same response whether or not the ST-Link and Blue Pill are connected to the computer, so it is obviously not actually using the chosen port to query the board in real-time.

Since I now seem to be able to upload and run a sketch using the Mac, I'm inclined to stay with that as it's the computer I want to be using. (I only tried using the Windows PC to rule out a hardware issue with the Blue Pill or ST-Link v2.) At this point I'll just ignore the points mentioned above, and experiment with uploading and running sketches. Thanks again for pointing out the obvious error with the board series identifier.
ozcar
Posts: 143
Joined: Wed Apr 29, 2020 9:07 pm
Answers: 5

Re: [Solved] Connectivity problems with Blue Pill and ST-Link v2

Post by ozcar »

Good to hear you are making progress.

I would not worry too much about what "Board info" shows. If you have still not loaded a sketch with USB support enabled, there will be no VID or PID to display.

As for Tools> Board part number, for whatever reason, the items are in a different order to what I have seen on Windows and Linux Mint with Arduino IDE 1.8.x, but "Board part number " is there in the image you showed??? Or does that not work? If that and the other options like the USB settings are not working, I can't see you getting much further.
elroy
Posts: 8
Joined: Wed Sep 21, 2022 5:14 pm

Re: [Solved] Connectivity problems with Blue Pill and ST-Link v2

Post by elroy »

ozcar wrote: Fri Sep 23, 2022 7:36 pm As for Tools> Board part number, for whatever reason, the items are in a different order to what I have seen on Windows and Linux Mint with Arduino IDE 1.8.x, but "Board part number " is there in the image you showed??? Or does that not work?
Well, I really have to apologize again. When I was initially opening it, the Tools menu only included these items:

Image

I guess I was working too fast and neglected to notice that, after the board series was selected, the Tools menu lengthened including a "Board part number" entry a number of items lower on the menu. That enabled selection of "Generic F103C8Tx" as the more specific board type.

I don't know how it works on Windows, but each time I start Arduino IDE with the board attached I need to manually choose "Generic STM32F1 series" before proceeding. Once I do that, it does appear that the more specific type (Generic F103C8Tx) is saved.

I haven't gotten as part as trying USB settings yet, but those items do open submenus with various options so it's likely they are working. The only thing on the Tools menu that isn't working as described in various docs is the Ports item, which is supposed to show a port device associated with the ST-Link and Blue Pill. But as far as I can tell so far, that doesn't prevent communicating with the board, doing uploads etc.

Anyway, sorry again about missing the menu entry for the Board part number. I guess it wasn't where I was expecting to see it, based on the layout of the Tools menu under Windows.
Post Reply

Return to “General discussion”