Using SAMD21 to flash ESP32
Posted: Fri Apr 22, 2022 3:47 am
I have a SAMD21 devboard which I would like to use to flash my ESP32 WROVER module.
My computer connects to the SAMD21 via usb, and I can use it to receive logs from my ESP32 over a UART connection.
Unfortunately when I run esptool.py, the connection fails, I get a timeout waiting for packet header.
I am using 115200 8N1, and the ESP32 is in bootloader mode, I receive rst:0x1 (POWERON_RESET),boot:0x27 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
My code on the SAMD21 is very simple
In this framework Serial1 is the UART, and Serial is the USB serial.
Is there something I am not understanding in the protocol between esptool and the FTDI-USB chip on a typical ESP32 dev board? I assumed it was a simple serial connection. I have read all the relevant docs, and am not sure how to proceed.
(The reason I want to achieve this is, I produce a dev board that already has an ESP32 WROVER, and a SAMD21, but no FTDI chip, and I would like to make it easier for my users to flash and debug custom code, although there is no room for an FTDI chip on the board, there is already the SAMD21, and I hope I can put it to use in this way)
My computer connects to the SAMD21 via usb, and I can use it to receive logs from my ESP32 over a UART connection.
Unfortunately when I run esptool.py, the connection fails, I get a timeout waiting for packet header.
I am using 115200 8N1, and the ESP32 is in bootloader mode, I receive rst:0x1 (POWERON_RESET),boot:0x27 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
My code on the SAMD21 is very simple
Code: Select all
#include <Arduino.h>
void setup()
{
Serial.begin(115200);
Serial1.begin(115200);
}
void loop()
{
while(Serial.available())
{
Serial1.write(Serial.read());
}
while(Serial1.available())
{
Serial.write(Serial1.read());
}
}
Is there something I am not understanding in the protocol between esptool and the FTDI-USB chip on a typical ESP32 dev board? I assumed it was a simple serial connection. I have read all the relevant docs, and am not sure how to proceed.
(The reason I want to achieve this is, I produce a dev board that already has an ESP32 WROVER, and a SAMD21, but no FTDI chip, and I would like to make it easier for my users to flash and debug custom code, although there is no room for an FTDI chip on the board, there is already the SAMD21, and I hope I can put it to use in this way)