| | |
| | | uint8_t nomove_flag; |
| | | uint16_t irq_num; |
| | | uint16_t nomove_count; |
| | | uint16_t debug1,debug2,debug3,debug4; |
| | | void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) |
| | | { |
| | | if(GPIO_Pin == RADIO_DIO1_Pin) |
| | |
| | | // SystemClock_Config(); |
| | | // irq_num++; |
| | | // RadioIrqProcess(); |
| | | debug1++; |
| | | } |
| | | if(GPIO_Pin == GPIO_PIN_9) |
| | | { |
| | | SystemClock_Config(); |
| | | MbxTagUwbRec(); |
| | | debug2++; |
| | | } |
| | | if(GPIO_Pin == GPIO_PIN_13) |
| | | { |
| | | debug3++; |
| | | } |
| | | // if(GPIO_Pin == GPIO_PIN_1)//按键 |
| | | // { |
| | |
| | | /* 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(); |
| | | /* USER CODE BEGIN 2 */ |
| | | // __disable_irq(); |
| | | Uart_Register(UART_ID_DBG, &huart1); |
| | |
| | | // dwt_entersleep(); |
| | | LIS3DH_Data_Init(); |
| | | HAL_Delay(500); |
| | | LoraInit(); |
| | | // LoraInit(); |
| | | if (HAL_LPTIM_TimeOut_Start_IT(&hlptim1, LPTIMER_1S_COUNT, 0) != HAL_OK) //system time is 1010ms 1 puls=30.518us |
| | | { |
| | | Error_Handler(); |
| | |
| | | uint8_t num; |
| | | uint16_t sleep_time; |
| | | uint16_t chongdian_yundong_time; |
| | | uint16_t chongdianmeiyouuwb_time; |
| | | void Bat_Percent_Poll() |
| | | { |
| | | bat_time++; |
| | |
| | | SystemClock_Config(); |
| | | Gps_Chongqi_Poll(); |
| | | Powerled_Poll(); |
| | | chongdianmeiyouuwb_time++; |
| | | if(HAL_GPIO_ReadPin(INPUT_5V_GPIO_Port,INPUT_5V_Pin)&&chongman_flag==0) |
| | | { |
| | | num++; |