Maple Mini has USB and upload issues.

Windows XP,Vista,7,8 and 8.1 etc
Post Reply
mmahmud1
Posts: 8
Joined: Thu Jan 11, 2018 12:08 am

Maple Mini has USB and upload issues.

Post by mmahmud1 » Fri Jan 12, 2018 7:04 pm

Greetings, I'm new at this so please forgive. This is pretty complex to me, so I will try to be terse but this will probably be rather long. Let see if I can just hit the major high points.

My computer is an HP laptop Windows 10 AMD A6 5200 processor 8GB . I bought these maple minis:
https://www.amazon.com/initeq-STM32F103 ... Maple+Mini

I followed the instructions from several web sites:
https://github.com/rogerclarkmelbourne/ ... stallation

I was running the device driver installation batch file and looking in the device manager. I could see the DFU device, but not the serial port. Be sure turn on View/Show hidden devices. And DFU is under libusb-win32 devices. Thanks google. After many attempts I was finally able to see the new COM port associated with the Maple in the device manager. However, it did not show up in the IDE. Per the suggestion, I loaded the blink sketch anyway. I encountered DFU errors, but the transfer took amd the blink program was running. But the port disappeared again and the serial monitor could not be run.

ON subsequent attempts to upload the program, I got more errors, and eventually the Maple board "locked up." The reset button would not work, but the blink program was still running. I unplugged the maple board to reset it. I had to go back an rerun the driver install program to make the port become visible again in the IDE. I never disappears from the device manager. On one iteration I unplugged it right when the uload was trying to connedct, and the upload worked again. This must be similar to the suggestion you made in the other thread:

"The normal way to do this is to hold the reset button down until the IDE tries to upload, then release the button."

So I still don't know how to enable the serial monitor, and I wonder if I can replace the boot loader.


Here is the output from the first run on a virgin maple board. I have logs from subsequent runs as well.

First run on VIRGIN BOARD: (port was not available, used default from previous run)
Sketch uses 16020 bytes (14%) of program storage space. Maximum is 110592 bytes.
Global variables use 2816 bytes (16%) of dynamic memory, leaving 14592 bytes for local variables. Maximum is 17408 bytes.
maple_loader v0.1
Resetting to bootloader via DTR pulse
Reset via USB Serial Failed! Did you select the right serial port?
Searching for DFU device [1EAF:0003]...
Assuming the board is in perpetual bootloader mode and continuing to attempt dfu programming...

Found it!

Opening USB Device 0x1eaf:0x0003...
Found Runtime: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=1, name="DFU Program FLASH 0x08005000"
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=320
Starting download: [##################################################] finished!
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
Resetting USB to switch back to runtime mode
error resetting after download: usb_reset: could not reset device, win error: The system cannot find the file specified.

User avatar
Pito
Posts: 1739
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Maple Mini has USB and upload issues.

Post by Pito » Fri Jan 12, 2018 8:28 pm

Welcome to the club!
You have uploaded the sketch ok, the last line error message is to be ignored :)
You have to set in the IDE for the actual sketch the COMxx port which has been allocated by the driver to Maple Serial.
Which IDE version and what stm32duino core do you use?
Pukao Hats Cleaning Services Ltd.

mmahmud1
Posts: 8
Joined: Thu Jan 11, 2018 12:08 am

Re: Maple Mini has USB and upload issues.

Post by mmahmud1 » Sat Jan 13, 2018 1:52 am

Thank you for the feedback.

Hmm, I was going to tell you about how the port does not appear in the IDE (v1.8.5) so I plugged it in again and the port is there. And the serial monitor is working. However, when I try to upload I get these errors:

Sketch uses 2184 bytes (6%) of program storage space. Maximum is 32256 bytes.
Global variables use 194 bytes (9%) of dynamic memory, leaving 1854 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x34
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x36
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x62
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x6c
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x69
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x6e
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x6b
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x0d
An error occurred while uploading the sketch

What I was doing before was rerunning the device batch file every time. This would make the com port visible in the IDE. But after I load and get errors, it goes away again. But the behavior is a little different now. I will run some more tests. I tried pressing the reset button. I reset but the error persists.

mmahmud1
Posts: 8
Joined: Thu Jan 11, 2018 12:08 am

Re: Maple Mini has USB and upload issues.

Post by mmahmud1 » Sat Jan 13, 2018 2:15 am

Hang on, I had the wrong board selected. I'm running more tests. I'm starting to have some success I think.

User avatar
mrburnette
Posts: 2210
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Maple Mini has USB and upload issues.

Post by mrburnette » Sat Jan 13, 2018 3:58 am

DFU is only available when the bootloader is active (Reset pressed & released) until it times out.
Serial USB is only enumerated when the bootloader times out and a sketch with Serial active runs.

When one buys an STM32 board, the state of the bootloader & sketch are unknown. Some boards seem to have the Leaflabs "old" bootloader and some have a genetic bootloader and some have no bootloader... and one is reported to have "our" forum bootloader.

Windows works, but expect errors from time to time for no apparent reason. 90% is my estimate of success with Windows (and I am a MCSE.) Linux is near 100% but will still burp on occasion. If you must have 100% and Windows, the STM32DUINO bootloader code is not for you... ST-LINK would be a better methodology.


Ray

mmahmud1
Posts: 8
Joined: Thu Jan 11, 2018 12:08 am

Re: Maple Mini has USB and upload issues.

Post by mmahmud1 » Sat Jan 13, 2018 5:10 am

I think my second board is working pretty well. Maybe a hardware issue with the first one. I'll let you know. Thanks.

User avatar
Pito
Posts: 1739
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Maple Mini has USB and upload issues.

Post by Pito » Sat Jan 13, 2018 9:02 am

You have to flash in the bootloader from here https://github.com/rogerclarkmelbourne/ ... r/binaries to get "optimal results".
Use the maple_mini_boot20.bin for your Maple Mini board clone..
Pukao Hats Cleaning Services Ltd.

User avatar
mrburnette
Posts: 2210
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Maple Mini has USB and upload issues.

Post by mrburnette » Sat Jan 13, 2018 3:02 pm

mmahmud1 wrote:
Sat Jan 13, 2018 5:10 am
I think my second board is working pretty well. Maybe a hardware issue with the first one. I'll let you know. Thanks.
Common failures I have witnessed:

1) USB connector loose/not soldered or cold-soldered

2) bridged uC solder connection where the solder mask did not work

3) micro-cracks or one-end loose components in PCB SMT parts due to rough handling by transportation... bubble pack shipment

#1 is the easiest to fix and #3 could be difficult to find.
#2 must be carefully compared to a working board because some boards have solder lanes purposefully shorted!

Ray

Post Reply