SerialUSB doesn't work on Maple Mini and Bootloader2.0
Re: SerialUSB doesn't work on Maple Mini
Which value of USBD_ENUM_DELAY should I test?
I have testet 100 and 500
I have testet 100 and 500
Re: SerialUSB doesn't work on Maple Mini
So if this not works then this is probably an other issue.
Anyway, as said I could not reproduce so hard to help on this.
Anyway, as said I could not reproduce so hard to help on this.
Re: SerialUSB doesn't work on Maple Mini
I have tested with another maple mini and other bootloader and find out:
With the orginal bootloader
http://docs.leaflabs.com/static.leaflab ... i_boot.bin
the serialUSB works too after a reset or plug off
With the bootloader20
https://github.com/rogerclarkmelbourne/ ... tm32f1.ino
or this
https://github.com/rogerclarkmelbourne/ ... boot20.bin
the serialUSB works not after a reset or plug off.
With "# ls -l /dev/serial/by-id" no usb device is displayed
With the orginal bootloader
http://docs.leaflabs.com/static.leaflab ... i_boot.bin
the serialUSB works too after a reset or plug off
With the bootloader20
https://github.com/rogerclarkmelbourne/ ... tm32f1.ino
or this
https://github.com/rogerclarkmelbourne/ ... boot20.bin
the serialUSB works not after a reset or plug off.
With "# ls -l /dev/serial/by-id" no usb device is displayed
Re: SerialUSB doesn't work on Maple Mini
And you've loaded a sketch with serialusb enabled after reflashing with each bootloader? Roger's bootloader will stay in DFU mode if there's not sketch resident.
Re: SerialUSB doesn't work on Maple Mini
I loaded this test sketch after reflashing with each bootloader
Code: Select all
int8_t led = 0;
void setup() {
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
if(Serial.available()) {
char c = Serial.read();
Serial.print("hello ");
Serial.print(c);
Serial.println();
}
led = ~ led & 1;
digitalWrite(LED_BUILTIN, led);
delay(100);
}
Re: SerialUSB doesn't work on Maple Mini
And you have USART support set to enabled 'generic serial'
And USB Support set to "CDC generic 'serial' supercede USART"
And USB Support set to "CDC generic 'serial' supercede USART"
Re: SerialUSB doesn't work on Maple Mini
Right after the upload of the testsketch is the usb device available and the serialUsb works
after a reset or plug off, with "# ls -l /dev/serial/by-id" no usb device is displayed
and the serialUSB do not works
I use the core 1.8.0
https://github.com/stm32duino/BoardMana ... index.json
Code: Select all
# ls -l /dev/serial/by-id
insgesamt 0
lrwxrwxrwx 1 root root 13 16. Feb 19:53 usb-STMicroelectronics_MAPLEMINI_F103CB_CDC_in_FS_Mode_8D82067E4850-if00 -> ../../ttyACM0
and the serialUSB do not works
I use the core 1.8.0
https://github.com/stm32duino/BoardMana ... index.json
see Attachments:And you have USART support set to enabled 'generic serial'
- Attachments
-
- ArduinoIDE_20200216.png (23.52 KiB) Viewed 8387 times
Re: SerialUSB doesn't work on Maple Mini
Try with
in setup.
I had few troubles also with usb serial on stm32duino core, and that line fixed that. Annoying part is only that sketch won't continue untill there is working serial communication with PC.
Also, for me, when board is unplugged, i had to close serial monitor and open it again after i plug in board to be able to have serial.
Code: Select all
Serial.begin(115200); while (!Serial) { yield(); }
I had few troubles also with usb serial on stm32duino core, and that line fixed that. Annoying part is only that sketch won't continue untill there is working serial communication with PC.
Also, for me, when board is unplugged, i had to close serial monitor and open it again after i plug in board to be able to have serial.
Re: SerialUSB doesn't work on Maple Mini and Bootloader 2.0
it doesn't work with that eitherTry with ... in setup.
without a working serialUsb, I cannot use the bootloader20
With the orginal bootloader the serialUsb works also after a reset.
Re: SerialUSB doesn't work on Maple Mini
I found out that I can with "dmesg -w -e" also test whether the SerialUSB works.
I use this test sketch
I flash with this:
With the orginal bootloader it works too after reset or plug in:
With the bootloader2.0 there is no "ttyACM0" after reset
I also tested it with
I use this test sketch
Code: Select all
int8_t led = 0;
//#define USBD_ENUM_DELAY 500
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
led = ~ led & 1;
digitalWrite(LED_BUILTIN, led);
delay(200);
}
Code: Select all
./dfu-util -d 1eaf:0003 -a 1 -D /tmp/arduino_build_70869/MapleminiTestusb.ino.bin -R
Code: Select all
[ +7,407971] usb 3-9: new full-speed USB device number 11 using xhci_hcd
[Apr13 00:37] usb 3-9: New USB device found, idVendor=1eaf, idProduct=0003
[ +0,000001] usb 3-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0,000001] usb 3-9: Product: Maple 003
[ +0,000001] usb 3-9: Manufacturer: LeafLabs
[ +0,000001] usb 3-9: SerialNumber: LLM 003
[ +2,451835] usb 3-9: USB disconnect, device number 11
[ +0,306822] usb 3-9: new full-speed USB device number 12 using xhci_hcd
[ +0,149432] usb 3-9: New USB device found, idVendor=0483, idProduct=5740
[ +0,000002] usb 3-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0,000000] usb 3-9: Product: MAPLEMINI_F103CB CDC in FS Mode
[ +0,000001] usb 3-9: Manufacturer: STMicroelectronics
[ +0,000001] usb 3-9: SerialNumber: 6D8824785548
[ +0,000460] cdc_acm 3-9:1.0: ttyACM0: USB ACM device
Code: Select all
## press reset button
[ +20,228840] usb 1-9: USB disconnect, device number 60
[ +0,470319] usb 1-9: new full-speed USB device number 61 using xhci_hcd
[ +0,149091] usb 1-9: New USB device found, idVendor=1eaf, idProduct=0003
[ +0,000001] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0,000001] usb 1-9: Product: Maple 003
[ +0,000001] usb 1-9: Manufacturer: LeafLabs
[ +0,000005] usb 1-9: SerialNumber: LLM 003
## flash
[ +1,507190] usb 1-9: reset full-speed USB device number 61 using xhci_hcd
[ +0,147934] usb 1-9: device firmware changed
[ +0,000081] usb 1-9: USB disconnect, device number 61
[ +0,127730] usb 1-9: new full-speed USB device number 62 using xhci_hcd
[ +0,149344] usb 1-9: New USB device found, idVendor=0483, idProduct=5740
[ +0,000002] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0,000001] usb 1-9: Product: MAPLEMINI_F103CB CDC in FS Mode
[ +0,000000] usb 1-9: Manufacturer: STMicroelectronics
[ +0,000001] usb 1-9: SerialNumber: 8D7452895051
[ +0,000449] cdc_acm 1-9:1.0: ttyACM0: USB ACM device
## press reset button
[ +6,039450] usb 1-9: USB disconnect, device number 62
[ +0,000065] cdc_acm 1-9:1.0: failed to set dtr/rts
[ +0,414680] usb 1-9: new full-speed USB device number 63 using xhci_hcd
[ +0,149008] usb 1-9: New USB device found, idVendor=1eaf, idProduct=0003
[ +0,000002] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0,000001] usb 1-9: Product: Maple 003
[ +0,000000] usb 1-9: Manufacturer: LeafLabs
[ +0,000001] usb 1-9: SerialNumber: LLM 003
Code: Select all
#define USBD_ENUM_DELAY 500