Flash wroom 32 module

nighttripper
Posts: 2
Joined: Sun Dec 15, 2019 10:48 am

Flash wroom 32 module

Postby nighttripper » Tue Mar 24, 2020 1:57 pm

Hi, I have a standalone wroom32 module that I am trying to flash. I have had an absolutely hideous time trying to get any code on to this. After numerous efforts, hours and hours of wasted time, and trying CP2102/ CP2104, I have finally had code uploaded to it... or so I thought. The issue I have now is that the code doesn't run in the serial monitor- it is literally only the wifi search sketch.

The chip still appears to be stuck in bootload mode and periodically resets. This is the output in serial:

Code: Select all

13:46:20.150 -> Rebooting...
13:46:20.183 -> ets Jun  8 2016 00:22:57
13:46:20.183 -> 
13:46:20.183 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
13:46:20.183 -> configsip: 0, SPIWP:0xee
13:46:20.183 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
13:46:20.183 -> mode:DIO, clock div:2
13:46:20.183 -> load:0x3fff0018,len:4
13:46:20.183 -> load:0x3fff001c,len:1100
13:46:20.183 -> load:0x40078000,len:9232
13:46:20.183 -> load:0x40080400,len:6412
13:46:20.183 -> entry 0x400806a8
13:46:20.449 -> ;`⸮f⸮fx⸮x⸮⸮⸮⸮⸮f~⸮⸮⸮~⸮⸮~⸮⸮fx`⸮f~x⸮⸮fxf~f⸮⸮ff⸮⸮⸮⸮⸮⸮⸮⸮ff⸮⸮
13:46:30.741 -> E (10760) task_wdt:  - IDLE0 (CPU 0)
13:46:30.741 -> E (10760) task_wdt: Tasks currently running:
13:46:30.741 -> E (10760) task_wdt: CPU 0: wifi
13:46:30.741 -> E (10760) task_wdt: CPU 1: IDLE1
13:46:30.741 -> E (10760) task_wdt: Aborting.
13:46:30.741 -> abort() was called at PC 0x400dcaf3 on core 0
13:46:30.741 -> 
13:46:30.741 -> Backtrace: 0x4008efe0:0x3ffbe160 0x4008f211:0x3ffbe180 0x400dcaf3:0x3ffbe1a0 0x40081a15:0x3ffbe1c0 0x401360c6:0x3ffb5290 0x40136115:0x3ffb52b0 0x401365c5:0x3ffb52d0 0x401334cd:0x3ffb5370 0x401337a2:0x3ffb53f0 0x4013420a:0x3ffb5440 0x40135060:0x3ffb5460 0x40135518:0x3ffb5480 0x400d9bfa:0x3ffb5540 0x400d9eaa:0x3ffb5570 0x4011032d:0x3ffb55a0 0x40110432:0x3ffb55d0 0x4011073a:0x3ffb5600 0x401108cb:0x3ffb5630 0x400920c4:0x3ffb5650 0x4008af7d:0x3ffb5690
13:46:30.774 -> 
13:46:30.774 -> Rebooting...

I have tried disconnecting the DTR and RTS pins, however, it seems that it is stuck in a bootload mode I have not strapped even with IO0 pulled to VCC.
I have already been through 5 chips trying to get this thing to even accept an upload, I thought I had finally managed to get code on the chip but to get here and have this happen, it has been like a kick in the balls if I'm honest! Has anyone got any ideas on what to try now, I am literally tearing my hair out as I cannot understand why it is still in boot mode...
Cheers

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

Re: Flash wroom 32 module

Postby ESP_Sprite » Wed Mar 25, 2020 2:17 pm

What is the power supply to your module? A weak LDO, or even a shitty USB cable or weak USB port, can lead to issues as the power use of the ESP32 is pretty close to what an USB port can deliver. If in doubt, try to power your module with a lab power supply on the 3.3V input.

nighttripper
Posts: 2
Joined: Sun Dec 15, 2019 10:48 am

Re: Flash wroom 32 module

Postby nighttripper » Sat Mar 28, 2020 11:20 am

Hi, thanks very much for your reply it is appreciated!

The power supply is independent on a PCB. I have tried a different power supply and it is the same issue. I am using a 5V wall wart that puts out 5.4V, I have tried using a 6.5V to ensure the 3.3V regulator is not dropping out.

So, I have played around a bit and finally got some working code on there - a simple hello world program for the lcd. It works fine no issues, however, when I put the basic wifi scan sketch on there I have the same serial output as above. I put my big sketch on there - keeps resetting, disabled all wifi calls and SPI related stuff for SD card logger and it works fine. I will have to go through and reactivate in steps until it breaks. So, this begs the question is there extra power demand from the part of the chip that controls wifi processes? I think this reboot every 5 seconds or so issue could be related to something to do with wifi. Could it be the case that if I don't call for wifi processes this part of the chip stays idle during its execution cycle? Please forgive my ignorance, internal chip architecture is a bit above my pay grade!

Looking back I only have a 10uf, 1uf, and 0.1uf bypass capacitors after the 3.3V voltage regulator. My 100uf reservoir capacitor is on the 5V side, I will try and see if there is benefit from adding in an additional reservoir capacitor after the 3.3V regulator today.

Now, I had major issues flashing, I used DTR & RTS pins with the transistors as reccommended in the Dev kit C schematic. However, it would appear that it is not working, like the original boards, where you had to push buttons (EN and IO0 to gnd, release EN and hold til upload complete) to get code on there. I thought these transistors were to control this switching through the relevant pins. Is there anything I should be aware of to improve this circuit and get it working correctly? I used TO92 variety of S8050 tranistors.

This whole flashing process should have been easy to do really but it turned in to an ordeal for me: manually flashing chips is all new to me though. It appears that the reset through RTS is not working after uploading. I'll check the wiring again but I'm fairly sure its correct. It had stopped working again on me briefly where I could not upload code again, but it appears that for some reason the left hand port on my laptop was not supplying sufficient power to the CP2104. Switched back to right hand side and worked again, this was probably a source of woes. Total head fry!
Cheers

Who is online

Users browsing this forum: No registered users and 92 guests