STM32F407VG microcontroller - multiple GPIO interrupts

Post here first, or if you can't find a relevant section!
ag123
Posts: 1898
Joined: Thu Dec 19, 2019 5:30 am
Answers: 30

Re: STM32F407VG microcontroller - multiple GPIO interrupts

Post by ag123 »

i think if it is HID https://en.wikipedia.org/wiki/Human_interface_device use case.
there is no need for DMA, simply reading the registers directly will be more than enough.
if i were to make a keyboard say a 104 keys keyboard, the easiest way is to do a scan, but you can read the whole GPIO register directly.
if you don't hold up the loop(), you can do that scan each iteration in loop(), doesn't take much resources
debouncing can probably be done using some clever finite state machines e.g. set a flag if key pressed, consider key pressed if next iteration the key is still pressed. this probably works if the iterations are closely spaced
Post Reply

Return to “General discussion”