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
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
Hi jaydenk
Thanks for quick reply,
I have tried as per your suggestion.
@Keypad configuration for CDB board
qapi_KPD_Config_t keybrd_Config =
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