I am using LinkIt 2523 HDK and I am not able to make the keypad scanner to work. My purpose is to read 4 switches from the dev. board.
Steps that I followed:
1. Configured GPIOs with EPT tool as follows:
2. configured keypad mode, COLs and ROWs:
3. EPT generated files moved to src and inc folders of the project
4. Software Scanner configuration and enable:
keypad_config.mode = HAL_KEYPAD_MODE_DOUBLE_KEY;
keypad_config.key_map.column_bitmap = 0x07;
keypad_config.key_map.row_bitmap = 0x07;
keypad_config.debounce = 16;
- I used hal_keypad_get_key(&keypad_event); routine to read pressed key.
- There is no detection of the pressed key, all I got is the HAL log that says all the time that [keypad][get key]normal key no data in buffer.
- I've checked keypad scanner registers as USER_guide suggests for dual_key mode:
set values was different from the suggested ones as follows:
KP_EN:1 required: 1
- I manually set registers values as follows:
- now the registers are set according to datasheet, but the hal_keypad_get_key(&keypad_event); still not working not detecting any key.
Please advice how to make the keypad scanner work with on-board 4 buttons in dual mode,
Thanks in advance, Roman