MPLAB® Harmony Graphics Suite
|
The aria_quickstart_external_resources (MSD media storage) application reads binary data copied from a PC host directly into external NVM, which is presented as a FAT32 formatted USB MSD device. In this configuration, the SSD1963 display controller is used to send the display data and timing to a WQVGA display. The SSD1963 is connected to the SAM E70 thru the SMC peripheral and GPIOs which are used to send 16-bit parallel data/commands and to bit-bang control signals to the SSD1963 controller, respectively. The frame buffer is stored externally in the SSD1963 controller.
The application also features user touch input through the integrated touch screen on the display panel. Touch input from the touch controller goes through the I2C port, and the Input System Service acquires the touch input information from the Touch and I2C drivers. The Input System Service sends touch events to the Graphics Library, which processes these events and updates the frame data accordingly.
In this configuration, the SSD1963 display controller is used to send the display data and timing to a WQVGA display. The SSD1963 is connected to the SAM E70 thru the SMC peripheral and GPIOs which are used to send 16-bit parallel data/commands and to bit-bang control signals to the SSD1963 controller, respectively. The frame buffer is stored externally in the SSD1963 controller.
User touch input on the display panel is received thru the PCAP capacitive touch controller, which sends a notification to the Touch Input Driver. The Touch Input Driver reads the touch information over I2C and sends the touch event to the Graphics Library thru the Input System Service.
The USB peripheral is setup in MSD Device mode with the File System service support.
• Aria Graphics Library
• Input system service and touch driver
• Time system service, timer-counter peripheral library and driver
• SSD1963 display controller driver
• SMC peripheral library and driver
• I2C peripheral library and driver
• SST26 QSPI driver
• USB MSD driver (Device Mode)
• File System
• Images and Fonts for user interface stored in external flash (NVM)
Creating the Project Graph
The Project Graph diagram below shows the Harmony components that are included in this application. Lines between components are drawn to satisfy components that depend on a capability that another component provides.
Adding the “SAM E70 XPlained Ultra BSP” and “Aria Graphics w/ PDA TM4301B Display” Graphics Template component into the project graph will automatically add the components needed for a graphics project and resolve their dependencies. It will also configure the pins needed to drive the external peripherals like the display and the touch controller.
By default, the template is configured to use the Low-Cost Controller-less (LCC) interface to the display. To configure the project for an SSD1963, set the Display Interface setting for the Aria component from LCC to SSD1963.
Additional components to support QSPI, SST26, File System and USB Device driver need to be added and connected manually.
Some of these components are fine with default settings, while other require some changes. The following is a list of all the components that required custom settings.
Apply the following settings to Instance 0 of the Memory component
Apply the following settings to the File System component
Apply the following for the MSD Function Driver
Apply the following for the USB Device layer component
Apply the following for the USB High Speed Driver component
In the Pin Manager, connect the following 6 pins for the QSPI component
In the Clock Manager, make sure Main Oscillator, MOSCSEL, PLLA Clock, UPLLCK, UPLLCKDIV and USBS is setup as shown:
The parent directory for this application is gfx/apps/aria_quickstart_ext_res. To build this application, open the gfx/apps/aria_quickstart_ext_res/firmware/aria_qs_msd_fs_sqi_flash_e70_xu_ssd1963_tm4301b.X project file in MPLABX IDE that corresponds to the hardware configuration.
The following table lists configuration properties:
Project Name |
BSP Used |
Graphics Template Used |
Description |
aria_qs_msd_fs_sqi_flash_e70_xu_ssd1963_tm4301b.X |
SAM E70 Xplained Ultra BSP |
Aria Graphics w/ PDA TM4301b Display |
SAM E70 Xplained Ultra board with PDA TM4301b 480x272 (WQVGA) Display and SSD1963 display driver |
![]() |
This application may contain custom code that is marked by the comments // START OF CUSTOM CODE ... and // END OF CUSTOM CODE. When using the MPLAB Harmony Configurator to regenerate the application code, use the "ALL" merging strategy and do not remove or replace the custom code. |
The final hardware setup-up should be:
Connect a USB cable from the host computer to the J6 USB micro port. This can be connected before or at any point after the application is powered-on.
When power-on is successful, if there are no the SST26 SQI Flash is not formatted to FAT32 or the files Images.bin, Fonts1.bin and Fonts2.bin do not exist on the SST26 SQI Flash, the demonstration will display a screen with the following message:
The entire screen is touch sensitive. Touch any part of the screen will toggle the languages of the strings shown on screen.
When the second USB cable from the host computer to the ‘Target USB’ USB micro port is connected, LED1 (red on the starter kit) will light up.
If the SST26 SQI Flash is not formatted to FAT32, the PC (if running windows) will request the drive be formatted.
Format the SST26 SQI Flash with the default settings as shown below. When the format operation is completed, the PC should detect the application as a removable disk drive.
From the folder of the corresponding configuration of this application (gfx\apps\aria_quickstart_ext_res\firmware\src\config\ssd1963_rgb565_mxt_msd_fs_sqi_flash), copy the files Images.bin, Fonts1.bin, and Fonts2.bin to the newly detected Removable Disk.
On completion of the file copy, the application may need a power cycle. After the relaunch, if the application detects the presence of all three files (Images.bin, Fonts1.bin and Fonts2.bin), depending on the current language set, a button with text “Press To Load External Assets” or “按加载外部资产” will appear.
Press the button and the application will load a new screen that utilizes the image and font assets from the accessing the SST26 SQI Flash via File System. Depending on the current language set, the display will have either one of these screens:
In the new screen, pressing the button will cause the application to load a new image. The image cycles in order from Uncompressed RAW with Direct Blit, Uncompressed RAW, Run-Length Encoded (RLE) RAW, to JPEG.
The MPLAB Harmony Graphics Suite logo is also a button. Pressing the logo will toggle the application between English and Simplified Chinese.
Note that, once in the main screen, the application will expect to consistently retrieve assets from the SST26 SQI Flash. Should some or all of the files are deleted, the application will not crash. Instead, the graphics library will paint the screen without images and/or fonts. This highlights the robustness of the graphis library to handle asset retrieval errors.
The application is purposely setup in single-buffer configuration to allow visual inspection of the data retrieval speed of the various images and glyphs.
MPLAB® Harmony Graphics Suite
|