stm32duino / STM32LowPower

Arduino Low Power library for STM32
187 stars 52 forks source link

attachInterruptWakeup pin works only for PA0 on bluepill #41

Closed evansgl closed 4 years ago

evansgl commented 4 years ago

Seems that attachInterruptWakeup pin works only for PA0 pin on BluePill. I have tried other pins but I can only trigger the wake up of the board from PA0 (even if I set other pins e.g PA1 at below code) Do I miss something here?

const int BUTTON_PIN = PA1;
LowPower.attachInterruptWakeup(BUTTON_PIN, repetitionsIncrease, RISING);
fpistm commented 4 years ago

Hi @evansgl STM32F103C8 has only one system wakeup pin: PA0. https://github.com/stm32duino/Arduino_Core_STM32/blob/1faf0a0ead7b6ae07258d706c1e9052de0be6cf0/variants/PILL_F103XX/PinNamesVar.h#L3

You can't use another pin to wake up the board.