[Solved??] From Maple DFU to Maple Serial after Reset problem

STM32duino bootloader aka Maple bootloader
Post Reply
User avatar
Pito
Posts: 18
Joined: Thu Mar 07, 2019 6:48 pm
Location: Rapa Nui
OS: Win7
IDE: Arduino, Sloeber, Uecide
Core: Roger
Board: Blue_Black_MM_103xx_407xx

[Solved??] From Maple DFU to Maple Serial after Reset problem

Post by Pito » Tue Nov 05, 2019 5:40 pm

Guys/girls, mostly working with uart via HC-05, now I want to use the USB Serial for stm32duino demo purposes.
I flashed a hello world program in:

Code: Select all

#include "Arduino.h"
void setup() {
delay(2000);  // wait on USB enum
Serial.begin(9600);
Serial.println("Hello World!");
}
void loop() {
}
After the build and upload into the Bluepill (via Maple DFU), I can see in my TeraTerm @COMx (Maple Serial) it prints out Hello World! :geek:
Now, I press the reset on the BluePill, my Win7 enumerates the Maple DFU and that is it.

I can see in usbdeview both drivers are there, during upload the DFU is active, after the upload the DFU changes to Serial and it prints out the message.

When I press reset on the BluePill, it stays in DFU, the COMx is disconnected there in TT, in usbdeview the DFU lits active and Serial is off.

What I did wrong?
Roger core.
Last edited by Pito on Wed Nov 06, 2019 7:41 pm, edited 3 times in total.
Pukao Hats Cleaning Services, Ltd.

stevestrong
Posts: 75
Joined: Tue Mar 05, 2019 7:49 am
Location: Munich
OS: Win7 & 10
IDE: Arduino 1.8.8, Sloeber
Core: Libmaple
Board: Bluepill, Generic F4VET6 black & mini
Contact:

Re: From Maple DFU to Maple Serial after reset

Post by stevestrong » Wed Nov 06, 2019 8:04 am

BOOT0 = GND ?

User avatar
Pito
Posts: 18
Joined: Thu Mar 07, 2019 6:48 pm
Location: Rapa Nui
OS: Win7
IDE: Arduino, Sloeber, Uecide
Core: Roger
Board: Blue_Black_MM_103xx_407xx

Re: From Maple DFU to Maple Serial after reset

Post by Pito » Wed Nov 06, 2019 9:40 am

BOOT0 = GND ?
Both switches are 0.

The USB Serial works only after the upload of the sketch into the BPill..
After reset or power off/on it does not. The Serial is not recognized by Win7 after the cold/warm reset.

It looks like there is a problem in the bootloader - the switching from DFU to Serial.
It could be when the bootloader jumps to user sketch (bypassing DFU upload) it does not set clock or something properly.
When it goes through the DFU part and makes the upload the settings are ok and the USB Serial works.

I've also tried to change the driver with zadig while the Maple Serial is active and working (immediately after the upload).
I've tried with 2 BPills (original stm32) with an older bootloader and the latest one from Roger's github. Tried with PC and notebook.

The first picture below shows the situation after an reset or power on of the BPill with flashed in HelloW sketch (-DUSB_SERIAL added to be sure).
The second one is the situation after the upload via DFU - TTerm properly recognizes the BPill's USB Serial, and the sketch prints out the message.
.
Maple Serial and Maple DFU.PNG
Maple Serial and Maple DFU.PNG (53.13 KiB) Viewed 98 times
Immediately after the upload of the sketch.PNG
Immediately after the upload of the sketch.PNG (99.08 KiB) Viewed 93 times

PS: exactly 2 years back - http://stm32duinoforum.com/forum/viewto ... tml#p36654
Pukao Hats Cleaning Services, Ltd.

User avatar
Pito
Posts: 18
Joined: Thu Mar 07, 2019 6:48 pm
Location: Rapa Nui
OS: Win7
IDE: Arduino, Sloeber, Uecide
Core: Roger
Board: Blue_Black_MM_103xx_407xx

Re: [SOLVED???] From Maple DFU to Maple Serial after Reset problem

Post by Pito » Wed Nov 06, 2019 1:41 pm

:twisted:

I've tried to reflash the newest bootloader into 2 BPills ~10x. The same issue.
I've tried to build with latest F1 core XXtimes. The same issue.

I've deleted the Maple DFU and Maple Serial drivers about 40x with usbdeview in last few days, tried again and again. The same issue.

Reinstalled the drivers with the Roger's driver utility at least 40x, always getting "drivers installed successfully" in those DOS windows. The same issue.

I've been deleting the various related Leaflabs inf driver files listed in the device store with special driver store cleaner as well, 30x at least. The same issue.

https://github.com/lostindark/DriverStoreExplorer

Always done reboot of the PC, Maple Serial and Maple DFU installed properly, no errors. Device manager shows no errors. USBdeview shows everything works properly. The same issue.

For the reasons I do not understand yet, after repeating all that above for XYZ time, it happened somehow after the PC reboot the Device Manager showed for first time ever the "Maple" as an unknown device with the yellow triangle.
I looked at its properties and it said PID 0003 - that is the DFU. I updated the driver via Device Manager by pointing it into the Roger's "maple-dfu" folder, it requested the confirmation the driver is safe, I installed it, I got Maple DFU.

After uploading the sketch again into the BPill it happened somehow the Device manager showed the "Maple" for second time ever as an unknown device with the yellow triangle. I looked at its properties and it said PID 0004 - that is the Serial. I updated the driver via Device Manager by pointing it into the Roger's "maple-serial" folder, it requested the confirmation the driver is safe, I installed it, I got Maple Serial.


Now the Maple Serial is recognized after pressing the reset and I get COMx..
Pukao Hats Cleaning Services, Ltd.

Post Reply