ESP32 from Bare Chip

User avatar
andriy
Posts: 11
Joined: Mon Dec 07, 2015 9:14 pm

ESP32 from Bare Chip

Postby andriy » Sat Nov 05, 2016 11:33 pm

A newbie here on ESP32, but has quite many experience with ESP8266. Forgive for newbie question.
I have some esp32 bare chips. Made a PCB and soldered those 48 pins of QFN and supporting components. The question is then what?
I tried to connect UART with USB to Serial module, and nothing appear.
From my experience with Atmel SAMD, I need to burn a bootloader before I can communicate via UART. I can use STLink v2 for that. Is that the case with esp32? Any lead of how to burn the bootloader on esp32?

Thanks guys!

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32 from Bare Chip

Postby ESP_igrr » Sun Nov 06, 2016 6:57 am

ESP32, just like the ESP8266, has bootloader present in mask ROM, so there I no need to burn anything. Would you mind posting your schematic so that we can check the way the chip is bootstrapped? ESP32 has a feature that one of the pins can be used to disable UART output at boot time.

User avatar
andriy
Posts: 11
Joined: Mon Dec 07, 2015 9:14 pm

Re: ESP32 from Bare Chip

Postby andriy » Mon Nov 07, 2016 9:08 am

ESP_igrr wrote:ESP32, just like the ESP8266, has bootloader present in mask ROM, so there I no need to burn anything. Would you mind posting your schematic so that we can check the way the chip is bootstrapped? ESP32 has a feature that one of the pins can be used to disable UART output at boot time.
Hi ESP_igrr,
Thanks so much for your reply. Please find attached schematics. It's basically heavily based on original ESP-WROOM-32 module. Please kindly review it.
Image

One question though, even though the UART output is somehow disabled, would it be still be able to be flashed?

Thanks again.

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32 from Bare Chip

Postby ESP_igrr » Mon Nov 07, 2016 12:25 pm

Are MISO and SD2 nets connected? I see a pull up resistor on one of them, and a pull down on another, and both names are near MTDI pin of the chip... But that would only affect flash voltage selection. You should still see ROM bootloader output even if flash is not readable, provided that MTDO is pulled up high (which is the case in your schematic).

Aside from that, I don't see anything wrong with the schematic. I will show it to my colleagues to see if they can spot anything.

User avatar
andriy
Posts: 11
Joined: Mon Dec 07, 2015 9:14 pm

Re: ESP32 from Bare Chip

Postby andriy » Mon Nov 07, 2016 2:00 pm

ESP_igrr wrote:Are MISO and SD2 nets connected? I see a pull up resistor on one of them, and a pull down on another, and both names are near MTDI pin of the chip... But that would only affect flash voltage selection. You should still see ROM bootloader output even if flash is not readable, provided that MTDO is pulled up high (which is the case in your schematic).

Aside from that, I don't see anything wrong with the schematic. I will show it to my colleagues to see if they can spot anything.
Yes, you're right, it's my mistake, MISO and SD2 are connected and pulled up and down apparently. But I've spotted that earlier and choose not to put the pull-up and pull-down resistors, yet still no output on UART. You're saying that "MTDO" should be pulled down in so that the flash readable?

We're going to try to solder one more chip on a new PCB, and see if it's just soldering issue. Thanks.

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32 from Bare Chip

Postby ESP_igrr » Tue Nov 08, 2016 3:19 am

MTDO should be pulled up high in order for UART bootloader diagnostic output to be visible. It will still work in UART download mode with MTDO pulled low, but you won't see a bootup message.

My colleagues have also pointed out that you have GPIO2 pulled up via R30. If GPIO2 is high, the chip will not go into UART download mode.

Please double check ESP32 bootstrapping pin requirements, you can find the table on the last page of ESP32 Pin List document:
http://espressif.com/en/support/downloa ... d%5B%5D=13

User avatar
andriy
Posts: 11
Joined: Mon Dec 07, 2015 9:14 pm

Re: ESP32 from Bare Chip

Postby andriy » Tue Nov 08, 2016 4:28 am

Thanks again for your reply and directions. Will check and revise the schematics.

Just an update. So we solder one more chip to a new PCB, by only soldering the chip, chip enabled pullup resistor, 40Mhz crystal and capacitors, and carefully inspect the solder quality, hey...it starts to spit out something:

Code: Select all

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK
>ets Jun  8 2016 09:22:57


Flash read err is understandable since the flash memory is not yet soldered. We'll continue to solder it and see what happen.
Will update.

User avatar
andriy
Posts: 11
Joined: Mon Dec 07, 2015 9:14 pm

Re: ESP32 from Bare Chip

Postby andriy » Tue Nov 08, 2016 3:48 pm

More update. So we managed to solder the flash IC and success booting from flash.
It's time to upload a firmware. And when I did, it is ALMOST success, until the very last error:

Code: Select all

A fatal error occurred: MD5 of file does not match data in flash!
The complete log:

Code: Select all

esptool.py v2.0-dev
Connecting...
Uploading stub...
Running stub...
Stub running...
Attaching SPI flash...
Configuring flash size...
Erasing flash...
Compressed 4192 bytes to 2755...

Writing at 0x00001000... (100 %) 
Wrote 4192 bytes (2755 compressed) at 0x00001000 in 0.2 seconds (effective 136.5 kbit/s)...
Hash of data verified.
Erasing flash...
Compressed 96 bytes to 57...

Writing at 0x00004000... (100 %) 
Wrote 96 bytes (57 compressed) at 0x00004000 in 0.0 seconds (effective 64.5 kbit/s)...
Hash of data verified.
Erasing flash...
Compressed 221856 bytes to 61331...

Writing at 0x00010000... (25 %) 
Writing at 0x00014000... (50 %) 
Writing at 0x00018000... (75 %) 
Writing at 0x0001c000... (100 %) 
Wrote 221856 bytes (61331 compressed) at 0x00010000 in 6.1 seconds (effective 288.8 kbit/s)...
File  md5: feec42a7ea89f6f325443876744d21bc
Flash md5: fde8c39d84fd3405377df6361b1c38a5

A fatal error occurred: MD5 of file does not match data in flash!
A fatal error occurred: MD5 of file does not match data in flash!
Anyone experience the same? Any thoughts?

Thanks.

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32 from Bare Chip

Postby ESP_igrr » Tue Nov 08, 2016 3:57 pm

Please check suggestions in this topic and follow up there if problem persists:

http://www.esp32.com/viewtopic.php?f=2&t=322

User avatar
andriy
Posts: 11
Joined: Mon Dec 07, 2015 9:14 pm

Re: ESP32 from Bare Chip

Postby andriy » Wed Nov 30, 2016 3:24 pm

ESP_igrr wrote:Please check suggestions in this topic and follow up there if problem persists:

http://www.esp32.com/viewtopic.php?f=2&t=322
Long time not updating. Regarding the MD5 issue, I've solved it by changing the SPI flash IC.
Initially I used S25FL116K0XMFI011. Then I used the exact IC as ESP-WROOM (and other boards), which is W25Q32FVSIG, the problem went away.

Anybody care to explain? I check a glance both IC spec. Both are NOR Flash, but with small different frequency (108 MHz vs 104 MHz).

Who is online

Users browsing this forum: Bing [Bot] and 146 guests