Changes

Jump to: navigation, search

BELK-AN-004: Interfacing BoraEVB/BoraXEVB to TFT LCD display

4,112 bytes added, 16:29, 30 November 2020
no edit summary
{{InfoBoxTop}}
{{Applies To Bora}}
{{Applies To BoraLite}}
{{AppliesToBORA Lite AN}}
{{Applies To BoraX}}
{{InfoBoxBottom}}
{{WarningMessage|text=This application note was validated against specific versions of the kit only. It may not work with other versions. Supported versions are listed in the ''History'' section.}}
 
{{ImportantMessage|text=It is assumed to use ZYNQ SOC with <b><i>speed grade -1</i></b> (even using command line script or GUI). In any case, there are no issues using <b><i>speed grade -3</i></b> SOC provided with BELK kit}}
 
 
==History==
!Version
!Date
!BELK /BXELK version
!Notes
|-
|1.0.0
|15:03, 4 September 2015 (CEST)
|[[Bora_Embedded_Linux_Kit_(BELK)#BELK_software_components|2.2.0]]
|First release
|-
|2.0.0
|10:21, 9 November 2015 (CET)
|[[Bora_Embedded_Linux_Kit_(BELK)#BELK_software_components|2.2.0, 3.0.0]]
|Added support for BoraX/BoraXEVB platform
|-
|{{oldid|8292|2.0.1}}|11:53, 13 March 2017 (CET)
|[[Bora_Embedded_Linux_Kit_(BELK)#BELK_software_components|2.2.0, 3.0.0]]
|Added info for installing Qt on rfs using <code>smart</code>
|-
|3.0.0
|January 2020
|[[Bora_Embedded_Linux_Kit_(BELK)#BELK_software_components|4.1.0 / 2.1.0]]
|AN migration to BELK 4.1.0 / BXELK 2.1.0
|-
|}
* electrical interface: LVDS (3 pairs).
This project is based on Please, refer to the [[Bora_Embedded_Linux_Kit_%28BELK%29BELK-AN-004:_Interfacing_BoraEVB/BoraXEVB_to_TFT_LCD_display#BELK_software_componentsHistory |BELK 2.2.0History]] and [[Bora_Embedded_Linux_Kit_%28BELK%29#BELK_software_components|table for using the proper BELK 3.0.0]]version used on the AN.
==Physical interfacing==
Ampire AM-800480STMQW-TA1 part integrates resistive touch too. This is directly connected to BoraEVB's J25 connector. Resistive touch is managed by Texas Instruments TSC2003 controller (U27).
Schematics of adapter board can be downloaded from this [httphttps://www.dave.eu/system/files/area-riservata/BORA_LCD_ADAPTOR_ADBL7000C1R_1.0.0_0.pdf link].
===BoraXEVB===
==Block diagram and Vivado project==
The following picture shows pictures show simplified block diagram of the design.
[[File:An-belk-004-01.png|thumb|center|600px|Simplified block diagram of the design (Bora + BoraEVB)]][[File:An-belk-004-borax-01.png|thumb|center|600px|Simplified block diagram of the design (BoraX + BoraXEVB)]][[File:an-belk-004-boralite-01.png|thumb|center|600px|Simplified block diagram of the design (BoraLite + Adapter + BoraXEVB)]]
LCD is driven by a controller implemented in PL that fetches pixel data from frame buffer and periodically refreshes physical screen.
To implement frame buffer, a portion of main SDRAM is used. This area is allocated at runtime by linux frame buffer driver. Even if LCD is 18 bpp, each pixel is represented by 32-bit word in memory. In fact each pixel is in RGB666 format, so for each colour only the six most significant bits of the frame buffer RGB888 are used to drive the display.
The Vivado project can also be build with the procedure explained [[Creating_and_building_example_Vivado_project_(BELK/BXELK)#Command_line_based_procedure|here]]. ===Bora + BoraEVB===
Here is the pinout assignment to drive the LCD:
{| class="wikitable" |
|}
(*) This signal is used to control backlight. It is usually driven by a PWM signal whose duty cycle is proportional to backlight intensity. For the sake of simplicity, in this project this signal is driven by a GPIO, thus only two intensity levels are supported (0% and 100%). The Vivado project can also be downloaded from this build with the procedure explained [[httpCreating_and_building_example_Vivado_project_(BELK/BXELK)#Command_line_based_procedure|here]] with the following modifications:*<code>export BASE_NAME bora_LVDS<//www.dave.eu/system/files/areacode>*<code>export U-riservataBOOT_PS7_DIR bora</AN-BELK-004-xpr.zip link].code>
===BoraLite + Adapter + BoraXEVB===Here is the pinout assignment to drive the LCD:{| class="wikitable" | | align="center" style="background:#f0f0f0;"|'''LCD Signal'''| align="center" style="background:#f0f0f0;"|'''BORA SOM Signal'''|-| BackLight (*)||IO_L6N_T0_VREF_13 (**)|-| LVDS_CLK_P||IO_L13P_T2_MRCC_13 (**)|-| LVDS_CLK_N||IO_L13N_T2_MRCC_13 (**)|-| LVDS_D0_P||IO_L12P_T1_MRCC_13 (**)|-| LVDS_D0_N||IO_L12N_T1_MRCC_13 (**)|-| LVDS_D1_P||IO_L15P_T2_DQS_13 (**)|-| LVDS_D1_N||IO_L15N_T2_DQS_13 (**)|-| LVDS_D2_P||IO_L11P_T1_SRCC_13 (**)|-| LVDS_D2_N||IO_L11N_T1_SRCC_13 (**)|-|} (*) This signal is used to control backlight. It is usually driven by a PWM signal whose duty cycle is proportional to backlight intensity. For the sake of simplicity, in this project this signal is driven by a GPIO, thus only two intensity levels are supported (0% and 100%).This is a CMOS 2.5V level signal. Make sure that voltage levels of this signal are compatible with LCD backlight input.<br>(**) On the adapter this signal is routed (via configurable 0R) to multiple pins of the EVB connector to meet all the features of the EVB. Please make sure to configure the Adapter for the use of the LVDS connector. The Vivado project can also be build with the procedure explained [[Creating_and_building_example_Vivado_project_(BELK/BXELK)#Command_line_based_procedure|here]] with the following modifications:*<code>export BASE_NAME boralite_LVDS</code>*<code>export U-BOOT_PS7_DIR bora</code> ==== BoraLiteAdapter BLADP0000R0R ==== As the BoraLite SOM has fewer signals routed out as the other SOM, some signal are multiplexed via 0R resistors: the following table list these configurations:{| class="wikitable" | | align="center" style="background:#f0f0f0;"|'''Reference'''| align="center" style="background:#f0f0f0;"|'''PmodA conn.'''| align="center" style="background:#f0f0f0;"|'''LVDS conn.'''|-| R33 || 0R || DNP|-| R34 || 0R || DNP|-| R35 || 0R || DNP|-| R36 || 0R || DNP|-| R37 || 0R || DNP|-| R38 || 0R || DNP|-| R39 || 0R || DNP|-| R40 || x || DNP|-| R41 || 0R || DNP|-| R42 || x || 0R|-| R43 || DNP || 0R|-| R44 || DNP || 0R|-| R45 || DNP || 0R|-| R46 || DNP || 0R|-| R47 || DNP || 0R|-| R48 || DNP || 0R|-| R49 || DNP || 0R|-| R50 || DNP || 0R|-|}
===BoraX + BoraXEVB===
Here is the pinout assignment to drive the LCD:
{| class="wikitable" |
|}
The Vivado (*) This signal is used to control backlight. It is usually driven by a PWM signal whose duty cycle is proportional to backlight intensity. For the sake of simplicity, in this project can be downloaded from this [http://wwwsignal is driven by a GPIO, thus only two intensity levels are supported (0% and 100%). This is a CMOS 2.dave5V level signal.eu/system/files/area-riservata/AN-BELK-004-Interfacing-to-Make sure that voltage levels of this signal are compatible with LCD-displaybacklight input.zip link]
(*) This signal is used to control backlight. It is usually driven by a PWM signal whose duty cycle is proportional to backlight intensity. For The Vivado project can also be build with the sake of simplicity, in this project this signal is driven by a GPIO, thus only two intensity levels are supported procedure explained [[Creating_and_building_example_Vivado_project_(0% and 100%BELK/BXELK). This is a CMOS 2.5V level signal. Make sure that voltage levels of this signal are compatible #Command_line_based_procedure|here]] with LCD backlight input.the following modifications:*<code>export BASE_NAME borax_LVDS</code>*<code>export U-BOOT_PS7_DIR borax</code>
==Enabling frame buffer driver in linux kernel==
To enable frame buffer driver user needs toU-boot:* for Bora get the predefault KIT binary files of u-boot (u-built binaries [http://wwwboot.img) and SPL (boot.davebin) can be used.eu* the variable <code>bootcmd</system/files/areacode> has to contain this string: <code>video=borafb:800x480-riservata32 cma=32M</AN-BELK-004-bora-sw.zip here].code>* for BoraX get * this can be achieved modifying the variable <code>addmisc</code> with the following command:<pre-built binaries [http>setenv addmisc 'setenv bootargs ${bootargs} ${mtdparts} video=borafb://www.dave.eu/system/files/area800x480-riservata32 cma=32M'</AN-BELK-004-borax-sw.zip here]pre>
Kernel and device tree can also be built with the following procedure:
* update Bora kernel repository (as described [[Bora_Embedded_Linux_Kit_(BELK)/BXELK_software_components#Updating_the_repositories_from_BELK_2.1.0_to_BELK_2.2.0Updating_git_repositories|here]])* checkout ''bora-feat-lcd-support'' branch the default KIT binary files of kernel (using ''git checkout bora-feat-lcd-support'' commanduImage)can be used.* build the updated kernel source as usual<code>bora-an004.dtb</code> devicetree
Put the binaries on the first (FAT32) partition of your BELK SD card, overwriting the original one if needed. Please note that you need the following files:
* uImage
* fpga.bin
* u-boot.img
* uEnv.txt
Install root file system on second (ext4) partition of your BELK SD card (firstly deleting all previous rfs files):
* get rfs image [httpshttp://mirror.dave.eu/bora/belk-34.1.0.1/belk-34.01.1_bora0_dave-image-devel-bora.tar.gz bz2 here]
Insert the SD card into Bora/BoraX EVB and turn on the board.
Once the kernel has completed boot, frame buffer can be accessed from user space applications via <code>/dev/fb0</code> device file (for more details please refer to https://www.kernel.org/doc/Documentation/fb/framebuffer.txt).
=== Pre-built binaries === * For Bora SoM use:** [http://mirror.dave.eu/bora/belk-4.1.0/belk-4.1.0_uImage uImage]** [http://mirror.dave.eu/bora/belk-4.1.0/belk-4.1.0_bora-an004.dtb dtb]** [http://mirror.dave.eu/bora/belk-4.1.0/belk-4.1.0_bora_LVDS_fpga.bin fpga]* For BoraLite SoM use:** [http://mirror.dave.eu/bora/belk-4.1.0/belk-4.1.0_uImage uImage]** [http://mirror.dave.eu/bora/belk-4.1.0/belk-4.1.0_bora-an004.dtb dtb]** [http://mirror.dave.eu/bora/belk-4.1.0/belk-4.1.0_boralite_LVDS_fpga.bin fpga]* For BoraX SoM use:** [http://mirror.dave.eu/bora/belk-4.1.0/belk-4.1.0_uImage uImage]** [http://mirror.dave.eu/bora/belk-4.1.0/belk-4.1.0_bora-an004.dtb dtb]** [http://mirror.dave.eu/bora/belk-4.1.0/belk-4.1.0_borax_LVDS_fpga.bin fpga] === How to install Qt4 libraries on rfs test tools for LCD device ===
* configure BELK for downloading new packages using <code>smart</code>: a useful description for using smart can be found [[AN-XELK-003:_Package_Management_with_Yocto#Installing_packages_on_target |here]]
* configure network interface for accessing DAVE Yocto pre-built images. For example:
64 bytes from 147.123.240.198: seq=0 ttl=49 time=72.510 ms
* add DAVE smart channel and update smart cache
root@bora:~# smart channel --add armv7a_vfp_neon cortexa9hf_neon type=rpm-md baseurl=http://yocto.dave.eu/belk-34.1.0.1/armv7a_vfp_neoncortexa9hf_neon/
root@bora:~# smart update
* install Qt the <code>tslib</code> required packages using <code>smart</code>
root@bora:~# smart install qt4tslib-embeddedcalibrate-41.8.51-r0
...
root@bora:~# smart install libicui18n51tslib-51tests-1.21-r0 ...
root@bora:~# smart install tslibfb-calibratetest-1.1.0-r0
...
* calibrate resistive touchscreen  root@bora:~# smart install tslib-tests-1.1-r0ts_calibrate  ...touch on the 5 points displayed in sequence (4 corner + center)
* configure test the alignment of touchscreen input for Qt and start Qt demo
root@bora:~# export QWS_MOUSE_PROTO=LinuxInput:/dev/input/event0 root@bora:~# qtdemoE -qws &ts_test
this tool allow to ''drag'' a point or to ''draw'' a line
The following picture shows Qt 4.8.5 ''Affine Transformations'' demo application running on top of it.* display some test patterns
{|style="margin root@bora: 0 auto;"| [[File:An-belk-004-04.jpg|thumb|center|400px|Qt Affine Transformations running on Bora/BoraEVB system]]| [[File:An-belk-004~# fb-06.jpg|thumb|center|400px|Qt Affine Transformations running on BoraX/BoraXEVB system]]|}test
8,142
edits

Navigation menu