| | |
| | | 5, |
| | | #endif |
| | | DWT_PRF_64M, /* Pulse repetition frequency. */ |
| | | DWT_PLEN_128, /* Preamble length. */ |
| | | DWT_PLEN_64, /* Preamble length. */ |
| | | DWT_PAC8, /* Preamble acquisition chunk size. Used in RX only. */ |
| | | 9, /* TX preamble code. Used in TX only. */ |
| | | 9, /* RX preamble code. Used in RX only. */ |
| | | 1, /* Use non-standard SFD (Boolean) */ |
| | | DWT_BR_6M8, /* Data rate. */ |
| | | DWT_PHRMODE_STD, /* PHY header mode. */ |
| | | (129 + 8 - 8) /* SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */ |
| | | (65 + 8 - 8) /* SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */ |
| | | }; |
| | | |
| | | uint32_t uwbid=0; |
| | |
| | | |
| | | // dwt_setinterrupt( DWT_INT_RFCG | (DWT_INT_ARFE | DWT_INT_RFSL | DWT_INT_SFDT | DWT_INT_RPHE | DWT_INT_RFCE | DWT_INT_RFTO | DWT_INT_RXPTO), 1); |
| | | |
| | | |
| | | dwt_setinterrupt( DWT_INT_RFCG | (DWT_INT_ARFE | DWT_INT_RFSL | DWT_INT_SFDT | DWT_INT_RPHE | DWT_INT_RFCE | DWT_INT_RFTO | DWT_INT_RXPTO), 1); |
| | | /* Apply default antenna delay value. See NOTE 1 below. */ |
| | | dwt_setrxantennadelay(RX_ANT_DLY); //设置接收天线延迟 |
| | | dwt_settxantennadelay(TX_ANT_DLY); //设置发射天线延迟 |
| | | |
| | | // dwt_setrxtimeout(1000);//设定接收超时时间,0位没有超时时间 |
| | | // dwt_rxenable(0);//打开接收 |
| | | dwt_setrxtimeout(1000);//设定接收超时时间,0位没有超时时间 |
| | | dwt_rxenable(0);//打开接收 |
| | | // uwbid=dwt_readdevid(); |
| | | /* Set expected response's delay and timeout. See NOTE 4 and 5 below. |
| | | * As this example only handles one incoming frame with always the same delay and timeout, those values can be set here once for all. */ |
| | |
| | | extern uint8_t g_pairstart; |
| | | void tag_sleep_configuraion(void) |
| | | { |
| | | dwt_configuresleep(0x940, 0x7); |
| | | dwt_entersleep(); |
| | | // dwt_configuresleep(0x940, 0x7); |
| | | // dwt_entersleep(); |
| | | } |
| | | u32 id; |
| | | void UWB_Wkup(void) |