Closed charlespax closed 7 years ago
Yes, the buttons should all be EXT, since this is the external interrupt signal.
In the version 0.3 boards I just ordered this is the configuration.
SW_A and SW_C are on the same interrupt. Should I move one to another pin in the next revision? PC1 (GPIO_EXTI1) and PC4 (GPIO_EXTI4) are currently unused. I can also swap one out with WIFI_EN (PC7, GPIO_EXTI7).
@protological I believe you already addressed this in the .ioc file.
Page 209 in the STM32F103 datasheet shows that EXTI interrupts are connected to all ports. The EXTI number matches the Port number, so EXTI9 is connected to Ports A,B,C,D pin #9. As long as there are not two inputs on the same EXTI we can detect individual buttons.
EXTI 1 and 4 would work for SW_C, I would keep everything else where it is.
Swapped WIFI_EN with SW_A to avoid interrupt sharing. Adjusted .ioc file accordingly.
Should the input button be configured as GPIO_EXTIx? SW_A PC11 SW_B PC10 SW_C PC7 SW_D PA8 SW_E PB2