| | |
| | | uint16_t tyncpoll_time,lpsettime; |
| | | uint16_t slottime,max_slotpos; |
| | | uint16_t lastpoll_count,interval_count,slot_startcount,tag_frequency,lastpoll_time,current_time; |
| | | extern uint8_t module_power; |
| | | uint8_t module_power; |
| | | extern float nomove_count; |
| | | uint8_t imu_enable,motor_enable; |
| | | u16 GetLPTime(void) |
| | |
| | | |
| | | /* Initialize all configured peripherals */ |
| | | MX_GPIO_Init(); |
| | | MX_LPTIM1_Init(); |
| | | //MX_LPTIM1_Init(); |
| | | MX_DMA_Init(); |
| | | MX_USART1_UART_Init(); |
| | | MX_SPI1_Init(); |
| | |
| | | LIS3DH_Data_Init(); |
| | | Dw1000_Init(); |
| | | Dw1000_App_Init(); |
| | | dwt_setrxtimeout(0);//设定接收超时时间,0位没有超时时间 |
| | | dwt_rxenable(0);//打开接收 |
| | | while(1); |
| | | // NearPoll(); |
| | | HardWareTypeDiffConfig(); |
| | | dwt_configuresleep(DWT_PRESRV_SLEEP | DWT_CONFIG, DWT_WAKE_CS | DWT_WAKE_WK| DWT_SLP_EN); |
| | | dwt_entersleep(); |
| | | waitusart_timer=tag_frequency*USART_KEEPWAKE_TIME;; |
| | | DW_DISABLE; |
| | | if(HAL_UART_Receive_DMA(&huart1,m_EUART_DMA_RXBuf,EUART_RX_BUF_SIZE)) |
| | | { |
| | | Error_Handler(); |
| | | } |
| | | |
| | | // HAL_Delay(2000); |
| | | // mcu_sleep(); |
| | | //LED0_BLINK; |