This commit is contained in:
parent
de43320d4f
commit
91e8d5ac64
|
@ -185,3 +185,11 @@ void setSdCardConfigurationOverrides() {
|
|||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||
engineConfiguration->is_enabled_spi_2 = true;
|
||||
}
|
||||
|
||||
void boardPrepareForStandby() {
|
||||
PWR->CR |= PWR_CR_CWUF; //Clear Wakeup Pin flag for PA0
|
||||
PWR->CSR |= PWR_CSR_EWUP; //Enable Wakeup Pin for PA0
|
||||
|
||||
palSetPadMode(GPIOA, 0, PAL_MODE_INPUT); //Select Pin 0 on A Port - PA0, Wkup
|
||||
palEnableLineEvent(PAL_LINE(GPIOA, 0), PAL_EVENT_MODE_FALLING_EDGE); // Set PA0 to interrupt on rising edge
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ void boardPrepareForStop() {
|
|||
#ifdef STM32F4XX
|
||||
// enable EXTI on PA0 - The only WKUP pin F4 has.
|
||||
PWR->CR |= PWR_CR_CWUF; //Clear Wakeup Pin flag for PA0
|
||||
palSetPadMode(GPIOA, 0, PAL_MODE_INPUT); //Select Pin 0 on D Port - PA0, Wkup
|
||||
palSetPadMode(GPIOA, 0, PAL_MODE_INPUT); //Select Pin 0 on A Port - PA0, Wkup
|
||||
palEnableLineEvent(PAL_LINE(GPIOA, 0), PAL_EVENT_MODE_RISING_EDGE); // Set PA0 to interrupt on rising edge
|
||||
|
||||
#endif
|
||||
|
|
|
@ -807,6 +807,7 @@ void boardPreparePA0ForStandby() {
|
|||
#ifdef STM32F4XX
|
||||
PWR->CR |= PWR_CR_CWUF; //Clear Wakeup Pin flag for PA0
|
||||
PWR->CSR |= PWR_CSR_EWUP; //Enable Wakeup Pin for PA0
|
||||
// why do we not enable PAL event like in boardPrepareForStop?
|
||||
#endif
|
||||
|
||||
#ifdef STM32F7XX
|
||||
|
|
Loading…
Reference in New Issue