Welcome! Log In Create A New Profile

Advanced

Bootloader initiation via USB - how?

Posted by etherbrat 
Bootloader initiation via USB - how?
January 30, 2021 04:28AM
(Wanhao Duplicator i3 Mini running Marlin 1)
Marlin and the bootloader are separate entities - that much I know. So how does an external program, like Cura, kick the bootloader into action? At first I thought Marlin might support a gcode that transfers control to the bootloader. No evidence of that. So my next best guess is that something in the USB library detects a condition or sequence on the USB port. If I'm not mistaken, the USB port functions in quasi-serial mode, so perhaps the equivalent of a serial "Break" is what does the trick? Can anyone enlighten me as to (a) the mechanism and (b) the particular USB library that is used. Thanks in advance.
Re: Bootloader initiation via USB - how?
January 30, 2021 05:26AM
According to the examples configs for this machine its a WANHAO_ONEPLUS motherboard, ie a mega2560 based controller.

Mega board have a usb/serial chip

One line off of the converter chip is DTR this is wired to the reset line of the Controller MPU

When the operating system sets the serial port DTR line LOW then HIGH the controller board resets. On reset it runs the boot loader

Edited 2 time(s). Last edit at 01/30/2021 05:44AM by Dust.
Re: Bootloader initiation via USB - how?
January 30, 2021 06:52AM
Thank you! At last I understand!
Sorry, only registered users may post in this forum.

Click here to login