Defective Featherwing ESP32 Coprocessor

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mjs513
 
Posts: 9
Joined: Sat Sep 09, 2017 2:16 pm

Defective Featherwing ESP32 Coprocessor

Post by mjs513 »

For the last week or so I have been trying to update the firmware on the Adafruit Featherwing ESP32 Coprocessor (https://www.adafruit.com/product/4264) using the instructions from the associated learning guide for Upgrade External ESP32 Airlift Firmware (https://learn.adafruit.com/adafruit-air ... t-firmware).

I am using a Adafruit feather wing doubler and a Teensy 3.2 to featherwing adapter.

I double checked the solder jumped pads for RX/TX/GPIO0 were good loaded up the provided the sketch and the Featherwing ESP32 failed to go into boot mode.

Going through the sketch I noticed for the Teensy that it had the GPIO0 pin set to -1, so on the oft chance that was an issue I went ahead and changed it to pin 10 and it appears that it got into Boot mode:

Code: Select all

rst:0x1 (POWERON_RESET),boot:0x2 (DOWNLOAD_BOOT(UART0/UARS___)anooo
Thanks for your help.

PS> Would prefer to just get it working.
But with that said when I tried to use the esptool to flash the update of NINA. However, the esptool responds that board throws a fatal "failed to connect" error (image attached):
esptool_fail_msg
esptool_fail_msg
Capture.PNG (16.86 KiB) Viewed 120 times
It seems similar to viewtopic.php?f=57&t=187502&p=909126&hi ... 32#p909126 and from comments on the Teensy forum other people have had similar issues.

I tried posting on the wifi section but to date no response but since that post I managed to get it into boot mode - I think

User avatar
mikeysklar
 
Posts: 14165
Joined: Mon Aug 01, 2016 8:10 pm

Re: Defective Featherwing ESP32 Coprocessor

Post by mikeysklar »

If you have made it to boot mode are you able to upload the ScanNetworks script to verify the firmware update has taken?

https://learn.adafruit.com/adafruit-air ... 3041770-36

User avatar
mjs513
 
Posts: 9
Joined: Sat Sep 09, 2017 2:16 pm

Re: Defective Featherwing ESP32 Coprocessor

Post by mjs513 »

Unfortunately, after I get to boot esptool fails to update the firmware per the esptool_fail_msg image in the original post. So firmware never updated

UPDATE: Now if I use the esptool with

Code: Select all

python esptool.py --port com22 --before no_reset --baud 115200 write_flash 0 NINA_W102-1.7.4.bin
I get this from the esptool

Code: Select all

esptool.py v3.3
Serial port com22
WARNING: Pre-connection option "no_reset" was selected. Connection may fail if the chip is not in bootloader or flasher stub mode.
Connecting...
Failed to get PID of a device on com22, using standard reset sequence.
...................................

A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (0x07): Possible serial noise or corruption.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html

User avatar
mjs513
 
Posts: 9
Joined: Sat Sep 09, 2017 2:16 pm

Re: Defective Featherwing ESP32 Coprocessor

Post by mjs513 »

In case you are wondering of the setup I am using.
IMG-0639.jpg
IMG-0639.jpg (112.4 KiB) Viewed 104 times
I have check connections between Teensy 4 and the Airlift

User avatar
mikeysklar
 
Posts: 14165
Joined: Mon Aug 01, 2016 8:10 pm

Re: Defective Featherwing ESP32 Coprocessor

Post by mikeysklar »

Do you have a Feather M0 you can run the SerialESPPassthrough.ino on?

I'm have not located a successful example of someone using a Teensy to run the pass through code.

viewtopic.php?f=53&t=171694

User avatar
mjs513
 
Posts: 9
Joined: Sat Sep 09, 2017 2:16 pm

Re: Defective Featherwing ESP32 Coprocessor

Post by mjs513 »

@KurtE did get the airlift breakout board (same one in your link) working with a FTDI cable and a T4.

I did try a Mega but no luck - that version. Unfortunately don't have a feather M0 was planning on ordering one for testing. I am in Queens so delivery will probably be quick.

The Teensy 4 does run scannetworks and other sketches just not the firmware upgrade

EDIT: Just ordered a M0

User avatar
mikeysklar
 
Posts: 14165
Joined: Mon Aug 01, 2016 8:10 pm

Re: Defective Featherwing ESP32 Coprocessor

Post by mikeysklar »

Thank you for ordering the M0. Please let us know if you have any difficulty updating the AirLift firmware using the M0 board.

User avatar
mjs513
 
Posts: 9
Joined: Sat Sep 09, 2017 2:16 pm

Re: Defective Featherwing ESP32 Coprocessor

Post by mjs513 »

One of teensy users (@wwatson) found the solution for the using the passthrough sketch with the Teensy (https://forum.pjrc.com/threads/70062-Te ... post305423) besides changing the GPIO0 pin to 10 from -1 you change the delay between setting the ESP32_RESTN pin to low and ESP_RESTN pin to high to 1000 from 100. Once those changes are made esptool will update the firmware.

Thanks for your help.

Here is the whole sketch for the Teensy in case anyone runs across this post:

Code: Select all

// SPDX-FileCopyrightText: 2018 Arduino SA 
//
// SPDX-License-Identifier: LGPL-2.1-or-later
/*
  SerialNINAPassthrough - Use esptool to flash the ESP32 module
  For use with PyPortal, Metro M4 WiFi...

  Copyright (c) 2018 Arduino SA. All rights reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or ......FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include <Adafruit_NeoPixel.h>

unsigned long baud = 115200;

#if defined(ADAFRUIT_FEATHER_M4_EXPRESS) || \
  defined(ADAFRUIT_FEATHER_M0_EXPRESS) || \
  defined(ARDUINO_AVR_FEATHER32U4) || \
  defined(ARDUINO_NRF52840_FEATHER) || \
  defined(ADAFRUIT_ITSYBITSY_M0) || \
  defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS) || \
  defined(ARDUINO_AVR_ITSYBITSY32U4_3V) || \
  defined(ARDUINO_NRF52_ITSYBITSY) || \
  defined(ARDUINO_PYGAMER_M4_EXPRESS)
  // Configure the pins used for the ESP32 connection
  #define SerialESP32   Serial1
  #define SPIWIFI       SPI  // The SPI port
  #define SPIWIFI_SS    13   // Chip select pin
  #define ESP32_RESETN  12   // Reset pin
  #define SPIWIFI_ACK   11   // a.k.a BUSY or READY pin
  #define ESP32_GPIO0   10
  #define NEOPIXEL_PIN   8
#elif defined(ARDUINO_AVR_FEATHER328P)
  #define SerialESP32   Serial1
  #define SPIWIFI       SPI  // The SPI port
  #define SPIWIFI_SS     4   // Chip select pin
  #define ESP32_RESETN   3   // Reset pin
  #define SPIWIFI_ACK    2   // a.k.a BUSY or READY pin
  #define ESP32_GPIO0   -1
  #define NEOPIXEL_PIN   8
#elif defined(TEENSYDUINO)
  #define SerialESP32   Serial1
  #define SPIWIFI       SPI  // The SPI port
  #define SPIWIFI_SS     5   // Chip select pin
  #define ESP32_RESETN   6   // Reset pin
  #define SPIWIFI_ACK    9   // a.k.a BUSY or READY pin
  #define ESP32_GPIO0    10 //-1
  #define NEOPIXEL_PIN   8
#elif defined(ARDUINO_NRF52832_FEATHER )
  #define SerialESP32   Serial1
  #define SPIWIFI       SPI  // The SPI port
  #define SPIWIFI_SS    16  // Chip select pin
  #define ESP32_RESETN  15  // Reset pin
  #define SPIWIFI_ACK    7  // a.k.a BUSY or READY pin
  #define ESP32_GPIO0   -1
  #define NEOPIXEL_PIN   8
#elif !defined(SPIWIFI_SS)  // if the wifi definition isnt in the board variant
  // Don't change the names of these #define's! they match the variant ones
  #define SerialESP32   Serial1
  #define SPIWIFI       SPI
  #define SPIWIFI_SS    10   // Chip select pin
  #define SPIWIFI_ACK    7   // a.k.a BUSY or READY pin
  #define ESP32_RESETN   5   // Reset pin
  #define ESP32_GPIO0   -1   // Not connected
  #define NEOPIXEL_PIN   8
#endif

#if defined(ADAFRUIT_PYPORTAL)
  #define PIN_NEOPIXEL   2
#elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
  #define PIN_NEOPIXEL   40
#endif
#define PIN_NEOPIXEL   8

Adafruit_NeoPixel pixel = Adafruit_NeoPixel(1, NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  Serial.begin(baud); // TEENSY
  pixel.begin();
  pixel.setPixelColor(0, 10, 10, 10); pixel.show();

  while (!Serial);
  pixel.setPixelColor(0, 50, 50, 50); pixel.show();

  delay(100);
  SerialESP32.begin(baud); //Serial1

  pinMode(SPIWIFI_SS, OUTPUT);
  pinMode(ESP32_GPIO0, OUTPUT);
  pinMode(ESP32_RESETN, OUTPUT);
  delay(100);
  
  // manually put the ESP32 in upload mode
  digitalWrite(ESP32_GPIO0, LOW);

  digitalWrite(ESP32_RESETN, LOW);
  delay(1000);
  digitalWrite(ESP32_RESETN, HIGH);
//  pixel.setPixelColor(0, 20, 20, 0); pixel.show();
  delay(1000);
}

void loop() {
  while (Serial.available()) {
//    pixel.setPixelColor(0, 10, 0, 0); pixel.show();
    SerialESP32.write(Serial.read());
  }

  while (SerialESP32.available()) {
//    pixel.setPixelColor(0, 0, 0, 10); pixel.show();
    Serial.write(SerialESP32.read());
  }
}

User avatar
mikeysklar
 
Posts: 14165
Joined: Mon Aug 01, 2016 8:10 pm

Re: Defective Featherwing ESP32 Coprocessor

Post by mikeysklar »

Awesome. Thank you for sharing the details here. Much appreciated.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”