Page 5 of 5
Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0
Posted: Sun Apr 19, 2020 7:16 pm
by fpiSTM
Hum, I guess your hardware have a logic invert compare to my hardware. The new implementation should fix this issue but you will have to change level
Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0
Posted: Sun Apr 19, 2020 7:37 pm
by Ralf9
I use this hardware

- 20200419_Maple_Mini_blue_and_green_s.jpg (62.22 KiB) Viewed 10184 times
Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0
Posted: Sun Apr 19, 2020 7:50 pm
by fpiSTM
Ok but the intersting thing is how USB is wired
Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0
Posted: Sun Apr 19, 2020 8:10 pm
by Ralf9
Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0
Posted: Mon Apr 20, 2020 6:28 am
by Ralf9
The problem is:
With the orginal bootloader the USBD_reenumerate is working, because the USB_DISC Pin is high when leaving the bootloader.
With the bootloader2.0 the USB_DISC Pin is low when leaving the bootloader, the setting of USB_DISC Pin to low in the core 1.8.0 has
has no effect, because the USB_DISC Pin is already low
Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0
Posted: Mon Apr 20, 2020 6:56 am
by stas2z
are you flashing maple mini version of bootloader2.0 to yr boards?
https://github.com/rogerclarkmelbourne/ ... boot20.bin
upd, yes, ive checked bootloader code,
USB DISC PIN is definitely low when bootloader starts main app in case of maple hw
https://github.com/rogerclarkmelbourne/ ... .c#L42-L50
Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0
Posted: Fri Apr 24, 2020 2:41 pm
by fpiSTM
Looking deeply,
it seems there is something weird in the bootloader management of the DISC pin depending if an upload is requested or not.
The way it works with libMaple core seems related to timing because I didn't see any difference btw the management except the fact it is called later when the USB begin() is called (in USBComposite library).
I guess the proper way should be to ensure the bootloader leave the USB in a proper state if no upload is requested.
Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0
Posted: Sat May 09, 2020 8:32 am
by stevestrong
stas2z wrote: Mon Apr 20, 2020 6:56 am
upd, yes, ive checked bootloader code,
USB DISC PIN is definitely low when bootloader starts main app in case of maple hw
USB DISC PIN low means that USB DP is tied to +5V.
This is correct, the USB DP pin must be high when initializing the USB.
Important is to toggle the USB DP pin from low -> high, wherein the last high is sometimes done by re-configuring the pin, see
https://github.com/rogerclarkmelbourne/ ... #L103-L107
In this case USB_DISC pin should toggle from high -> low and stay in this state.
Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0
Posted: Mon Jun 01, 2020 5:40 pm
by Ralf9
I have updated to the core 1.9.0
with this core the USBD_reenumerate with the bootloader2.0 does not work too
the workaround for the core 1.8.0 does not work either
viewtopic.php?p=2181#p2181
now I need for the core 1.9.0 a new workaround
Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0
Posted: Mon Jun 01, 2020 9:33 pm
by Ralf9
Now it works without a workaround
I had select the Board part number: Gerneric F103CB
because with my screenresolution 1920 * 1080 I have not seen the maple Mini entry, because there is no scroll arrow below.
With the maple Mini entry it works