| | |
| | | { |
| | | UART_PushFrame(hbsend,16); |
| | | } |
| | | uint16_t temp; |
| | | float dw_vbat; |
| | | void StartUpTest(void) |
| | | { |
| | | temp=dwt_readtempvbat(1); |
| | | dw_vbat=(float)((temp&0xff)-173)/173+3.3; |
| | | if(dw_vbat<2.8) |
| | | { |
| | | SCB->AIRCR = 0X05FA0000|(unsigned int)0x04; //杞浣嶅洖鍒癰ootloader |
| | | } |
| | | } |
| | | extern u8 g_start_sync_flag,usart_send_flag,anc_report_num; |
| | | u16 heartbeat_timer,poll_timer; |
| | | int16_t sync_timer; |
| | |
| | | |
| | | UART_CheckReceive(); |
| | | UART_CheckSend(); |
| | | |
| | | if(heartbeat_timer>1000) |
| | | { |
| | | heartbeat_timer=0; |
| | |
| | | { |
| | | |
| | | Device_Init(); |
| | | //StartUpTest(); |
| | | Program_Init(); |
| | | Dw1000_Init(); |
| | | delay_ms(10); |