Flashing DevKitC without the micro USB

gabriela
Posts: 3
Joined: Fri May 22, 2020 1:48 pm

Flashing DevKitC without the micro USB

Postby gabriela » Tue May 26, 2020 3:31 pm

Is it possible to flash the Esp32 module in the dev kit WITHOUT using the included micro-usb connection? I've been doing some tests with a max3232 adapter since I need to connect the chip to a RS232 port in the final developement, but while I can read and write through the Rx and Tx pins (EDIT: turns out I can't receive data on the Rx pin of the module, see post below) in the serial port, I can't flash the actual binaries, I get a 'Timeout waiting por packet Header message'. I tried lowering the baud rate, changing the flash configuration in esptool and nothing seems to work. I did the same thing with an external TTL to serial adapter, and again, reading and writing works, but the flashing itself fails.

Unfortunately I don't have access to a module by itself to make this kind of test, so I don't know if the dev kit's connections are inducing noise that prevents the use of external serial adapters for flashing, or if the adapters itself are the issue and need to get a better alternative. I can provide more info in a further post.

Any help is greatly apreciated

EDIT
Last edited by gabriela on Tue May 26, 2020 10:55 pm, edited 1 time in total.

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: Flashing DevKitC without the micro USB

Postby chegewara » Tue May 26, 2020 7:58 pm

Yes, it is possible.
First thing what you have to do is to enter download mode with RST and BOOT buttons, because usually its handled by CP210x or any other USB to UART chip on board.

gabriela
Posts: 3
Joined: Fri May 22, 2020 1:48 pm

Re: Flashing DevKitC without the micro USB

Postby gabriela » Tue May 26, 2020 10:51 pm

Thanks for your reply. Forgot to mention it but I don't think the buttons are the issue. I disabled the automatic reset on the esptool and I did some test flashing through the UART chip on board, first using the buttons, and then strapping the GPIO0 to ground and reseting, leaving the module in boot mode before executing the esptool command. Using the board for flashing, everything works as expected (it fails if I don't press the button on regular mode and works if I pressed them or the module is in boot mode), but it stills fails every time using and external adapter.

I went back and made an echo app to test the communication (code below), it seems the RXD0 pin is not working properly with the serial adapter.

Let's say the dev board is COM2 and the external adapter is COM3. On a terminal I get back what I write if I'm connected to COM2, but not if I'm connected to COM3, however, I can receive text on COM3 if is printed directly on the code, as well as the reset message, which makes me think the module is not printing the data because is not receiving it.

If I connect the adapter to other UART port (GPIO 16 and 17) I do receive the text that I wrote back. In conclusion, the adapter works on its own, the UART port works on its own, but they do not work together well.

[Codebox]#define RXD2 16
#define TXD2 17

void setup() {

Serial.begin(115200);
Serial2.begin(115200, SERIAL_8N1, RXD2, TXD2);

}

void loop() {
while (Serial2.available()) {
Serial2.print(char(Serial2.read()));
}

while (Serial.available()) {
Serial.print(char(Serial.read()));
}
}[/Codebox]

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: Flashing DevKitC without the micro USB

Postby chegewara » Wed May 27, 2020 6:39 am

One question, is it devkit with wroom or wrover module?
Wrover has psram connected to pins 16 and 17.

You can test Serial2 with other pins too, not necessarily 16 and 17.

gabriela
Posts: 3
Joined: Fri May 22, 2020 1:48 pm

Re: Flashing DevKitC without the micro USB

Postby gabriela » Wed May 27, 2020 1:11 pm

The kit is with the wroom module, but my issue is with the main Serial port, not with Serial2, Serial2 works as expected

halilarkl07
Posts: 10
Joined: Thu May 07, 2020 9:09 am

Re: Flashing DevKitC without the micro USB

Postby halilarkl07 » Mon Nov 30, 2020 9:20 am

Hi Gabriela,

I have the same problem. I have a DOIT kit with an esp32 WROOM. Like you are, monitor the esp32 over max3232, with boot and enable buttons I can enter the boot mode but the problem starts from here, I can see over serial monitor "waiting for download" but not the right way. Most of the time I am reading "waiing for ownload" or this kind of corrupted data and flash not working also like yours. Could you pls share your solution if you solve?

Who is online

Users browsing this forum: No registered users and 45 guests