PaxInstruments / PaxInstruments-LabWiz-firmware

Firmware for the Pax Instruments LabWiz board.
0 stars 1 forks source link

SW_x configuratoin #12

Closed charlespax closed 7 years ago

charlespax commented 7 years ago

Should the input button be configured as GPIO_EXTIx? SW_A PC11 SW_B PC10 SW_C PC7 SW_D PA8 SW_E PB2

screen shot 2016-08-14 at 21 55 27

protological commented 7 years ago

Yes, the buttons should all be EXT, since this is the external interrupt signal.

charlespax commented 7 years ago

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).

charlespax commented 7 years ago

@protological I believe you already addressed this in the .ioc file.

protological commented 7 years ago

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.

charlespax commented 7 years ago

Swapped WIFI_EN with SW_A to avoid interrupt sharing. Adjusted .ioc file accordingly.