Abov A31T21 RLN Series User manual

Contents A31T21xRLN Shield Board Quick Guide
2
Contents
1Introduction .................................................................................................................................... 7
2User Requirements ........................................................................................................................ 8
2.1 Hardware.......................................................................................................................... 8
2.2 Software ........................................................................................................................... 9
2.3 Reference Documents ...................................................................................................10
2.4 System Requirements.................................................................................................... 11
2.5 ABOV Website ...............................................................................................................12
3Build and Run Project (Shield Board) .......................................................................................... 13
3.1 Prepare Starter Kit and Shield Board............................................................................. 14
3.1.1 Hardware Components of Starter Kit .....................................................................14
3.1.2 Hardware Components of Shield Board.................................................................15
3.2 Starter Kit and Shield Board Settings ............................................................................16
3.2.1 Jumper Settings for Starter Kit Control .................................................................. 16
3.2.2 Starter Kit Connection for Shield Board Use ..........................................................17
3.3 Starter Kit Connection to PC.......................................................................................... 18
3.3.1 USB Connection with USB 2.0 Cable .................................................................... 18
3.3.2 Hardware Recognition on PC (Device Drivers)......................................................19
3.4 Run Starter Kit Shield Board.......................................................................................... 20
3.4.1 Compilation with Keil uVision 5 ..............................................................................20
3.4.2 A-Link Debugger Configuration and Download......................................................22
3.4.2.1 Debugger Configuration ................................................................................. 22
3.4.2.2 Firmware Download........................................................................................ 23
3.5 Debugging...................................................................................................................... 24
4Function Description (Using Touch library) .................................................................................. 26
4.1 Touch Parameter Description.........................................................................................26
4.1.1 touch_config.h ........................................................................................................ 26
4.1.1.1 #define CSxx_USE X ................................................................................... 26
4.1.1.2 #define MESH_SHIELD_EN X ....................................................................27
4.1.1.3 #define CH_SHIELD_EN X.......................................................................... 27
4.1.1.4 #define TOUCH_CLK_VAL [n] ..................................................................... 28
4.1.1.5 #define TOUCH_CLK_OFFSET_VAL [n] .....................................................28
4.1.1.6 #define TOUCH_MODE_VAL [n] ................................................................. 29
4.1.1.7 #define TOUCH_PORT_SEL_VAL [n] .........................................................31
4.1.1.8 #define TOUCH_VHS_VAL [n].....................................................................31
4.1.1.9 #define TOUCH_COMP_REFV_VAL [n]......................................................31
4.1.1.10 #define TIMER_START_UP_VAL [n] ...........................................................31
4.1.1.11 #define TIMER_BASE_SAMPLE_VAL [n] ...................................................31
4.1.1.12 #define TIMER_BASE_REVERSE_SAMPLE [n] ........................................ 32
4.1.1.13 #define THD_REVERSE_RATE_CHxx [n] ..................................................32
4.1.1.14 #define BASE_RELEASE_HOLD_CNT_VAL [n] .........................................33
4.1.1.15 #define TOUCH_SUM_CNT_CHxx [n] ........................................................ 33
4.1.1.16 #define TOUCH_LPF_C_CHxx [n] .............................................................. 33
4.1.1.17 #define TOUCH_LPF_R_CHxx [n] .............................................................. 34
4.1.1.18 #define THD_DETECT_CHxx [n]................................................................. 34

A31T21xRLN Shield Board Quick Guide Contents
3
4.1.1.19 #define THD_RELEASE_RATE_CHxx [n] ...................................................35
4.1.1.20 #define BASE_TRACE_SPEED_CHECK_RATE_CHxx [n] ........................36
4.1.1.21 #define BASE_TRACE_FAST_SPEED_CHxx [n] .......................................36
4.1.1.22 #define BASE_TRACE_SLOW_SPEED_CHxx [n]...................................... 37
4.1.1.23 #define FILTER_IIR_GAIN_CHxx [n] ........................................................... 37
4.1.1.24 #define DETECT_DEBOUNCE_CNT_CHxx [n] ..........................................37
4.1.1.25 #define RELEASE_DEBOUNCE_CNT_CHxx [n]........................................ 38
4.1.1.26 #define REF_CH_EN X ...............................................................................38
4.1.1.27 #define REF_CH_BIT_VAL [n].....................................................................38
4.1.1.28 #define REF_CH_SUM_CNT_VAL [n] .........................................................39
4.1.1.29 #define REF_CH_LPF_C_VAL [n] ...............................................................39
4.1.1.30 #define REF_CH_LPF_R_VAL [n] ...............................................................39
4.1.1.31 #define REF_GAIN_CHxx [n] ......................................................................39
4.1.1.32 #define REF_DIRECTION_CHxx X .............................................................39
4.1.2 user_function.h ....................................................................................................... 40
4.1.2.1 #define TOUCH_FREQ_SEL_EN X ............................................................ 40
4.1.2.2 #define USER_FILTER_ONESENSING_EN X ...........................................40
4.1.2.3 #define USER_FILTER_DIFF_DATA_EN X ................................................40
4.1.2.4 #define HOLD_KEY_RELEASE_EN X ........................................................41
4.1.2.5 #define MULTI_KEY_RESET_EN X ............................................................ 42
4.1.2.6 #define BIG_DIFF_CANCEL_EN X .............................................................42
4.1.2.7 #define FIRST_KEY_PRIORITY_EN X .......................................................42
4.1.2.8 #define CHANNEL_GROUPING_EN X .......................................................43
4.2 LED Parameter Description ........................................................................................... 44
4.2.1 user_function.h ....................................................................................................... 44
4.2.1.1 #define LED_DRV_EN X .............................................................................44
4.2.1.2 #define TS_LED_TIME_DIV_EN X..............................................................44
4.2.1.3 #define LED_USE_COM_NUM [n] ..............................................................45
4.2.1.4 #define TIME_LED_OPREATING [n]...........................................................45
4.2.1.5 #define TIME_LED_INTERVAL [n]............................................................... 45
4.2.1.6 #define LED_CURRENT [n]......................................................................... 45
4.2.1.7 #define COMxx_EN X .................................................................................. 46
4.2.1.8 #define SEGxx_EN X................................................................................... 46
4.3 User Parameter Description...........................................................................................47
4.3.1 user_function.h ....................................................................................................... 47
4.3.1.1 #define UART_DEBUG_EN X ..................................................................... 47
4.3.1.2 #define I2C_DEBUG_EN X ......................................................................... 47
4.3.1.3 #define WDT_EN X...................................................................................... 47
4.4 Main Function Description ............................................................................................. 48
4.4.1 main.c .....................................................................................................................48
4.4.1.1 void Port_Init (void)......................................................................................... 48
4.4.1.2 void System_Setting_Config (void) ................................................................ 48
4.4.1.3 void Change_SysClock (void) ........................................................................ 48
4.4.1.4 void Systick_Config (uint32_t ticks)................................................................ 48
4.4.1.5 void Init_Touch (void)...................................................................................... 48

Contents A31T21xRLN Shield Board Quick Guide
4
4.4.1.6 void Init_User_Function (void)........................................................................48
Revision History .................................................................................................................................... 49

A31T21xRLN Shield Board Quick Guide List of Figures
5
List of Figures
Figure 1. A31T216RLN Starter Kit Board (Hardware) ............................................................................ 8
Figure 2. A31T216RLN Shield Board (Hardware) .................................................................................. 8
Figure 3. Compiler (Software) ................................................................................................................. 9
Figure 4. Reference Document on the ABOV Website ......................................................................... 10
Figure 5. Window PC and Mini-B Cable ............................................................................................... 11
Figure 6. Software and Documents at ABOV Semiconductor Website ................................................12
Figure 7. Starter Kit Board .................................................................................................................... 14
Figure 8. Components of A31T216RLN Shield Board ..........................................................................15
Figure 9. Starter Kit Jumper and Switch ............................................................................................... 16
Figure 10. Connection of Starter Kit Board and Shield Board .............................................................. 17
Figure 11. Starter Kit and USB Connection .......................................................................................... 18
Figure 12. Serial Bus Controller Lists at Device Manager ....................................................................19
Figure 13. Project Open in Keil uVision 5 ............................................................................................. 20
Figure 14. Project Build in Keil uVision 5 .............................................................................................. 21
Figure 15. Debugger Settings for Example Project Options ................................................................. 22
Figure 16. Firmware Download and Verification Result ........................................................................ 23
Figure 17. Debugging with ABOV A-Link and CMSIS-DAP ..................................................................24
Figure 18. T-type and M-type LEDs for Touch and Display ..................................................................25
Figure 19. Touch CH activation (in touch_config.h) ..............................................................................26
Figure 20. Behavior comparison based on whether Mesh & CH Shield function is enabled or disabled
(in touch_config.h).................................................................................................................................27
Figure 21. Touch clock setting select option (in touch_lib.h) ................................................................ 28
Figure 22. Touch frequency calculation formula ...................................................................................28
Figure 23. Touch sensing operation mode select option ......................................................................29
Figure 24. Sensitivity for each channel in Normal mode ......................................................................29
Figure 25. Sensitivity for each channel in Adjust mode ........................................................................30
Figure 26. Touch sensing port select option ......................................................................................... 31
Figure 27. Action of reverse condition...................................................................................................32
Figure 28. Chang of touch sensing data by TS_SUM_CNT ................................................................. 33
Figure 29. Low-Pass filter select option ................................................................................................34
Figure 30. Detect threshold & release rate (set 50% rate) ................................................................... 35
Figure 31. Baseline operation according to Diff sensitivity (set 50% rate) ........................................... 36
Figure 32. Baseline calculation formula ................................................................................................ 36
Figure 33. IIR filter operation according to offset value ........................................................................37
Figure 34. Key recognition behavior by detect & release debounce count ..........................................38
Figure 35. Hold key release operation (set : 10s) ................................................................................. 41
Figure 36. Touch/LED time-division operation ......................................................................................44
Figure 37. Comparison of noise effects depending on the use of touch/LED time division ................. 45
Figure 38. LED current select option .................................................................................................... 46

A31T21xRLN Shield Board Quick Guide 1. Introduction
7
1 Introduction
A31T216RLN Shield Board Quick Guide introduces software environment and development
recommendations for the ABOV 32-bit Touch/LED-Driver MCU Starter Kit. This document also offers
an easy method to develop the Home Appliance Touch.
The Starter Kit Board in this document contains a CMSIS-DAP debugger ‘A-Link’, which allows the
MCU programming and debugging without additional devices.
By following the steps guided in this document, users can build a project and download firmware using
the Keil uVision 5, and learn how to debug the Starter Kit with the A-Link debugger.
In addition, we discuss how to operate the A31T216RLN Shield Board with examples, step by step.

A31T21xRLN Shield Board Quick Guide 2. User Requirements
9
2.2 Software
The software users must prepare is as follows:
Keil complier (uVision 5)
Example Code & Touch Library
Figure 3 shows the uVision Editor that includes all standard features of a modern source code editor
and is available during debugging.
Figure 3. Compiler (Software)

2. User Requirements A31T21xRLN Shield Board Quick Guide
10
2.3 Reference Documents
From the ABOV website, users can find more information about the A31T216RLN Starter Kit and Shield
Board as follows:
A31T216 Starter Kit Quick Guide
A31T216 Starter Kit HW Manual
A31T216 User’s Manual
A31T216 T-TYPE LED Structure
Example code
For detailed information, refer to the categories below.
Figure 4. Reference Document on the ABOV Website

A31T21xRLN Shield Board Quick Guide 2. User Requirements
11
2.4 System Requirements
Windows PC (7, 8, and 10)
Micro-B 5-pin USB Cable (for Starter Kit)
Figure 5. Window PC and Mini-B Cable

A31T21xRLN Shield Board Quick Guide 3. Build and Run Project (Shield Board)
13
3 Build and Run Project (Shield Board)
Running application code makes it easier to start the Shield Board. Following the steps below:
Step 1. Prepare Starter Kit and Shield Board.
Step 2. Starter Kit and Shield Board settings
Step 3. Starter Kit connection to PC
Step 4. Run Starter Kit Shield Board.
Step 5. Debugging
Step 6. Library description

3. Build and Run Project (Shield Board) A31T21xRLN Shield Board Quick Guide
14
3.1 Prepare Starter Kit and Shield Board
3.1.1 Hardware Components of Starter Kit
1. The Starter Kit consists of a device board and an A-Link (CMSIS-DAP) debugger board as
shown in Figure 7. It can be used separately as needed.
2. Device board configuration:
A. ABOV 32-bit MCU, X-TAL (optional)
B. Pin headers connected to MCU
C. LEDs and switches to check input/output
3. A-Link (DMSIS-DAP/UART) debugger board configuration:
A. Programmable and debuggable A-Link with connections to PC via USB
B. UART Tx/Rx channel support
Figure 7. Starter Kit Board

A31T21xRLN Shield Board Quick Guide 3. Build and Run Project (Shield Board)
15
3.1.2 Hardware Components of Shield Board
Table 1. Shield Board Description
Function
Description
Remark
Touch (CS0 to CS13)
Touch only
-
Touch (CS14 to CS20, and
CS23)
Touch & SEG
-
Touch (CS20 to CS22)
COM only
Touch Not Available
LED T-Type Matrix
8 x 7 LEDs
ISEG0_ICOM0 to ISEG5_ICOM5,
ISEG7_ICOM7 to ISEG8_ICOM8
LED M-Type Matrix
8 x 8 LEDs
SEG: ISEG6, ISEG9 to ISEG15
COM: ICOM0 to ICOM5, ICOM7 to ICOM8
Figure 8. Components of A31T216RLN Shield Board

3. Build and Run Project (Shield Board) A31T21xRLN Shield Board Quick Guide
16
3.2 Starter Kit and Shield Board Settings
3.2.1 Jumper Settings for Starter Kit Control
The circle numbers in Figure 9 represent the order in which the jumpers are set to control the Starter
Kit:
1. The Starter Kit uses the USB power. Select 3.3V or 5.0V. (See specifications for the maximum
operating voltage.)
2. Boot mode: ‘Open’ allows User program operating mode (default) and ‘Short’ allows Boot
mode (debugger is always enabled).
3. USB to UART Connector
A. Set jumpers to use UART through the USB connector on the A-Link board.
B. Use to connect UART Rx and Tx.
Figure 9. Starter Kit Jumper and Switch

A31T21xRLN Shield Board Quick Guide 3. Build and Run Project (Shield Board)
17
3.2.2 Starter Kit Connection for Shield Board Use
Connect the header sockets on the Shield board and the header pin on the Starter Kit Board, as shown
in Figure 10.
Figure 10. Connection of Starter Kit Board and Shield Board

3. Build and Run Project (Shield Board) A31T21xRLN Shield Board Quick Guide
18
3.3 Starter Kit Connection to PC
3.3.1 USB Connection with USB 2.0 Cable
Connect a USB 2.0 (Micro-B type) cable to the Starter Kit as shown in Figure 11. When the PC is
connected correctly to the other end of the USB 2.0 cable, the following actions are performed:
1. The power LED on the device board is turned on.
2. The status LED on the A-Link board (debugger) is turned on.
Figure 11. Starter Kit and USB Connection

A31T21xRLN Shield Board Quick Guide 3. Build and Run Project (Shield Board)
19
3.3.2 Hardware Recognition on PC (Device Drivers)
The A-Link board (debugger) uses a USB interface.
When the A-Link board (debugger) is connected to a PC, it is displayed as ‘USB Composite Device’ in
the Serial Bus Controller List, as shown in Figure 12.
The A-Link does not require the driver installation on Microsoft Windows.
Figure 12. Serial Bus Controller Lists at Device Manager

3. Build and Run Project (Shield Board) A31T21xRLN Shield Board Quick Guide
20
3.4 Run Starter Kit Shield Board
3.4.1 Compilation with Keil uVision 5
Using Keil uVision 5, users can compile the provided project files and run the Starter Kit Shield Board.
To do so, follow the procedure below:
1. Install ‘Keil uVision 5 for Cortex-M’.
2. Open the provided project file (a31t216.uvmpw).
Figure 13. Project Open in Keil uVision 5
Other manuals for A31T21 RLN Series
1
Table of contents
Other Abov Computer Hardware manuals