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

User avatar
By RFZ
#86649 Perfect! Thx for pointing me to the loopback mode! The TX level status bit actually really seems to be broken... But the RX level status bit works and thx to loopback mode it is the same TX :D

Code: Select all#include <Arduino.h>
#include <Ticker.h>
Ticker tick;
// U1 TX: GPIO_02 / D4
#define P_DEBUG 14 // D5
#define DEBUG_HIGH GPOS = 1<<P_DEBUG
#define DEBUG_LOW GPOC = 1<<P_DEBUG

void ICACHE_RAM_ATTR send() {
  DEBUG_HIGH;
  DEBUG_LOW;
  U1F = 0x80;
  U1F = 0x80;
}

void setup() {
  Serial1.begin(9600);
  pinMode(P_DEBUG,OUTPUT);
  U1S |= 0x01 << USTXC;
  U1D = 10*50; // 50µs pulse
  U1C0 |= 1<<UCLBE; // enable loobback mode
  tick.attach(0.001, send); // every 1ms
}

void loop() {
  if(U1S&(1<<USRXD)) {
    DEBUG_HIGH;
  } else {
    DEBUG_LOW;
  }
}


Code: Select all// What I get:
// IO_02: ‾‾‾‾|_____|‾|_____|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___
// DEBUG: ‾‾‾‾|_____|‾|_____|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|___


2020-04-18 19_10_09-Window.png


Whats the best way to tell espressif about that? I'd be really interested if it is an hardware issue...
Can please someone confirm that?
You do not have the required permissions to view the files attached to this post.
User avatar
By eriksl
#86737 Did you test whether despite in loopback mode the signal is output to the actual pin? I'd guess not, but if it is, it may be a workaround indeed and interesting for others as well maybe.

There hasn't been any development for ESP8266 in two years (besides a few very intrusive bugs fixed) so I don't think Espressif will really care. They're focussing on the ESP32 now, with the (imho) dreaded IDK/RTOS SDK, which doesn't let you access hardware yourself.
User avatar
By RFZ
#86742
eriksl wrote:Did you test whether despite in loopback mode the signal is output to the actual pin? I'd guess not, but if it is, it may be a workaround indeed and interesting for others as well maybe.


What pin? The signal is still present on TX of uart1. This is what you can see in my logic analyzer graphs and that's also why this workaround really works.

I've not tested if it is also present on the RX, because as far as I know the RX pin is not even connected to a usable pin.

eriksl wrote:There hasn't been any development for ESP8266 in two years (besides a few very intrusive bugs fixed) so I don't think Espressif will really care. They're focussing on the ESP32 now, with the (imho) dreaded IDK/RTOS SDK, which doesn't let you access hardware yourself.


Yeah, I just ask for confirmation of the issue ;) Because if it is actually confirmed, I'd file an issue on the "official" arduino SDK to add a comment in the header file so others won't have to deal with endless hours of debugging.