POD pinout + GPIO

The Pod pinout shows switches TAC_SWITCH_1 and _2 being D27 and D28, which are connected to PG9 and PA2. I set up PG9 as GPIO_EXTI9 and PA2 as GPIO_EXTI2 and they are both set up in NVIC.

Switch 1 works fine, but switch 2 doesn’t react, it doesn’t even go into HAL_GPIO_EXTI_Callback. I don’t know what to do next… I know there are some differences between GPIOA and GPIOG, but I can’t figure out the issue.

Btw, switch 2 works fine with pod examples, so I know it’s not a hardware issue. Any ideas would be appreciated.

Ok, I’m answering my own question. Something is off with Switch 2, namely the pull-up resistor.

When I define a pull-up in CubeIDE, the switch works fine. When I don’t, it floats and it doesn’t work. As I said Switch 1 doesn’t have this problem.

The Pod schematic doesn’t show pull-up resistors for the switches. Not sure if libDaisy defines a pull-up for switch 2, because somehow Switch 2 works there, or if it’s some weird tolerance issue, but there it is…

1 Like