Open epson121 opened 3 years ago
Seeing the same issue, USBComposite never returns true and USB does not function. This is using an STM32F103C8 blue pill and the latest arduino/Arduino_STM32 libraries.
#include <USBComposite.h>
// USB HID device
USBHID HID;
// Keyboard
HIDKeyboard Kbd(HID);
// USB Serial Device
USBCompositeSerial Vcp;
void setup() {
pinMode(PC13, OUTPUT);
digitalWrite(PC13, HIGH);
HID.begin(Vcp, HID_KEYBOARD);
while (!USBComposite);
Kbd.begin();
}
void loop() {
Vcp.println("Ping!");
digitalWrite(PC13, LOW);
delay(100);
digitalWrite(PC13, HIGH);
delay(900);
}
Aha!
I think it may be a fake STM32F1 issue - I switched to the Generic STM32F103C/fake STM32F103C8
board in Arduino and now the above code works.
Hey, I'm having an issue with setting up
midiout.ino
sketch to work properly.It gets uploaded to the STM board (black pill,
STM32F103C Generic
), butUSBComposite
never gets ready, and program is not functioning correctly.I've slightly modified the
midiout.ino
to show the issue:And the console output is:
Any ideas what might be causing this? STM is connected via USB to computer (not directly, but using an UART).
I've tested this on linux and windows, same result.
EDIT: also, I'm having to use Upload method: Serial (in Arduino IDE), because STM32Duino bootloader is throwing DFU issues: