To program the ESP32R4 controller with Arduino IDE, you need to make the following settings.

  • ESP32R4 with FLASH 4MB
  • ESP32R4 with FLASH 16MB and PSRAM

ESP32R4 with FLASH 4MB

Main settings:

  • Bord: ESP32 Dev Module
  • Flashs Mide: DIO
  • Flash size: 4MB (for the controller with FLASH 4MB)
  • Partition Scheme: Default 4MB if it isn’t necessary for special projects with OTA, Rainmaker, file system.
  • PSRAM: Disable

ESP32R4 with FLASH 16MB and PSRAM

Main settings:

  • Bord: ESP32 Dev Module
  • Flashs Mide: DIO
  • Flash size: 16MB (for the controller with FLASH 16MB)
  • Partition Scheme: Default 4MB if it isn’t necessary for special projects with OTA, Rainmaker, file system.
  • PSRAM: Enable

Hardware connection.

Update over the serial connection using a serial-to-USB adapter: CH340, FTDI FTR232,  CP2102/2104, PL2303…

Some adapters can be switched between 3.3V and 5V for the data pins, but still provide 5V on the power pin which will irreparably destroy your device. You MUST make sure the data (RX and TX) logil level 3.3V and VCC pins are set for 3.3V.

Serial adapterESP32R4
3.3VMCU3.3V or use power from the board (jumper connected).
ESP32 needs power min 0.35A, if power from the serial-to-USB adapter is not enough, use power from the controller.
TXRXD
RXTXD
GNDGND

ESP32R4 needs to be put into programming mode before the firmware can be uploaded:

  1. Push the button PROG;
  2. Push the button RST;
  3. After 1-second release button RST;
  4. Release button PROG;
  5. After uploading firmware push the button RST.