Forums - About Key Matrix pins configuration for QCA4020 board

4 posts / 0 new
Last post
About Key Matrix pins configuration for QCA4020 board
chilukuriashok90
Join Date: 25 Jun 18
Posts: 8
Posted: Mon, 2018-09-10 04:10

Hi,

I would like to use key matrix (4 buttons - S3,S4.S5,S6) on QCA4020 board. But i could not able to find GPIO pins details for key matrix in documents.

Is there any document or code example for to get more details about pins configurations on QCA4020 board??.

Can you please help me on this??  

Regards,

Ashok

  • Up0
  • Down0
jaydenk
Join Date: 21 Jun 18
Posts: 64
Posted: Mon, 2018-09-10 11:43

Hi chilukuriashok90,

As per schematics, switch (S3,S4, S5,S6) are using keypad (row 4-5 and col 4-5) through GPIO 8,9,10,11.
For this configuration, we can configure keypad like following:

@Keypad configuration for CDB board
qapi_KPD_Config_t keybrd_Config =
{
{
0x30,
/**< Bitmap of rows that need to be enabled
* (e.g., 0x03 = Rows 4 and 5 are enabled).
*/

0x30,
/**< Bitmap of columns that need to be enabled
* (e.g., 0x03 = Columns 4 and 5 are enabled ).
*/

0,
/**< GPIO set to be used. The platform supports mutiple sets of GPIOs
* to interface with an external keypad. Consult the hardware schematic
* configuration database for the GPIO set to be used.
* 0 = set 0 is selected; 1 = set 1 is selected.
*/
},
== snip ==

For general keypad demo code, please refer keypad demo in quartz/QCLI_demo/src/keypad folder.

Thanks
BR,
Jayden

  • Up0
  • Down0
chilukuriashok90
Join Date: 25 Jun 18
Posts: 8
Posted: Wed, 2018-09-19 05:42

Hi jaydenk

Thanks for quick reply,

I have tried as per your suggestion.

@Keypad configuration for CDB board

qapi_KPD_Config_t   keybrd_Config = 

{
   {
0x30,
   /**< Bitmap of rows that need to be enabled
    *  (e.g., 0x03 = Rows 0 and 1 are enabled).
    */
 
      0x30,
   /**< Bitmap of columns that need to be enabled
    * (e.g., 0x03 = Columns 0 and 1 are enabled ).
    */
 
       0,
   /**< GPIO set to be used. The platform supports mutiple sets of GPIOs
     *  to interface with an external keypad. Consult the hardware schematic
     *  configuration database for the GPIO set to be used.
     *  0 = set 0 is selected; 1 = set 1 is selected.
     */
   },
   /**< Keypad matrix configuration. */
 and also changed  DEFAULT_KEYPAD_MATRIX_ROW_MASK and DEFAULT_KEYPAD_MATRIX_COL_MASK to 0x30. 
 
Here is the logs,
 
Command List:
  Commands:
     0. Ver
     1. Help
     2. Exit
 
  Subgroups:
     3. BLE
     4. HMI
     5. WLAN
     6. Net
     7. Coex
     8. FwUp
     9. LP
    10. Fs
    11. Ecosystem
    12. SecureFs
    13. Crypto
    14. ZigBee
    15. Thread
    16. Peripherals
    17. Platform
    18. JSON
 
 
> 16
 
Peripherals> 12
 
Peripherals\Keypad> 4
 
Peripherals\Keypad>
Peripherals\Keypad: Keypad Matrix Mask=[row:30 col:30]
Peripherals\Keypad: Keypad fails
.It is getting fail and button presses are not detecting. I am using cdb20 board (ASSY20-YA999).Did we need to put any jumpper pin setting in cdb20 board.
 
Can you please help me on this??  
Thnaks.
 
  • Up0
  • Down0
jaydenk
Join Date: 21 Jun 18
Posts: 64
Posted: Wed, 2018-09-19 13:36

Hi chilukuriashok90,

As I mentioned, switch (S3,S4, S5,S6) are using keypad (row 4-5 and col 4-5) through GPIO 8,9,10,11.

Please note debug UART is also using GPIO 8 and 9.

By default, build option "cdb" is selecting debug UART, but we can change to use HS UART on cdb board with following changes:

1. quartz/demo/QCLI_demo/src/qcli/pal.c
#ifdef CONFIG_CDB_PLATFORM
- #define PAL_CONSOLE_PORT QAPI_UART_DEBUG_PORT_E
+ #define PAL_CONSOLE_PORT QAPI_UART_HS_PORT_E
#else

2. HS UART jumper setting on CDB 20 board

· HS UART (GPIO_60: Quartz_UART_TX, GPIO_20: Quartz_UART_RX)
o J18-3 to J5-27 (GPIO 17)
o J19-3 to J5-36 ( GPIO 60)
o J91-1 to J91-2
o J92-1 to J92-2

Thanks
BR,
Jayden

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.