MCUXpresso SDK Documentation

kpp

kpp#

Overview#

The KPP Example project is a demonstration program that uses the KSDK software to manipulate the Keypad MATRIX. The example is use the continuous column and rows as 44 or 88 matrix to show the example.

Supported Boards#

EVKB-IMXRT1050
Hardware requirements
  • Mini/micro USB cable

  • EVKB-IMXRT1050 board

  • Personal Computer

Board settings

Matrix and Jumper settings for KPP:

row1 <—–> J22 #2 row2 <—–> J23 #3 row3 <—–> J22 #7 row4 <—–> J23 #6 col1 <—–> J22 #1 col2 <—–> J23 #4 col3 <—–> J22 #8 col4 <—–> J23 #5

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 4*4 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

 This was a long press.

   ......
   
 Key SW16 was pressed.
 Key SW16 was pressed.
 Key SW16 was pressed.

MIMXRT1060-EVKB
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1060-EVKB board

  • Personal Computer

Board settings

Remove the resistor R196,R201,R202,R241,R321

Matrix and Jumper settings for KPP:

row1 <—–> J16 #2 row2 <—–> J33 #3 row3 <—–> J16 #7 row4 <—–> J33 #6 col1 <—–> J16 #1 col2 <—–> J33 #4 col3 <—–> J16 #8 col4 <—–> J33 #5

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 4*4 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

 This was a long press.

   ......
   
 Key SW16 was pressed.
 Key SW16 was pressed.
 Key SW16 was pressed.

MIMXRT1170-EVKB
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1170-EVKB board

  • Personal Computer

Board settings

Remove 0Ω resistors R404,R406.

Matrix and Jumper settings for KPP:

row2 <—–> J10 #8 row3 <—–> J10 #12 col2 <—–> J10 #10 col3 <—–> J10 #6

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 2*2 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

 This was a long press.

   ......

MIMXRT1060-EVKC
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1060-EVKC board

  • Personal Computer

Board settings

Remove the resistor R196,R201,R202,R241,R321

Matrix and Jumper settings for KPP:

row1 <—–> J16 #2 row2 <—–> J33 #3 row3 <—–> J16 #7 row4 <—–> J33 #6 col1 <—–> J16 #1 col2 <—–> J33 #4 col3 <—–> J16 #8 col4 <—–> J33 #5

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 4*4 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

 This was a long press.

   ......
   
 Key SW16 was pressed.
 Key SW16 was pressed.
 Key SW16 was pressed.

FRDM-IMXRT1152
Hardware requirements
  • Type-C USB cable

  • FRDM-IMXRT1152 board

  • Personal Computer

Board settings

Matrix and Jumper settings for KPP:

row2 <—–> J11 #8 row3 <—–> J11 #12 col2 <—–> J11 #10 col3 <—–> J11 #6

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 2*2 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

 This was a long press.

   ......

EVK-MIMXRT1010
Hardware requirements
  • Mini/micro USB cable

  • EVK-MIMXRT1010 board

  • Personal Computer

Board settings

Matrix and Jumper settings for KPP:

row1 <—–> J57-6 row2 <—–> J57-8 row3 <—–> J57-18 col1 <—–> J57-12 col2 <—–> J57-10 col3 <—–> J57-20

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 3*3 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If you press a key continuously, it will print “this was a long press” repeately. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

 This was a long press.
 This was a long press.
   ......
   

Note: To debug in qspiflash, following steps are needed:

  1. Select the flash target and compile.

  2. Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J41.

  3. Start debugging in IDE.

    • Keil: Click “Download (F8)” to program the image to qspiflash first then clicking “Start/Stop Debug Session (Ctrl+F5)” to start debugging.

EVK-MIMXRT1015
Hardware requirements
  • Mini/micro USB cable

  • EVK-MIMXRT1015 board

  • Personal Computer

Board settings

Remove R2,C280,R6,C281,R443,R293 Matrix and Jumper settings for KPP:

row1 <—–> J19-3 row2 <—–> J19-5 row3 <—–> J17-8 col1 <—–> J19-6 col2 <—–> J19-4 col3 <—–> J18-2

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 3*3 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If you press a key continuously, it will print “this was a long press” repeately. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

 This was a long press.
 This was a long press.
   ......
   

Note: To debug in qspiflash, following steps are needed:

  1. Select the flash target and compile.

  2. Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J41.

  3. Start debugging in IDE.

    • Keil: Click “Download (F8)” to program the image to qspiflash first then clicking “Start/Stop Debug Session (Ctrl+F5)” to start debugging.

EVK-MIMXRT1020
Hardware requirements
  • Mini/micro USB cable

  • EVK-MIMXRT1020 board

  • Personal Computer

Board settings

Remove R85,R87,R89,R90

Matrix and Jumper settings for KPP:

row1 <—–> J19-5 row2 <—–> J19-2 row3 <—–> U1E-91 row4 <—–> U1E-89 col1 <—–> J19-4 col2 <—–> J17-7 col3 <—–> U1E-92 col4 <—–> U1E-90

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 4*4 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 This was a long press.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

   ......
   
 Key SW16 was pressed.
 Key SW16 was pressed.
 Key SW16 was pressed.

Note: To debug in qspiflash, following steps are needed:

  1. Select the flash target and compile.

  2. Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J23.

  3. Start debugging in IDE.

    • Keil: Click “Download (F8)” to program the image to qspiflash first then clicking “Start/Stop Debug Session (Ctrl+F5)” to start debugging.

MIMXRT1024-EVK
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1024-EVK board

  • Personal Computer

Board settings

Remove 0Ω resistors R1874,R1875,R1876,R1877.

Matrix and Jumper settings for KPP:

row3 <—–> J19-10 row4 <—–> J19-4 col3 <—–> J19-8 col4 <—–> J17-14

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 4*4 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW11 was pressed.

 Key SW12 was pressed.

 Key SW11 was released.

 Key SW12 was released.

 All keys released.

 This was a long press.

   ......

Note: To debug in qspiflash, following steps are needed:

  1. Select the flash target and compile.

  2. Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J23.

  3. Start debugging in IDE.

    • Keil: Click “Download (F8)” to program the image to qspiflash first then clicking “Start/Stop Debug Session (Ctrl+F5)” to start debugging.

EVK-MIMXRT1064
Hardware requirements
  • Mini/micro USB cable

  • EVK-MIMXRT1064 board

  • Personal Computer

Board settings

Matrix and Jumper settings for KPP:

row1 <—–> J22 #2 row2 <—–> J23 #3 row3 <—–> J22 #7 row4 <—–> J23 #6 col1 <—–> J22 #1 col2 <—–> J23 #4 col3 <—–> J22 #8 col4 <—–> J23 #5

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 4*4 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

 This was a long press.

   ......
   
 Key SW16 was pressed.
 Key SW16 was pressed.
 Key SW16 was pressed.

MIMXRT1160-EVK
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1160-EVK board

  • Personal Computer

Board settings

Remove 0Ω resistors R404,R406,R408.

Matrix and Jumper settings for KPP:

row2 <—–> J10 #8 row3 <—–> J10 #12 col2 <—–> J10 #10 col3 <—–> J10 #6

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 2*2 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

 This was a long press.

   ......

MIMXRT1180-EVK
Hardware requirements
  • Mini/micro USB cable

  • MIMXRT1180-EVK board

  • Personal Computer

Board settings

Matrix and Jumper settings for KPP:

row6 <—–> J44 #8 (B1_02) row7 <—–> J44 #6 (B1_00) col6 <—–> J44 #10 (B1_03) col7 <—–> J44 #12 (B0_01)

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 2*2 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW2 was pressed.

 Key SW1 was released.

 Key SW2 was released.

 All keys released.

 Key SW3 was pressed.

 This was a long press.

   ......

FRDM-MCXL255
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXL255 board

  • Personal Computer

Board settings

Matrix and Jumper settings for KPP:

row1 <—–> J8_5 (P0_13) row0 <—–> J8_7 (P0_12) col1 <—–> J8_4 (P0_3) col0 <—–> J8_8 (P0_2)

Make sure you have solder bridges SJ1 and SJ2 set to

  • 2-1 for the main core (cm33)

  • 2-3 for AON core (cm0+)

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 2*2 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention.

The following lines are printed to the serial terminal when the demo program is executed.

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

 This was a long press.

   ......

FRDM-IMXRT1186
Hardware requirements
  • Type-C USB cable

  • FRDM-IMXRT1186 board

  • Personal Computer

Board settings

Change Jumper J28, J31, J32, J35 from 1-2 to 2-3. Matrix and Jumper settings for KPP:

row5 <—–> J51 #4 (AD_16) row4 <—–> J51 #12 (AD_18) col5 <—–> J51 #6 (AD_17) col4 <—–> J51 #10 (AD_19)

Prepare the Demo
  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Connect the 2*2 matrix to the Jumpers mentioned above.

  4. Download the program to the target board.

  5. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When you press any key on matrix, the log will show the right key you have pressed. If the press is long, it will add the long press mention. The log would be seen on the OpenSDA terminal like:

 KPP Driver Example Start.
  
 Key SW1 was pressed.

 Key SW3 was pressed.

 Key SW1 was released.

 Key SW3 was released.

 All keys released.

 This was a long press.

   ......