Maple Mini DFU and Serial

Discussion about the Maple and other bootloaders
User avatar
RogerClark
Posts: 5302
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Maple Mini DFU and Serial

Postby RogerClark » Sun Jul 10, 2016 3:06 am

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.


DFU util seems to randomly produce this error, but it doesn't actually make any difference.

BTW. I tried removing the "reset" option from the DFU upload, but it stops the upload working.

But as this is more of an erroneous error message than a real problem I didnt pursue it further.

Re: Maple mini getting locked in DFU upload mode

Either its actually locked in upload mode (DFU), or the Maple mini has attempted to trigger USB enumeration and your PC / Mac has not noticed the enumeration.

If its actually locked in DFU upload mode, the LED on the maple mini will continue to flash quickly (indefinitely)
This can only really happen under 2 conditions.
(a). The "Button" is being pressed on the Maple ini
(b). The data in the sketch is not being recognized by the bootloader as a valid program that it can run

If the LED is not flashing quickly, the bootloader has handed control to the sketch and the sketch is running.

Upload a sketch that flashes the LED slowly e.g. delay(1000) and see if the flashing on the LED changes from quick flashing to the slow (1000ms) flash in the sketch)
I suspect in your case the sketch is running, and that your PC has not spotted the signal to re-enumerate


The other possibly option that should not be discounted is that your Maple mini board is faulty e.g. the circuit which resets the USB (to force re-enumeration) is not working e.g. dry joint or faulty component.

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

Re: Maple Mini DFU and Serial

Postby Pito » Sun Jul 10, 2016 6:31 am

I started the stuff this morning and:
1. Maple COM13 appeared in dev man
2. I set port to Com13 in arduino
3. it uploaded and stopped with the message as above, and in DFU mode (I can see the DFU driver in dev man, I cannot see the MMCOM13 in dev man)
4. the LED on MM works as expected
5. after a hw reset I can see MMcom13 (DFU not visible) in dev man
6. after a next hw reset I cannot see MMcom13 (DFU visible) in dev man
5. after a next 2 hw resets I can see MMcom13 (DFU not visible) in dev man
6. when connected to TeraTerm com13 when MMcom13 in dev man is visible, I see correct results, so the MM sketch works..

I have done following test: pressing hw reset on MM every 10-15secs - it shows MMCOM13 once per 15 resets in average, otherwise lands in DFU mode.
PC: nvidia chipset, amd64x2..
:?

User avatar
RogerClark
Posts: 5302
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Maple Mini DFU and Serial

Postby RogerClark » Sun Jul 10, 2016 6:56 am

Your system is not recognizing the USB reset signal sent by the Maple mini.

You could try modifing the core to change the reset pulse duration, and / or add a delay between the reset pulse and the USB subsystem starting up.

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

Re: Maple Mini DFU and Serial

Postby Pito » Sun Jul 10, 2016 7:05 am

Is it not the bootloader stuff? Why core?

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

Re: Maple Mini DFU and Serial

Postby Pito » Sun Jul 10, 2016 7:24 am

I did following changes in usb_serial.cpp:

Code: Select all

...
/*
 * USBSerial interface
 */

#define USB_TIMEOUT 200  //50

..
#define RESET_DELAY 400000 //100000
..


I've done 20x uploads and it resets MM, finds the MMCOM23, uploads, and finishes with MMCOM23 visible in dev man.
I get quite often this message, however

Code: Select all

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.

even it seems to be all ok at the end..
PS: the manual hw reset ends in DFU as before..

User avatar
RogerClark
Posts: 5302
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Maple Mini DFU and Serial

Postby RogerClark » Sun Jul 10, 2016 7:34 am

I always get that message. I don't know what it means but it doesnt seem to matter.

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

Re: Maple Mini DFU and Serial

Postby Pito » Sun Jul 10, 2016 8:30 am

Hmm, when working with my BT serial, the stuff stops to work reliably again. So the there is still an issue with the drivers.. :(

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

Re: Maple Mini DFU and Serial

Postby mrburnette » Sun Jul 10, 2016 1:01 pm

Pito wrote:Is it not the bootloader stuff? Why core?


Remember, the bootloader has only DFU code; the downloaded sketch is merged behind-the-scenes with the USB serial code.

Ray

smithson
Posts: 10
Joined: Tue Dec 13, 2016 3:50 am

Re: Maple Mini DFU and Serial

Postby smithson » Tue Dec 13, 2016 11:46 am

Hi pito

My generic stm32f103 also encounter usb serial issue.
see viewtopic.php?f=28&t=1631

Is it similar to your issue? what is going on now?



Pito wrote:I started the stuff this morning and:
1. Maple COM13 appeared in dev man
2. I set port to Com13 in arduino
3. it uploaded and stopped with the message as above, and in DFU mode (I can see the DFU driver in dev man, I cannot see the MMCOM13 in dev man)
4. the LED on MM works as expected
5. after a hw reset I can see MMcom13 (DFU not visible) in dev man
6. after a next hw reset I cannot see MMcom13 (DFU visible) in dev man
5. after a next 2 hw resets I can see MMcom13 (DFU not visible) in dev man
6. when connected to TeraTerm com13 when MMcom13 in dev man is visible, I see correct results, so the MM sketch works..

I have done following test: pressing hw reset on MM every 10-15secs - it shows MMCOM13 once per 15 resets in average, otherwise lands in DFU mode.
PC: nvidia chipset, amd64x2..
:?


Return to “Maple Bootloader”

Who is online

Users browsing this forum: No registered users and 1 guest