I encounter a trouble of USB serial not detected after I update a first sketch;
Maple serial appear normal during first sketch upload,
but it won’t appear after pc14 pull up removed and power on again.
I am obstructed at the maple first sketch upload step and get confused.
I am a beginner on arduino uno and stm32duino;
I have just get some blue pill generic stm32f103 from aliexpress;
For the software installation , I just follow the blue pill wiki;
R10 resistor is changed to 1.5K ohm and connected to 3.3V;
1) download bootloader from github using CP2102 external serial adapter ,and ST flash loader Demostrator,
https://github.com/rogerclarkmelbourne/ … 0_pc13.bin
SET boot0=1, boot1=0 with jumper
2) set boot0=0, boot1=0
restart and blink works fine.
3)
pull up pc 14 to 3.3v with resistor to enter perpetual loader
follow the video tutorial Arduino STM32 – Windows DFU and USB Serial driver installation on y2b
https://youtu.be/0jdJp3TQuJY
using Arduino IDE 1.6.9 and stm32 package
https://github.com/rogerclarkmelbourne/Arduino_STM32
at board manager I installed arduino due and arduino zero package.
I tried a seketch serial print;
***********************
void setup() {
Serial.begin(115200); // Ignored by Maple. But needed by boards using hardware serial via a USB to Serial adaptor
}
void loop() {
Serial.println(“Hello World!Dec”);
delay(1000);
}
*********************
select Maple mini and upload any sketch works fine;
******************************
Setting Configuration 1…
Claiming USB DFU Interface…
Setting Alternate Setting …
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
bytes_per_hash=239
Starting download: [##################################################] finished!
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
********************************
install the windows driver on my Windows 7 64bit;
windows device manager switch from maple dfu to maple serial
it reported as
USB\VID_1EAF&PID_0004 (libwdi autogenerated)
and I can read my serial print from arduino serial monitor;
I suppose to be stopped here.
How should I soft or HW reset the usb?
I uninstall the usb com device from windows device manager;
and unplug and the usb cable.
remove the pc14 pull up resistor and replug the usb.
blue pill power on , blink at PC13 works for around ten seconds and get off.
windows 7 device manager will stay at maple dfu ;
I uninstall the maple dfu and search again ,nothing more found.
I pull up pc 14 to 3.3v with resistor to enter perpetual loader again;
update another sketch of blink the PB11;
unplug and replug the usb cable.
PB11 BLINK IS WORKING,so I support sketch is running.
Summary:
Maple serial appear normal during first sketch upload,
but it won’t appear after pc14 pull up removed and power on again.
http://wiki.stm32duino.com/index.php?title=Blue_Pill
There it says to put resistor between PA12 (not PC14) and 3.3V:
Hardware installation
BluePillUsbResistor.jpg
The USB standard require a 1.5k pullup resistor on D+, but this board is known to have a wrong value (R10 on the board). It ships with either a 10K resistor or a 4.7k resistor, but it should be replaced with a 1.5k resistor, or put an appropriate resistor value (e.g 1.8k) in between PA12 and 3.3V. It is also true that some PCs are tolerant of incorrect value so, before you change the resistance, you can try if it works in your case.
This can take up to 5 seconds after resetting the board.
Thank you for your reply.
Let me clarify my hardware setting.
R10 on the board is replaced with a 1.5K ohm instead of 10Kohm; R10 is between 3.3V and PA 12 on my blue pill.
That job is done.
That resistor is perminent.
another pull up resistor between PC14 and 3.3V is temperary needed to keep perpetual bootloader mode.
after my first sketch upload done, it should be removed.
The description is read as follows:
Software installation
Bootloader needs to be flashed using USB to Serial or ST-Link (SWD) See Flashing the bootloader
Follow the normal Installation guide
Note that after first flashing the bootloader you may have to place the board into “perpetual bootloader” mode before you can upload a sketch; place resistor between pin PC14 and 3.3V, then reset the board. You should now be able to flash a blank sketch, then remove the resistor and restart the board, after which uploading new sketches should work as expected. If you find that the IDE successfully resets your board, but dfu-util complains about no DFU-devices being present you may have to edit the maple-upload script in tools-folder, find the line where it calls upload-reset and increase the value given to it.
michael_l wrote:Do read this carefully:
http://wiki.stm32duino.com/index.php?title=Blue_Pill
There it says to put resistor between PA12 (not PC14) and 3.3V:
Hardware installation
BluePillUsbResistor.jpg
The USB standard require a 1.5k pullup resistor on D+, but this board is known to have a wrong value (R10 on the board). It ships with either a 10K resistor or a 4.7k resistor, but it should be replaced with a 1.5k resistor, or put an appropriate resistor value (e.g 1.8k) in between PA12 and 3.3V. It is also true that some PCs are tolerant of incorrect value so, before you change the resistance, you can try if it works in your case.
after I unplug the usb cable, remove the PC14 resistor and replug the usb cable.
blue pill power up, and the blink light get off in 5~10 seconds.
in windows device manager, it stay as Maple DFU,
I checked with libusb-win32-bin-1.2.6.0
VID PID stay as 1EAF and 0003 not 0004;
the virtual com port is not established.
stevestrong wrote:You should open the serial monitor only after the PC has re-enumerated the blue pill as serial COM port.
This can take up to 5 seconds after resetting the board.
When I update the first sketch via DFU in perpetual mode,
windows 7 automatic detect and switch to Maple com, and Com print out is correct.
and how to reinstall the driver,
the install_drivers bat file only add VID, PIDs.
Retry it has no effect.
stevestrong wrote:in this case looks like a driver issue, try un-install and then re-install the driver.
Finally I have found the cause.
For the first sketch upload, I selected maple mini board, that’s wrong.
after I change to generic F103C8 board and upload,
then it functions normally.
michael_l wrote:stevestrong wrote:Depends on what I am using: maple mini (clone) or blue pill (128kB), both having stm32duino bootloader.

![[Pending Enhancement] RTC values resetting](https://sparklogic.ru/wp-content/uploads/2019/11/nucleo-l476rg-zestaw-startowy-z-mikrokontrolerem-z-rodziny-stm32-stm32l476-90x90.jpg)