Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By mi_ka
#31529 I have questions for a planned project with AVR (@5V) and ESP8266 (Wroom-02 module). AVR for timing-critical tasks. External interfaces: just UART and ISP of AVR (used during development only; 230V PCB). AVR and ESP must be able to flash each other, ie. must be able to reset each other and start the other's bootloader [1].

a - What happens on the ESP's GPIO lines during boot (AT firmware)? I heard of signals on GPIO0 and GPIO2. Are the other ones quiet (high impedance), so that two of them can be my AVR's reset / bootloader lines? I don't want to get into a reset loop (AVR resetting ESP and then getting reset by starting ESP).

b - Noise: Is the typical AVR reset circuit (47N + 10K) suitable for the ESP, too? My reset lines could be 100mm long, they are below a switching power supply.

c - According to the Hardware User Guide (http: //akizukidenshi.com/download/ds/espressifsyst ...), GPIO2 and GPIO15 should be H / L. It also states that internal pull-ups achieve that, so that my external R would be superfluous. However, the example circuits in the same document show pull-ups / downs ... ??

d- Does it make a difference if the ESP is reset by the reset line or by toggling the chip's enable pin? Are the GPIO levels identical in both cases (undetermined respectiviely determined by external pull-ups/downs)?

e - To start programming the ESP, is a reset sufficient (while GPIO0=L) or must power be toggled?

f - Does it make a difference if the PCB behind the EPS's antenna is just free of traces or milled away? Would not cost extra.

---
1:
Each chip must be able to reset the other chip and start its bootloader
- At first (during development):
o ESP with standard AT Firmware
o Programming the AVR (boat loader + firmware) via ISP
o Programming the ESP in-circuit using a PC via the AVR:
- AVR firmware brings ESP in programming mode (reset + GPIO0=L0)
- AVR firmware connects to PC (1st UART) and ESP (2nd UART) and connects both in software, as if the PC was connected to the ESP (saves breaking out ESP signals).
- PC flashes ESP via AVR) with the usual tools for COM ports
- Later (end user):
o No cable connections allowed, as it is a 230V-board.
o Alternative ESP firmware can perform OTA updates (local wifi network) of AVR and ESP. For this purpose, there will be a boot loader on the AVR, which the ESP can start by reset at any time.
Last edited by mi_ka on Sun Oct 18, 2015 6:21 am, edited 1 time in total.
User avatar
By martinayotte
#31654 About PullUps/PullDowns, they are mandatory since internal ones are too weak. Even Espressif document has some contradictions about it :

Hardware User Guide on page 14/15, section 2.2.2 :
There is an internal pull-up in the CHIP_EN pin, so no external pull-up is needed.
[...]
There exists internal pull-up resistor in the reset pin, Pin32, which can be left dangled when it is not used.
[...]
Note that this pin cannot be dangled.


Many people mentioned in this forum that simply by touching the floating RES pin will produce a reset.
So, personally, I'm using 10K or 4K7 resistors on all those pins, RES, CH_PD, GPIO15, GPIO2 and GPIO0.
User avatar
By mi_ka
#31656 > I'm using 10K or 4K7 resistors on all those pins

Either of those or mixed? I noticed the Hardware Guide uses stronger pull-ups (5K) than pull-downs (10K). Layout would be easier if all were 10K (resistor array).