Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: teensy 3.2 nextion

  1. #1

    teensy 3.2 nextion

    Hello,
    I use a teensy 3.2 and a uart nextion display, now to update the display I have to connect it with a ttl usb converter.
    I have two possibilities
    N1) that the teensy acts as usb ttl when I have to program the dislpay
    N2) I have to put some diodes on the rx and tx line so that when I have to update I leave both the teensy and the display connected and I add the ttl usb converter.
    What do you recommend? are there other solutions?

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,434
    Normally, once the firmware for the Nextion written, compiled, tested, validated and uploaded, there shouldn’t be the need to update it, if the HMI design was made thoughtful and purposeful. I’ve a project with Teensy and Nextion which can take 5 variants. I packed everything on different pages in the HMI, so that the application running on the Teensy can decide which pages are used and which not. Thus, I preload the Nextions once with the firmware before they are connected to the respective Teensy and then, this package goes out to the customer.
    If, in a few years or so, a Nextion firmware upgrade would really be required, but I really can’t imagine not having anticipated everything, I’d tell the customers to download the new tft file, copy it on a SD card and put the latter directly into the Nextion’s SD slot, so that the Nextion will update itself at the next power up.

  3. #3
    Hi, the problem is that to put the sd I have to disassemble the display due to the limited space.
    However I make a connector and I carry the wires of the serial to a diverter where I decide whether to program I have normal use.
    Hello and thanks

  4. #4
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    42
    Hi vlelectroniclab, I was about to open the same kind of topic, so I'll take the opportunity to use yours since my problem is related to your request.

    I've been struggling for a long time now trying to program a 3.2" Nextion screen using the Teensy 3.2 as a serial bridge, without success so far.
    For the application I'm working on (screen embedded in a steering wheel using SimHub), being able to update the Nextion often is mandatory because I want to support many types of cars, and try different features.
    I've tried with several baud rates (19200, 38400, 115200), with and differents CPU clocks, with Serial1 and Serial3, none of them work (upload proceeds until the end, but I get a CRC check error at the end).

    It works with a Teensy LC and with a Teensy 3.6 at 115200 bauds, without a problem (I'm using the USBToSerial example, with the 57600 baud rate hack and the DTR code removed).
    The file I'm trying to upload is quite big (1.14 Mbytes), so I can't look at all the bytes sent with a logic analyser. I think it may be a problem of clock precision, but it shouldn't as the Teensy LC is supposed to have 0.16% error at 115200 compared to the -0.2% error of the Teensy 3.2 at this baudrate.

    I've asked on the Nextion forum but got not answer, which I understand as the problem doesn't seem to come from the Nextion itself nor from the upload program of the Nextion Editor.

    I don't know what to try now, does anyone have a suggestion ?
    Last edited by Etienne; 05-11-2019 at 05:27 PM.

  5. #5
    Member Etienne's Avatar
    Join Date
    Mar 2016
    Location
    Ardeche, France
    Posts
    42
    I think I just found the solution ! : I increased the serial tx buffer size to 4096 (serial1.c, line 40).
    Weird, as the Teensy LC doesn't have a FIFO on Serial1, It shouldn't have worked with it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •