| | |
| | | void mcu_sleep(void) |
| | | { |
| | | GPIO_InitTypeDef GPIO_InitStruct = { 0 }; |
| | | // LIS3DH_Data_Init(); |
| | | LIS3DH_Data_Init(); |
| | | // while(1) |
| | | // {} |
| | | // HAL_NVIC_SystemReset(); |
| | |
| | | { |
| | | if(GPIO_Pin == GPIO_PIN_12) |
| | | { |
| | | // SystemClock_Config(); |
| | | SystemClock_Config(); |
| | | PowerDownDetect(); |
| | | } |
| | | if(GPIO_Pin == GPIO_PIN_9) |
| | |
| | | if(GPIO_Pin == GPIO_PIN_0)//加速度 |
| | | { |
| | | SystemClock_Config(); |
| | | if(nomove_flag==1) |
| | | if(nomove_flag||stop_flag) |
| | | { |
| | | HAL_NVIC_SystemReset(); |
| | | } |
| | |
| | | /* USER CODE END SysInit */ |
| | | |
| | | /* Initialize all configured peripherals */ |
| | | MX_IWDG_Init(); |
| | | MX_GPIO_Init(); |
| | | MX_DMA_Init(); |
| | | MX_RTC_Init(); |
| | |
| | | MX_LPTIM1_Init(); |
| | | MX_USART1_UART_Init(); |
| | | MX_TIM3_Init(); |
| | | MX_IWDG_Init(); |
| | | MX_LPUART1_UART_Init(); |
| | | /* USER CODE BEGIN 2 */ |
| | | // __disable_irq(); |