I have an ESP8266 (ESP12) which has a default baudrate of 115200 . Apparently this is somehow not very little, but I need to transfer relatively large amounts of data, so the faster the better. I found information on the web that up to 4Mbps and more can be achieved. I tried to do this with the command AT+IPR , but I messed up the module. I had to upload new firmware to it to revive it. The command AT+ UART_DEF seems to work, but only when I set the baudrate below the default value. Any higher value (e.g. 256000) causes the chip to send bushes to the terminal. Interestingly, it still seems to understand what I'm sending it at the time and I've managed to reduce the baudrate to the previous value this way.
I don't know if the above symptoms are the fault of the ESP module or maybe the USB-UART converter (PL2303HX, fake) is not coping. Have any of you managed to achieve any higher speeds than the default 115200?
When real RS232 signaling is not required, baud rates higher than 115200 bps could be used for even higher performance. The flexible baud rate generator of PL-2303HXD could be programmed to generate any rate between 75 bps to 12M bps
I connected the Rx and Tx of the converter and tried to find the limit to which it works. I even set the bitrate in the terminal to 1000000000 (9 zeros) and it still works. This is a bit suspicious, as I doubt such a transfer would go through USB 2.0. The implication is that either the terminal or the driver is cheating. It's probably setting the default baudrate outside the acceptable range. At least this happens when I set it to, say, 10bps. Without an oscilloscope I probably won't know what the upper limit is....
CH340 supports common baud rate: 50,75,100,110,134.5,150,300,600,900,1200,1800,2400,3600,4800,9600,14400,19200,28800,
33600,38400, 56000,57600,76800,115200,128000,153600,230400,460800,921600,1500000,2000000 and so
on. The baud rate error of serial transfer signal is less than 0.3%, and permission baud rate error of serial
receive signal is not less than 0.2%.
Data transfers to/from UART interfaces can be implemented via hardware. The data transmission speed via UART interfaces reaches 115200 x 40 (4.5 Mbps).
Which means, more or less, that you might be able to establish communications at 1500000 or 3000000 bps already with just the FT232RL.
So much for theory, but how about in practice?
Added after 13 [minutes]:
In practice 921600 I can calmly get on CH340G, unfortunately at 1.5Mbps I failed to establish communication.
I used the AT+UART_CUR command here in case something failed and I lost the connection to the ESP, in which case a power restart and we're back to 115200.
In practice 921600 I can easily get on CH340G, unfortunately at 1.5Mbps
And you thought that this is not a problem of the adapter but of the lift, or the terminal program? You are jumping to conclusions too fast. connect esp to some ARM with fast uart and test > 1M there, otherwise your whole methodology and analysis is not worth much.
I ordered an adapter on the CH340G chip from allegro today, I will have a comparison. I will try some more with other programs. The target ESP is to work with the STM32F411 microcontroller, but I wanted to do some tests with a computer beforehand - because it's easier. I will also test it on the target chip soon.
funak wrote:
AT+UART_CUR
I had overlooked the existence of this command, and it is very useful.
At these higher speeds it is more difficult because you do not know what is not working. If you have STM on a nucleo or Discovery board then you don't need an adapter, if not then connect an adapter to any uart and ESP to another and send diagnostic messages via the adapter to the Computer. If you have a debugger board, you do not even need to do this.
The whole thing can be up and running in 15 minutes
And did you think it's not a problem of the adapter but of the lift, or the terminal program? You are drawing conclusions too fast. connect esp to some ARM with fast uart and test > 1M there, otherwise your whole methodology and analysis is not worth much.
I disagree here, FT232RL as well as FT245RL work above 1Mbps. Verified And this is in the form of VCP - Virtual Com Port.
Other drivers - have you considered? So that such a testing methodology is not worth much, because everything almost depends on the windy. So that communication can only be tested uart <=> uart, not uart <=> adapter <=> driver <=> windows <=> libraries of the language used <=> program
I wanted to buy one, but on allegro most are fakes that probably work similarly to the infamous PL2303HX.
Piotrus_999 wrote:
communication can only be tested with uart <=> uart, not uart <=> adapter <=> driver <=> windows <=> libraries of the language used <=> program
Right.
I'm only playing with the adapter for now because I wanted to test the operation of some AT commands, and it's simply easier for me to write them on the fly in the terminal.
For now, I am only playing around with the adapter because I wanted to test the operation of certain AT commands, and it is simply easier for me to write them on the fly in the terminal.
Obviously, but rather high speeds should already be tested like this.
the software can be uploaded to the ESP and not play around with AT commands
Of course you can, but tell me how on an ESP you can handle a memory card, USB OTG, PWM, UART, 1-wire, I²C at the same time and still have some free GPIO pins
...Any higher value (e.g. 256000) causes the chip to send bushes to the terminal. Interestingly, it still seems to understand what I am sending it at the time and I have managed to reduce the baudrate to the previous value this way.
I don't know if the above symptoms are the fault of the ESP module or maybe the USB-UART converter (PL2303HX, fake) is not coping. Has anyone of you managed to achieve any higher speeds than the default 115200?
The problem with these fakes is that the working standard baudrates end at 115200 or 230400 (as in the case of the ft232), further on speeds such as e.g. 250k, 500k, 1M, 2M remain.
@funny , very simply - on the ESP I pack all the communication, control of connections, protocols, decoding of received data, their assembly into a logical whole, while to the executive I pack as I like only what I need. E.g. a simple counter - the processor counts the pulses on some GPIO, then sends only a few bytes to the ESP, and the ESP appropriately encodes them and sends them e.g. over TCP/IP or HTTP. The saving even in such a simple transfer over the UART is enormous, because instead of many AT commands, e.g. HTTP headers etc., I send only a few bytes.
I'm not saying to pack everything onto ESP, because ESP lacks a lot to any uC (timers, interrupts, usb, ...), but by packing dedicated software into ESP we are able to split the project logically as well - ESP takes care of the network and our CPU takes care of the hardware.
I've done a few projects of this type myself recently - in the last one ESP had a device configuration page over HTTP, the possibility to send data via UDP / TCP/IP (also with TLS protocol) / HTTP(S) - as an HTTP request, in addition ESP could update its own and the processor's software using batch files available on the client's server (I'll add that this is also in safe mode, so that it is not possible to copy the batch). Transmission over the UART - almost none. Doing it on AT commands - I can't imagine.