Robotdyn Black Pill - Page 1
Forum section: electronics / general

author: mojoe
author_rank: Frequent Contributor
timestamp: April 04, 2020, 03:28:59 am
content: Has anyone gotten these boards working in Arduino? I'm on Win10.I ordered some Black Pill boards from Robotdyn, because online comments indicated that these were good quality boards. The boards I ordered were the STM32F303CCT6 variety, because these are supported in the current Arduino IDE. The STM32F11 boards are not yet supported. So far, I haven't been able to do anything with these boards. The boards I ordered are supposed to have an Arduino bootloader already installed (that's one of the options when ordering).My configuration is: Arduino 1.8.12, STM32 boards package, Java 8, STM32CubeProgrammer (needs the Java). During installation of the STM32CubeProgrammer software, some STM drivers are installed.When I plug one of the Black Pill boards into USB, it keeps connecting and disconnecting repeatedly. Device Manager says that it can't recognize the device. So, it looks like some other type of driver is required. What that is, I haven't a clue.In the Arduino IDE, I can select this particular Robotdyn board, but without it being recognized by Windows, this does me no good.I have Googled extensively, and watched some Youtube videos for similar boards, but haven't found a solution. What am I missing?

author: mojoe
author_rank: Frequent Contributor
timestamp: April 04, 2020, 07:36:29 am
content: I figured it out. Here it is, so that others don't have to waste time.First, the installation of the drivers by the STM32CubeProgrammer software is necessary.Second, the two Boot jumpers must be set correctly. The jumper closest to the USB connector is on "1", the other is on "0".The board finally showed up in Device Manager as an STM32 Bootloader device (at first). After uploading the Blink program, it changed to an STM Com port. Speaking of Blink, the LED_BUILTIN variable is correctly set by the IDE for this board (PC13).See the attached picture for the Arduino board settings I used. The Port and Programmer settings don't seem to matter.Later, I'm going to see if all of the baggage from the STM32CubeProgrammer is necessary, or if only the "CLI" executable is needed by the Arduino IDE (even later, I'll see how all of this works in PlatformIO).The Robotdyn board does seem to be of good quality. My only real complaint is that Robotdyn could have provided some minimal instructions on how to use these boards (like what I just posted).

author: mojoe
author_rank: Frequent Contributor
timestamp: April 05, 2020, 01:45:31 am
content: If all you want is the Arduino integration of the STM32CubeProgrammer, you should find the following of interest.Note: I am on Win10, 64-bit. Others can adjust as necessary. See the STM32 boards package documentation for more about the upload methods, which relate to all of this.After installing Java 8, then the STM32CubeProgrammer software, I wanted to see how much of this was really necessary to program an STM32 from the Arduino IDE. After verifying that I could program the Robotdyn board, I tried a few things.First, I uninstalled Java 8. It is needed if you want to run the full GUI STM32CubeProgrammer software. But, there is a command line executable, which is what the Arduino IDE uses. I was still able to program the board without Java installed. EDIT: I know that the Arduino IDE has it's own self contained Java runtime. I don't need Java for anything else, so didn't want to leave the other software installed.Next, I copied the contents of the following folder to another PC that had never had the STM32CubeProgrammer software installed. The Arduino IDE and the STM32 boards package was already installed. Note that this path is hard coded in the STM32 boards package. If you change it, you need to add the new location to your PATH environment variable (see the boards package doc).C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Finally, I installed the needed drivers by running the following BAT file, using Administrator privileges.C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Drivers\DFU_Driver>STM32Bootloader.batOn this other PC, I was able to program the Robotdyn board successfully.To sum up, for programming STM32 microcontrollers from the Arduino IDE, you just need the CLI executable (and possibly some support files) and the drivers. The Java baggage and GUI programmer code are not needed. There are probably other files in the program folder that I copied that are not needed, but I didn't take the time to whittle things down further.It's a shame that you can't just download the CLI program and drivers, without having to install Java, then install a huge GUI that you may not need. The GUI does allow you to do other things with the microcontrollers beyond a DFU program upload. If you need those other features, then you may want to keep Java and the full GUI. It appears that you can also perform these other tasks using just the CLI.

author: tmadness
author_rank: Regular Contributor
timestamp: April 10, 2020, 08:20:12 pm
content: My Man mojoe! Thank you for putting time into writing your efforts so far.I've had problems with the blackpill as well. AFIR, you need to to the STM32DUINO github page to download proper drivers for the PC and install the "maple" bootloader. I did the steps in the STM32DUINO wiki and I get weird Java usb library seg faults when I last tried. Anyway, that's one of the reasons why I moved on from the blackpill to the teensy 3.5 and 4.0.

author: mojoe
author_rank: Frequent Contributor
timestamp: April 11, 2020, 01:14:59 am
content: Glad to help. I figured I wasn't the only one using these boards.The board support package that I used is this one:https://github.com/stm32duino/Arduino_Core_STM32. I believe this one is supported by STMicro.I did not use the older, original one, based on the Maple (from Roger Clark and others, if I remember correctly).I also have a Teensy 3.5 that I bought for a specific project that needs the audio add on board. I only bought the Black Pills out of curiousity, given the price. I don't know about anyone else's Black Pill, but I bought the ones from Robotdyn after reading good things about them. I am not disappointed. In fact, I bought several odds and ends from Robotdyn, and it all looks to be of good quality.The F303 boards are quite powerful. I didn't buy the F411 boards at this time, because they are not yet supported by the boards package. Maybe later.