Unofficial Nextion/TJC User Forum

Nextion serial rate experiment

FYI, with the faster upload speeds now available in the latest (0.58) Nextion Editor, I’m always uploading at the fastest rate, 921,600 to my Nextion 2.4" basic displays.

I became curious as to what the fastest reliable serial rate was between the Nextion and MCU.

Considering my MCU is a Teensy LC, I decided to try it’s serial rates that have 0% error.


Source: https://www.pjrc.com/teensy/td_uart.html

500,000 didn’t work.

I then tried 250,000, which seems to be reliable.

nextion_serial

I haven’t bothered to see if the 500,000 rate could be fudged on the Nextion side to compensate for any internal timing errors. Considering the Editor can talk to the Nextion @ 921,600, the MCU should be able to as well.

The operation of my project is time-sensitive, and delays of 2-4mS were created every time I wrote to the Nextion @ 115,000 mostly changing the vis of objects. So at least I’m halving these delays.

I’m going to look at increasing the Serial buffer size of my Teensy project, but this was an easy no-brainer to experiment with.

If any one experiments further with baud rate fudges on the Nextion side, please let the rest of us know.

1 Like

Hi,
i was also playing around but only with 250000 which looks good.
Nice that you try to go more up, not nice that it seems to have problems :frowning:

Are you uploading the nextion through the teensy?
If so, are you using the teensy example USB_Serial or how does your program look like?
Because i have problems that the Data is incorrect after uploading through MCU :frowning:

I don’t understand what your asking.

I upload my Nextion code from the Nextion editor via USB using an FTDI adapter like this:
ftdi

For MCU<>Nextion comms, I use a Teensy hardware serial port. (It has three H/W serials as well as the USB programming/serial monitor port)

Update:
250,000 does not work with a TJC basic 2.4" display.
Seems odd, because it has the same STM32F030C8T6 MCU.

Alright, thanks.
I just use another program on the MCU to update the Nextion through it.
No need for this USB device, the MCU (you use teensy, works as well) can also “passthrough” the nextion editor upload.
Maybe that makes your life a bit easier :slight_smile:

Looks like 250,000 is now supported in the new USART 0.58 (beta) release.
https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http%3A%2F%2Fwiki.tjc1688.com%2Fdoku.php%3Fid%3D9.%25E6%259C%2580%25E6%2596%25B0%25E5%258A%25A8%25E6%2580%2581%3A0.58beat

USART3

Explains why I had no joy @ 250,000 baud in my 0.57 project.

As a follow up to the original post.

Considering I could be using either Nextion or TJC panels in the project (whatever is available), I settled on standardizing MCU>Nextion commands @ 115,200.

In my case, with a Teensy LC, a significant improvement was made by increasing the Serial2 TX buffer from the standard 40 bytes to 256 bytes.

\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3\serial2.c