2026-03-20 1:06 AM
Hi,
Greeting!
I am working on the STM32MP135F-DK board and trying to interface a 4x5 matrix keypad using GPIOs.
I configured the keypad as follows:
Columns (C1–C5):
C1 → PE1 (Pin 37)
C2 → PF11 (Pin 35)
C3 → PF9 (Pin 33)
C4 → PD13 (Pin 31)
C5 → PE6 (Pin 29)
Rows (R1–R4):
R1 → PA0 (Pin 40)
R2 → PA5 (Pin 38)
R3 → PA7 (Pin 36)
R4 → PE5 (Pin 32)
After modifying the device tree and flashing the updated .dtb, I observe the following issues:
The display becomes glitchy.
The boot logo appears corrupted.
The system becomes unresponsive after boot.
Recovery is only possible after reflashing the starter package using STM32CubeProgrammer.
From my analysis:
Manual GPIO control seems to work correctly.
The matrix_keypad driver is loaded not properly.
matrix_keypad 20480 0
matrix_keymap 12288 1 matrix_keypadI suspect this might be related to incorrect GPIO or pinmux configuration, possibly causing a conflict with other peripherals (e.g., display).
Could you please help identify:
The root cause of this issue?
Whether these GPIOs conflict with LTDC or other peripherals?
The correct way to configure GPIOs for a matrix keypad on this board?
Any guidance would be greatly appreciated.
Thank you!!
Regards,
Pragya
2026-03-20 3:00 AM
Hello @pd18178 ,
Could you please explain which modification did you make in the stm32mp135f-dk.dts Linux device tree ? Maybe you could copy or attach the DT.
You said "The matrix_keypad driver is loaded not properly". Is it a typo ?
According to the default pin configuration of the STM32MP135F-DK board, I do not see anything pin conflict based on the default configuration.
As information, we can check dynamically in Linux the pin config through this debug command:
MP13 $> cat /sys/kernel/debug/pinctrl/soc:pinctrl@50002000/pinconf-pins
What do you mean by "The system become unresponsive after boot" ?
Kind regards,
Erwan.