SerialUSB doesn't work on Maple Mini and Bootloader2.0

Post here all questions related to STM32 core if you can't find a relevant section!
fpiSTM
Posts: 1836
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 102
Location: Le Mans
Contact:

Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0

Post 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
Ralf9
Posts: 33
Joined: Sat Jan 11, 2020 7:21 pm
Answers: 1
Location: Germany, BaWü

Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0

Post by Ralf9 »

I use this hardware
20200419_Maple_Mini_blue_and_green_s.jpg
20200419_Maple_Mini_blue_and_green_s.jpg (62.22 KiB) Viewed 8704 times
fpiSTM
Posts: 1836
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 102
Location: Le Mans
Contact:

Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0

Post by fpiSTM »

Ok but the intersting thing is how USB is wired
Ralf9
Posts: 33
Joined: Sat Jan 11, 2020 7:21 pm
Answers: 1
Location: Germany, BaWü

Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0

Post by Ralf9 »

Ralf9
Posts: 33
Joined: Sat Jan 11, 2020 7:21 pm
Answers: 1
Location: Germany, BaWü

Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0

Post 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
stas2z
Posts: 131
Joined: Mon Feb 24, 2020 8:17 pm
Answers: 8

Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0

Post 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
fpiSTM
Posts: 1836
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 102
Location: Le Mans
Contact:

Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0

Post 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.
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0

Post 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.
Ralf9
Posts: 33
Joined: Sat Jan 11, 2020 7:21 pm
Answers: 1
Location: Germany, BaWü

Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0

Post 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
Ralf9
Posts: 33
Joined: Sat Jan 11, 2020 7:21 pm
Answers: 1
Location: Germany, BaWü

Re: SerialUSB doesn't work on Maple Mini and Bootloader2.0

Post 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
Attachments
core190_boardpart.png
core190_boardpart.png (13.03 KiB) Viewed 8051 times
Post Reply

Return to “General discussion”