Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By bmalbusca
#93685 I using the ESP-WROOM-02 (esp8266 core) as WIFI module and the samd21g18 as main processing unit. To test, I´m using the ESP-WROOM-02 DEV board kitc and an Arduino nano IOT which has also a samd21g18 MCU. I flashed the ESP-WROOM-02 via the ESP flash download tool with the AT Firmware v2.2.1.0 . The user guide highlights that the default ESP8266 RTOS AT firmware for ESP-WROOM-02 swaps RX/TX with CTS/RTS.

For testing the UART, I used the Arduino Serial monitor and the UART connected to the on-board FTDI. To link the new pins (IO15 and IO13) , I connected the pin RX0 to IO13 and the TX to IO15 as a bypass. When I sent any AT command (or any thing that I wrote on serial) the ESP always returned an empty line and a new line saying ready. Fist I tough that was the CR and line ending, I tried all combinations a didn´t worked.

Image

To understand was happening I connected a logic analyser to RX0 in order to check if was the same as what I was sending via serial monitor. And it was sending right.

Then, I connected the logic to the IO15 (ESP TX). But something appeared wrong. The first message is missing a bit.

[image 1 - complete message][https://i.stack.imgur.com/SJdXL.png]
[beginning message][https://i.stack.imgur.com/Vjwew.png]

I tested then using an arduino nano iot 33 (uses 3.3V level) to send the AT commands to ESP. I connected directly the arduino to IO15 and IO13 but the result was worst, since the ESP didn´t replied anything to the arduino. The code:

Code: Select all#include <Arduino.h>
#include "wiring_private.h"

//see https://github.com/ostaquet/Arduino-Nano-33-IoT-Ultimate-Guide
Uart Serial0 (&sercom0, 5, 6, SERCOM_RX_PAD_1, UART_TX_PAD_0);
String a;

// Attach the interrupt handler to the SERCOM
void SERCOM0_Handler()
{
    Serial0.IrqHandler();
}



void setup() {
  pinMode(LED_BUILTIN, OUTPUT);      // set LED pin as output
  digitalWrite(LED_BUILTIN, LOW);    // switch off LED pin

  // Reassign pins 5 and 6 to SERCOM alt
  pinPeripheral(5, PIO_SERCOM_ALT);
  pinPeripheral(6, PIO_SERCOM_ALT);



  Serial.begin(115200);               // initialize serial communication at 9600 bits per second:

  // Start my new hardware serial
  Serial0.begin(115200);


}


void loop() {



      Serial0.println("AT+GMR");
      while (Serial0.available()) {
        a = Serial0.readString();
        Serial.print(a);
      }
      delay(1000);


  }


The ESP TX, in other hand, does not reply at all. Also I tried to slow the baud rate to 9600 (at the user guide says to test with 115200). note that I have the grounds connect to each board. Any help would be grateful.
User avatar
By JurajA
#93689 ok. finally a forum and not a Q&A site or issue tracker.

1.) you can set the AT firmware to use standard RX/TC pin if you want

2.) can you communicate with the AT firmware with FTDI on pins 13/15? if not then there is no point to add Nano IoT to the mix.

3.) if you want to test the AT commands with Nano IoT, wire the esp32 to RX/TX pins of Nano and use the SerialPassthrough sketch from IDE Examples Communication section. don't trying to debug custom Uart Sercom and AT commands at once

"ready" is printed only when the AT firmware starts after boot
User avatar
By bmalbusca
#93696 Thank you for your support. Well, I started from the beginning to try to understand what is wrong:
1- I changed the chip for a bare new one, to discard the hypothesis of having any damage IO port.

2- I flash the at firmware. I used the last firmware and recommend by expressif [https://docs.espressif.com/projects/esp-at/en/release-v2.2.0.0_esp8266/AT_Binary_Lists/ESP8266_AT_binaries.html]
-The flash was successful,https://pasteboard.co/kgbgcgXwMmPk.png

3 - connect the FTDI (with baud 115200) to IO13 and IO15.
- I connect the IO13 to TX(FTDI) and IO15 to RX(FTDI) and nothing happened.
- I changed the connections and also nothing changed.
- I change other GND cable, maybe could be broken, but nothing changed
- Changed FTDI, no different results
- tried to use all variatiosn of CR and NL on arduino ide and nothing worked
- I used the putty serial and the result was the same


JurajA wrote:ok. finally a forum and not a Q&A site or issue tracker.

1.) you can set the AT firmware to use standard RX/TC pin if you want

2.) can you communicate with the AT firmware with FTDI on pins 13/15? if not then there is no point to add Nano IoT to the mix.

3.) if you want to test the AT commands with Nano IoT, wire the esp32 to RX/TX pins of Nano and use the SerialPassthrough sketch from IDE Examples Communication section. don't trying to debug custom Uart Sercom and AT commands at once

"ready" is printed only when the AT firmware starts after boot
User avatar
By bmalbusca
#93700 Thank you for your support. So, I restarted from the beginning.

I flashed successfully the chip with the latest and recommended AT Firmware v2.2.0 https://docs.espressif.com/projects/esp ... index.html

I used the ESP flash downloader tool, with the settings set to the same as those in download.config. I flashed the factory bin at 0x0.

The FTDI was then connected to IO15 and IO13. I also tested the command 'AT' using the Arduino IDE's Serial Monitor (set baud 115200). The ESP, however, did not respond to the commands. I tried every possible combination of CR and LE, but nothing came up. FTDI (TX) to IO13 and FTDI RX to IO15 was the setup, but I also tried inverting the connections and got the same result.

I tried to use PuTTY Serial terminal instead of Arduino Serial Monitor, but again, the result was the same (nothing appears). Lastly, I solder a new ESP-WROOM-02 chip, I flashed it with the latest and previous one firmware versions, and nothing appears. Can be the firmware? I saw some successful cases using AT firmware version below v1.7.0. But that version is not available anymore.

Interesting fact, and maybe it's not related, but I flashed Arduino lib's UART code to ESP, and I notice that I can send (TX) to others from ESP but I was no able to read (Serial.available was always 0) on RX. I also tried to use Serial.swap(), but was I unable to send or receive on IO15 and IO13.


JurajA wrote:ok. finally a forum and not a Q&A site or issue tracker.

1.) you can set the AT firmware to use standard RX/TC pin if you want

2.) can you communicate with the AT firmware with FTDI on pins 13/15? if not then there is no point to add Nano IoT to the mix.

3.) if you want to test the AT commands with Nano IoT, wire the esp32 to RX/TX pins of Nano and use the SerialPassthrough sketch from IDE Examples Communication section. don't trying to debug custom Uart Sercom and AT commands at once

"ready" is printed only when the AT firmware starts after boot