I just installed the HID Bootloader 2.2 onto my bluepill according to https://youtu.be/Myon8H111PQ video and I am using the official corehttps://raw.githubusercontent.com/stm32 ... index.json. Using the serial over USB worked fine in my case and I was also able to use the serial monitor. However, when I set tools>USB support from CDC generic supersede U(S)ART to HID keyboard and mouse, things started behaving unexpectedly.
I want to use the bluepill as an HID device, which is why I set it to that mode. Now, when trying to upload my code, which is for testing purposes just this:
Code: Select all
//Just a minimalistic mouse jiggler
#include <Mouse.h>
void setup()
{
Mouse.begin();
}
void loop() {
Mouse.move(5,0);
delay(100);
Mouse.move(-5,0);
delay(100);
}
Code: Select all
+-----------------------------------------------------------------------+
| HID-Flash v2.2.1 - STM32 HID Bootloader Flash Tool |
| (c) 2018 - Bruno Freitas http://www.brunofreitas.com |
| (c) 2018-2019 - Vassilis Serasidis https://www.serasidis.gr |
| Customized for STM32duino ecosystem https://www.stm32duino.com |
+-----------------------------------------------------------------------+
> Trying to open the [COM1]...
> Toggling DTR...
> Searching for [1209:BEBA] device...
##########
Error - [1209:BEBA] device is not found :(> Searching for [COM1] ...
> [COM1] is found !
> Finish
Der ausgewählte serielle Port > Finish
ist nicht vorhanden oder das Board ist nicht angeschlossen
is not available or the board is not connected)
I reflashed the bootloader several times and also erased the flash memory and it worked one time but was very inconsistent and when I replugged the bluepill, it wouldn't move the cursor anymore. I can also only select COM1 in the IDE, but I remember that there was one time also shown COM4 which was the actual port, my board was connected to when the upload worked.
I am posting this here, since I was unable to find a solution myself or online and I would appreciate greatly any help !
Greetings