Re: STM32F407VG microcontroller - multiple GPIO interrupts
Posted: Sun Mar 22, 2020 10:16 am
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
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