Friday, February 21, 2020

Flash firmware to MRR ESPA and MRR ESPE correctly

The blue screen of death on my LCD controllers made clear an issue with the ESP32 boards (MRR ESPA and MRR ESPE). The issue is the state of pins when the ESP32 microcontroller is in "download" mode (GPIO0 pulled to GND when booting up; ESP32 datasheet states the default states of pins on reset but not during "download" mode). While waiting to flash new firmware in this "download" mode, output pins could be in the HIGH state. Which may be potentially disastrous.

Why?

For one thing, it means current will be flowing to the heating elements WITHOUT control. For the brief moment of one to two seconds when booting up, this is not an issue. But if GPIO0 is pulled to GND for an extended period, this continuous and uncontrolled heating for the heated bed and/or hotend can potentially result in fire.

Another possible problem is when the fan connector is connected to a laser engraver. This could potential turn on the laser, and burn whatever the laser is pointed at.

Therefore, please NEVER try to flash firmware via the USB port when VIN is connected.

The right way to flash firmware?
Method 1: Disconnect wires from the board. Power the board via VUSB via the jumper. Connect the board to the computer via USB and flash the firmware.
Method 2: Use the ESP3D webUI to update the firmware. This is the safer and easier option, but can only be possible if the board has already been flashed beforehand to incorporate ESP3D support.

(Critical output pins on the MRR ESPA and MRR ESPE should have resistors to pull them high or low depending on what their default state should be, so this should not be an issue during normal bootup.)

No comments: