Does CDC have to be emulated in software for these due to the lack of OTG? Or have I completely misunderstood – I was unable to get the a MM to enumerate as anything after flashing with a minimal flash/SerialUSB sketch. (with USB CDC FS enabled)
I didn’t test MapleMini.
Even if there is no USB OTG, basic USB is enabled.
I’ve also test on Nucleo STM32F103RB using a dedicated shield to have USB connector and updating clock config to have 48KHz clock.
[fpiSTM – Mon Jan 14, 2019 4:06 pm] –
I’ve also test on Nucleo STM32F103RB using a dedicated shield to have USB connector and updating clock config to have 48KHz clock.
Is that something ST sells or something you made yourself?
Here’s the code:
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
SerialUSB.begin(57600);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
SerialUSB.println("On");
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
SerialUSB.println("Off");
delay(1000); // wait for a second
}
MM required to handle DISC pin (PB9).
Adding this I’m able to have SerialUSB up and running on Windows and Linux and Mac
pinMode(PB9, OUTPUT);
digitalWrite(PB9,0);
Reenumerate is currently not managed.
About to restest BP
Check if this is not linked to a previous installed driver for the BP.
The micro USB cable I was using was power only
Working fine.
Success! wrote:
Jan 14 12:53:09 kimballr kernel: [2167879.967862] usb 1-3.4: Product: BLUEPILL_F103C8 CDC in FS Mode
Jan 14 12:53:09 kimballr kernel: [2167879.967864] usb 1-3.4: Manufacturer: STMicroelectronics
Jan 14 12:53:09 kimballr kernel: [2167879.967867] usb 1-3.4: SerialNumber: 8D8623685251
Jan 14 12:53:09 kimballr kernel: [2167879.968726] cdc_acm 1-3.4:1.0: ttyACM1: USB ACM device
/tmp/arduino_cache_730592/core/core_8decc66340a600b90f98384814ca6329.a(USBSerial.cpp.o): In function `USBSerial::isConnected()’:
USBSerial.cpp:(.text._ZN9USBSerial11isConnectedEv+0xc): undefined reference to `device_connection_status’
collect2: error: ld returned 1 exit status
exit status 1
Looks like this hasn’t been finished yet.
Is the CDC supposed to be ready or are we still mucking about?
What is achieved now is to have a “generic” implementation for HID composite (keyboard and mouse) and CDC for basic USB, OTG FS or HS. No more needs to have specific files for USB in the variant.
Tested for F0/1/2/3/4/7 and L0/1/4. Only H7 is not functionnal at this time.
Next step are:
- Remove timer usage
Serial definition. How to manage? If USB then Serial == SerialUSB ? (Any comments on this are welcome)
reenumerate()
ReadBytes()
custom VID/PID ans string?
Disc pin management
Isconnected
…
