AVR plus ESP: two-way-flashing?
Posted: Fri Oct 16, 2015 9:23 am
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.
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.