ESP32 not talking

thaintrinh
Posts: 5
Joined: Wed Mar 16, 2022 9:34 am

ESP32 not talking

Postby thaintrinh » Wed Mar 16, 2022 9:40 am

Hello,
I have my custom-made ESP32 board.
After soldering, I can only talk to some of them.
To these boards, this is the uploading log:
Sketch uses 204602 bytes (15%) of program storage space. Maximum is 1310720 bytes.
Global variables use 13416 bytes (4%) of dynamic memory, leaving 314264 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.0-dev
Serial port COM7
Connecting.....
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: e8:db:84:1c:62:08
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4096.0 kbit/s)...
Hash of data verified.
Compressed 18656 bytes to 12053...
Writing at 0x00001000... (100 %)
Wrote 18656 bytes (12053 compressed) at 0x00001000 in 0.1 seconds (effective 1043.7 kbit/s)...
Hash of data verified.
Compressed 204720 bytes to 106306...
Writing at 0x00010000... (14 %)
Writing at 0x00014000... (28 %)
Writing at 0x00018000... (42 %)
Writing at 0x0001c000... (57 %)
Writing at 0x00020000... (71 %)
Writing at 0x00024000... (85 %)
Writing at 0x00028000... (100 %)
Wrote 204720 bytes (106306 compressed) at 0x00010000 in 2.3 seconds (effective 715.8 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 1536.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
I'm using Arduino IDE to upload the code.
  1. int val = 0;
  2.  
  3. void setup() {
  4.   Serial.begin(115200);
  5.   pinMode(22, OUTPUT); // Set GPIO22 as digital output pin
  6.  
  7. }
  8.  
  9. // put your main code here, to run repeatedly
  10. void loop() {
  11.   // read hall effect sensor value
  12.   // print the results to the serial monitor
  13.   Serial.println("test");
  14.   digitalWrite(22, HIGH);
  15.   delay(2000);
  16.   digitalWrite(22, LOW);
  17.   delay(2000);
  18. }
Here's my schematic:
image_2022-03-16_103904.png
image_2022-03-16_103904.png (143.24 KiB) Viewed 3330 times
This is driving me nuts,
Thank you in advance.

ESP_Sprite
Posts: 9770
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 not talking

Postby ESP_Sprite » Thu Mar 17, 2022 2:31 am

Moving this to the 'hardware' forum as this is unlikely to be a bug in Espressif software/hardware.

It's not really useful to post a log for the boards that *do* work; could you post the log for one that *doesn't*?

thaintrinh
Posts: 5
Joined: Wed Mar 16, 2022 9:34 am

Re: ESP32 not talking

Postby thaintrinh » Fri Mar 18, 2022 9:54 am

Hello,
Thanks for replying.
This log is from the one that doesn't work :)
I uploaded the code and the ESP does not respond. (For example, in this case, GPIO22 is not working)

ESP_Sprite
Posts: 9770
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 not talking

Postby ESP_Sprite » Fri Mar 18, 2022 12:32 pm

There's nothing wrong with that log per se... does the chip work after you manually press reset?

thaintrinh
Posts: 5
Joined: Wed Mar 16, 2022 9:34 am

Re: ESP32 not talking

Postby thaintrinh » Fri Mar 18, 2022 12:53 pm

Hello,
I don't have a RESET button on the board. Should I just connect pin 9 shortly to GND?
Although, when the board is plugged in the computer, GPIO22 is floating.
However, when I remove the USB connection (power is still there), pin GPIO22 is producing 1,2V.
That's really weird.
I'm using ESP32-WROOM-32U.
Thanks again for helping me :)

thaintrinh
Posts: 5
Joined: Wed Mar 16, 2022 9:34 am

Re: ESP32 not talking

Postby thaintrinh » Fri Mar 18, 2022 4:44 pm

I managed to solve my problem. Here's the solution for anyone who's facing the same thing:
I flashed empty code for 10 or more times.
Then ESP started working again.
However, each time after successfully uploading code, you have to restart the ESP for it to work.
Pretty weird but it works :)

ESP_Sprite
Posts: 9770
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 not talking

Postby ESP_Sprite » Mon Mar 21, 2022 1:25 am

Is the schematic the entire schematic? Normally, there's a little two transistor circuit that connects between DTR/RTS and IO0/EN. If you do not have that (or there's something wrong with it), you indeed need to manually mess with reset and IO0 to flash/run your program.

thaintrinh
Posts: 5
Joined: Wed Mar 16, 2022 9:34 am

Re: ESP32 not talking

Postby thaintrinh » Mon Mar 21, 2022 5:51 am

Hello,
That's not the entire schematic. I have 2 transistors which control the DTR and RTS pins and these two have been working fine.
I doubt that this have something to do with the flash of the ESP32U. As I don't have the hardware ready for the flash reset. I had to upload the empty code 10 times.
If you have any insights, please share with me :)
Thank you very much in advance :)

Who is online

Users browsing this forum: No registered users and 43 guests