This commit is contained in:
parent
7e1a1a3ba8
commit
6a388ecd6e
|
@ -185,11 +185,3 @@ void setSdCardConfigurationOverrides() {
|
||||||
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
engineConfiguration->sdCardCsPin = H_SPI2_CS;
|
||||||
engineConfiguration->is_enabled_spi_2 = true;
|
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
|
|
||||||
}
|
|
||||||
|
|
|
@ -802,12 +802,14 @@ __attribute__((weak)) void boardPrepareForStop() {
|
||||||
palEnableLineEvent(PAL_LINE(GPIOA, 0), PAL_EVENT_MODE_RISING_EDGE);
|
palEnableLineEvent(PAL_LINE(GPIOA, 0), PAL_EVENT_MODE_RISING_EDGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Standby uses special low power hardware - it always wakes on rising edge
|
||||||
|
*/
|
||||||
|
|
||||||
void boardPreparePA0ForStandby() {
|
void boardPreparePA0ForStandby() {
|
||||||
#ifdef STM32F4XX
|
#ifdef STM32F4XX
|
||||||
PWR->CR |= PWR_CR_CWUF; //Clear Wakeup Pin flag for PA0
|
PWR->CR |= PWR_CR_CWUF; //Clear Wakeup Pin flag for PA0
|
||||||
PWR->CSR |= PWR_CSR_EWUP; //Enable Wakeup Pin for PA0
|
PWR->CSR |= PWR_CSR_EWUP; //Enable Wakeup Pin for PA0
|
||||||
// why do we not enable PAL event like in boardPrepareForStop?
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STM32F7XX
|
#ifdef STM32F7XX
|
||||||
|
|
Loading…
Reference in New Issue