98 HAL_ADC_Stop_IT(&
hadc);
99 HAL_ADC_DeInit(&
hadc);
102 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
103 __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WRFBUSY);
107 HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1_LOW);
108 HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN2);
109 HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN3);
113 __HAL_RTC_ALARM_CLEAR_FLAG(&
hrtc, RTC_FLAG_ALRAF);
114 HAL_RTC_DeactivateAlarm(&
hrtc, RTC_ALARM_A);
115 HAL_RTCEx_DeactivateWakeUpTimer(&
hrtc);
120 CLEAR_BIT(PWR->CR3, PWR_CR3_EWRFBUSY | PWR_CR3_EWRFIRQ);
122 GPIO_InitTypeDef GPIO_InitStruct =
125 GPIO_InitStruct.Pin = GPIO_PIN_12;
126 GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
127 GPIO_InitStruct.Pull = GPIO_NOPULL;
128 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
130 while (HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_12) == GPIO_PIN_SET)
141 GPIO_InitStruct.Pin = GPIO_PIN_All & ~(GPIO_PIN_0 | GPIO_PIN_4 |
NFC_INT_Pin);
142 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
153 GPIO_InitStruct.Pin = (
168 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
169 GPIO_InitStruct.Pull = GPIO_NOPULL;
170 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
174 GPIO_InitStruct.Pin = GPIO_PIN_All & ~(GPIO_PIN_14 | GPIO_PIN_15);
175 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
179 HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_SET);
188 __HAL_RCC_GPIOA_CLK_ENABLE();
191 HAL_DBGMCU_DisableDBGStandbyMode();
193 HAL_PWR_EnterSTANDBYMode();
219 LL_PWR_ClearFlag_C1STOP_C1STB();
230 HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
271 HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);
This file contains all the function prototypes for the adc.c file.
Header of application of the LRWAN Middleware.
void uart_Start()
start of UART reading
void writeLog(const char *format,...)
Format and send a log message over UART (printf-style). Available only when WRITELOG is defined; comp...
void SystemClock_Config(void)
Re-configure all system clocks after waking from STOP or OFF mode. Called automatically during the st...
void setBackUpRegister(uint32_t backupRegister, uint32_t value)
Write a value to an RTC backup register.
void sensorsBase_StartTimerToOff()
start timer to off the function is called from PWR_EnterStopMode - timer is started
void sensorsBase_StopTimerToOff()
stop timer to off the function is called from PWR_ExitStopMode - the timer value is checked and the P...
This file contains all the function prototypes for the rtc.c file.
This file contains all the function prototypes for the spi.c file.
void MX_SPI1_DeInit(void)
Deinitialise SPI1 peripheral to reduce current consumption in low-power mode. Call before entering ST...
void MX_SPI1_Init(void)
Initialise SPI1 peripheral (hspi1) as configured by STM32CubeMX. Sets clock polarity/phase,...
void PWR_ExitStopMode(void)
Exits Low Power Stop Mode.
void PWR_EnterOffMode(void)
Accumulates the total time spent in STOP or SLEEP mode (in ms or ticks). Incremented each time PWR_Ex...
void PWR_EnterSleepMode(void)
Enters Low Power Sleep Mode.
void PWR_EnterStopMode(void)
Enters Low Power Stop Mode.
void PWR_ExitSleepMode(void)
Exits Low Power Sleep Mode.
const struct UTIL_LPM_Driver_s UTIL_PowerDriver
Power driver callbacks handler.
void PWR_ExitOffMode(void)
Exits Low Power Off Mode.
Header for Low Power Manager interface configuration.
void PWR_ExitStopMode(void)
Exits Low Power Stop Mode.
void PWR_EnterOffMode(void)
Accumulates the total time spent in STOP or SLEEP mode (in ms or ticks). Incremented each time PWR_Ex...
void PWR_EnterSleepMode(void)
Enters Low Power Sleep Mode.
void PWR_EnterStopMode(void)
Enters Low Power Stop Mode.
void PWR_ExitSleepMode(void)
Exits Low Power Sleep Mode.
void PWR_ExitOffMode(void)
Exits Low Power Off Mode.
configuration of the timer_if.c instances
#define RTC_BKP_STANDBY_SIGN
Magic value stored in RTC_BKP_STANDBY before entering standby mode. On wakeup, if getBackUpRegister(R...
#define RTC_BKP_STANDBY
RTC backup register index used to persist the standby-mode flag across a system reset / wakeup from O...
Header for USART interface configuration.
void vcom_Resume(void)
Resume the UART and associated DMA (used by LPM).