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

User avatar
By eriksl
#43625
RichardS wrote:
martinayotte wrote:
eriksl wrote:The GPIO1 and GPIO3 where high-impedance though (of course, if you think of it, nothing connected). I started with a pull-down. I used 1k for a strong pull but not too strong to damage the driver (1k = 3.3 mA). This made the pin going down all of the time, rendering the UART unusable and also made the esp not boot up. Then changed the resistors to pull-up and voilà, all working again.

Did you tried to pulled up RX only while leaving TX floating ?
Because it could be that RX with LOW state is interpreted as Break signal ...


Can you try what Martin is saying I would like to know.... just pull up RX

I will try, but for another reason. Receiving a continuous stream of breaks won't interfere with WLAN connection, so it can never be the problem. The UART recognises a break sets a flag in a register accordingly. It does nothing else. We're not talking about the "AT" style firmware here, but my own firmware, so I have everything "under control". And it ignores it, simple as that.
User avatar
By eriksl
#43628
AdrianM wrote:
eriksl wrote:All inputs are clear, no internal pull-ups. I know that because I write the firmware myself ;)

I don't like the internal pull-ups because:

- they're not real pull-ups, they're current sources (see explanation from a.o. ATmel in their docs)
- they're too weak to make a real difference

Also, it's not clear whether enabling the internal pull up on a pin is honoured when the pin is routed to the UART. I actually doubt it.


Yet you seemed to be surprised that you needed to add an external pull-up on RXD. Very confusing (but then again I'm easily confused).

But serioulsy, I really would like to know why you think current sources are not effective as pull-ups and why ~27K equivalent is too weak. I couldn't work out what ATmel doc you were referencing. 50uA is about as much as I've ever needed to "establish" a logic level at a MOS input in a noisy RF environment. After all, it's just fighting electric fields that might otherwise put charge on the MOS gates.


In the meantime some things got back to my memory, so I will eloborate on this.

- There is no mentioning of this in ATmel doc's, so you (or I) won't find it. It's in an article in Circuit Cellar.
- The pull-ups in some ATmel 8 bit microcontrollers are a bit flimsy, in my experience. They can break easily (even though the port is still running fine) and the pull-up is not always strong enough (it's for instance disrecommend for something like I2C)
- There is no proper documentation on the pull-ups (like usual, on ESP8266)

So I tend to rely on my own resistors, that I know will work.

I would not expect for a pull up on the RXD to make the difference. I have no problems with the UART. I have problems with the WLAN RF. So I suspect, as I explained earlier, actually the TXD being the source of the problems, leaking some RF signal into circuitry acting as an antenna.

I removed the external resistors and activated the internal pull-ups. I could see no difference on the TXD pin (which I suppose is kind of obvious). So I played with the pull-up on the RXD. There was some difference, but not as clear as with the external pull-ups. So either the strength DOES matter, or, as I thought, the TXD needs a pull-up as well and the internal pull-up won't work on TXD.

So for future board layouts, I will definitely reserve some space for optional external pull-ups on the UART pins.

I guess someone with a proper oscilloscope should measure the UART pins in the RF range to know for sure.
User avatar
By AdrianM
#43630 eriksl, what ESP8266 are using? Is it the "FCC approved" type with a RF shield?
If you think you may have a RF susceptibility try adding a 1nF capacitor between the suspect pin(s) and OV. A tiny amount of C can do wonders in these situations ;)
User avatar
By eriksl
#43646 No, it's certainly not approved and also not shielded. We're talking ESP-01 and ESP-201 here. I think 1 nF be already to big for the UART.

Anyway, I've had some progress. I made a simple wire with a resistor on it (the 1k, that might need to be just a tiny bit larger, but for now it works). I connected one side to +3V3, the other side to alternatingly RXD and TXD. Also I disabled the internal pull-ups.

Once again, it shows that connection speed goes up all the way up to 65 Mbps with the resistor connected to TXD (!!!). Connecting the resistor to RXD doesn't make a difference. With the resistor removed, the connection speed varies between 1 mbps and 12 mbps. With the internal pull-ups activated, I don't see much difference. Which, I think, can be explained by the pull-ups only being active on inputs, not outputs, TXD being an output.

This certainly looks like RF spoilage. Yes, the shield would probably matter on this ;) But for now an extra pull-up suits me fine. Now only work out what the ideal value is. Now I am testing, I notice the ESP getting quite hot. That may be because I'm firing flood pings at it, or because of the resistor. I'll try tomorrow when it cooled down. The 3.3 mA from the 1 kOhm should be no problem for it, but a larger value may be just as effective and spoil less current/warmth.