Adding a Rocktech Capacitive Touch LCD to the NXP i.MX RT1052 EVK
Want to learn how to add the Rocktech Capacitive Touch LCD to your board? Check out this tutorial to learn how with the NXP i.MX RT1052 EVK.
Join the DZone community and get the full member experience.Join For Free
It is never too early to start thinking about Halloween projects!
rendered Eyes with i.MX RT
Originally, when I order the MIMXRT1050-EVK from Mouser, it was without the LCD display (see “MCUXpresso IDE V10.1.0 with i.MX RT1052 Crossover Processor." I ordered the LCD for the board soon after writing that article, but I was too busy with the university lectures and exams to get a hand on it. Finally, I have spent a few hours at night and I proudly can say — the display is working
Be aware that I’m using the (older/original) EVK board, and a newer EVKB board which seems to be different. I have ordered the EVKB now to check if things are still the same or not.
Hardware and Software Tools
I realize that for i.MX there are lots of board variations, which can impact things how they work. So, here is what I have used in this article:
MIMXRT1050-EVK SCH-29538 REV A3, 7000-29538 REV A (same as in MCUXpresso IDE V10.1.0 with i.MX RT1052 Crossover Processor) with external 5V power supply and the following jumper settings:
MIMXRT1050-EVK (click to enlarge)
MCUXpresso IDE 10.2.0 build 759 [2018-05-15] with Windows 10
MCUXpresso IDE V10.2.0 Build
MCUXpresso SDK SDK_2.x_EVKB-IMXRT1050 SDK version 2.4.0, Manifest Version 3.3.0. I faced strange problems with using an older SDK. Using the 2.4.0 version seemed to solve these problems.
SDK EVKB-IMXRT1050 v2.4.0
SEGGER J-Link GDB Server V6.32h Command Line Version JLinkARM.dll V6.32h (DLL compiled Jul 5 2018 18:11:19)
external P&E Universal Multilink Version 188.8.131.52805161649:
Installed P and E Plugin Versions
external LPC-Link2 with CMSIS-DAP V5.183
Possible Problems and Troubleshooting
- Make sure you have the latest SDK
- I have found powering the board with the OpenSDA/USB is causing subtle issues — always use an external 5V Power supply.
- The Vsense Voltage sense pin on the SWD connector somehow shows erratic behavior, which is probably related to poor board power supply circuit. Several P and E Universal Multilinks were not able to detect the target voltage (some just did) (orange LED was not on), which caused lots of issues.
- Power-on of the board, in general, seems very problematic: it worked best for me with a) power on the board and then b) power on the debug probe.
- The LCD circuit/grounding seems to be causing some high voltage on the frame. Do not touch the metal LCD frame or ground it.
- If the Segger J-Link debug connection terminates right after starting it, disable the FreeRTOS Kernel Awareness (if it is turned on).
- Check other troubleshooting tips, like Troubleshooting Tips: Failed Debugging with GDB
- I have found that, in case of problems, using the HelloWorld_Xip project on GitHub seems to ‘heal’ the board somehow.
- The i.MX RT microcontroller can easily go haywire. Try to power up the board first and then load the HelloWorld_Xip project. If this fails, erase the external flash using the steps described in MCUXpresso IDE V10.1.0 with i.MX RT1052 Crossover Processor.
I ordered the LCD (Rocktech Display Limited, RK043FN02H-CT) from Mouser (Part number 771-RK043FN02H-CT). It is a capacitive touch LCD with a resolution of 480×272 pixels.
Rocktech Display RK043FN02H-CT (Source: Rocktech Datasheet)
I have seen and used many display connectors. Connecting the LCD to the board is not easy. It is very difficult and fragile, mainly because the display and cables are always in conflict, and the board has to be held in position. It took me lots of trial and error to get a reliable connection, so I hope the steps below help you get it done too. Best if you have one person holding the board, one person holding the display and a third person inserting the cables.
There are two connectors on the backside of the board:
Display Connectors on i.MX RT1052 EVK
First, carefully pull the black ‘lock’ from the larger connector (red arrows) and then insert the big cable. Make sure that the cable is really inserted to the end of the connector.
Then, push the black ‘lock’ into the connector. Make sure the cable is really secured and inside the connector, otherwise repeat.
Next, carefully do the same with the other (touch) cable and connector:
Inserting Touch Connector
The golden contacts of the cable need to be inside the connector, then the connector again with the black ‘lock.’ Verify that the connection is tight.
inserted touch connector
To avoid the display to touch the board, I have added bumpers to the board:
Carefully place the display on the board. Make sure you are not bending the cables too much or that the board touches the LCD.
Display on i.MX RT board
Now, it is a good time to verify that the display is working:
Display is working
I used the driver_examples\elcdif project from the SDK_2.x_EVKB-IMXRT1050:
elcdif project in SDK
The remaining problem is that the display is not secured or attached to the baseboard. One way would be to use double-sided tape or something similar. Instead, I have laser-cut quickly a display frame:
Two 4 mm plywood sheets and one 2 mm PMMA build the display frame:
.svg/laser cut files can be found on GitHub (see Links section at the end of this article).
Display with Frame
To test the i.MR plus LCD performance, I have ported the Adafruit ‘uncanny eyes’ application to the i.MX RT1050, using the MCUXpresso IDE:
Eclipse Uncanny Eye LCD Project
The eyes get rendered at runtime and are using FreeRTOS. With 64MByte external flash, there is plenty of space to cramp in multiple eye versions. The eyes are rendered in realtime with double buffers and using static images loaded from FLASH memory.
rendered Eyes with i.MX RT
no sclera eyes
The video below shows them in action:
Mounting the LCD has been a challenge, and I had to create a laser-cut LCD frame to keep it in place. The display is working fine now, and can continue to think about Halloween projects
- Laser cutting files (InkScape format):https://github.com/ErichStyger/mcuoneclipse/tree/master/LaserCutter/Inkscape/i.MX%20RT1052%20EVK
- MCUXpresso IDE V10.1.0 with i.MX RT1052 Crossover Processor
- MIMXRT1050-EVK: https://www.mouser.ch/ProductDetail/NXP-Semiconductors/MIMXRT1050-EVK?qs=sGAEpiMZZMtw0nEwywcFgJjuZv55GFNmTyRZx6s3qIUZD31ixq11dA%3d%3d
- MIMXRT1050-EVKB: https://www.mouser.ch/ProductDetail/NXP-Semiconductors/IMXRT1050-EVKB?qs=sGAEpiMZZMtw0nEwywcFgJjuZv55GFNme3cdL3XMKbRq%2fLauxiBRjw%3d%3d
- NXP i.MX RT Web Page: https://www.nxp.com/products/processors-and-microcontrollers/applications-processors/i.mx-applications-processors/i.mx-rt-series:IMX-RT-SERIES
- Overview of using the MIMXRT1050-EVK with MCUXpresso IDE: https://community.nxp.com/community/mcuxpresso/mcuxpresso-ide/blog/2017/12/07/overview-of-using-the-mimxrt1050-evk-with-mcuxpresso-ide
- MCUXpresso IDE: http://www.nxp.com/mcuxpresso/ide
- MCUXpresso SDK: http://mcuxpresso.nxp.com/
- Adafruit ‘uncanny eyes’: https://learn.adafruit.com/animated-electronic-eyes-using-teensy-3-1/software
Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.