yincheng.zhong
2023-04-19 fb63fc819cf017e3b5d7deb92cfbb0b3f3d08454
Src/application/dw_app.c
@@ -78,7 +78,7 @@
   NEARPOLL,
}tag_state=GETNEARMSG;
static dwt_config_t config = {
   2,               /* Channel number. */
   5,               /* Channel number. */
   DWT_PRF_64M,     /* Pulse repetition frequency. */
   DWT_PLEN_128,    /* Preamble length. */
   DWT_PAC8,        /* Preamble acquisition chunk size. Used in RX only. */
@@ -173,6 +173,14 @@
    Reset_DW1000();//重启DW1000 /* Target specific drive of RSTn line into DW1000 low for a period. */
   Spi_ChangePrescaler(SPIx_PRESCALER_SLOW);   //设置为快速模式
    dwt_initialise(DWT_LOADUCODE);//初始化DW1000
    dwt_configcontinuousframemode(124800);
   dwt_writetxfctrl(13, 0);
   dwt_starttx(DWT_START_TX_IMMEDIATE);
      while(GET_USERKEY)
   {
         IdleTask();
   }
    dwt_forcetrxoff();
   Spi_ChangePrescaler(SPIx_PRESCALER_FAST);   //设置为快速模式
    /* Configure DW1000. See NOTE 6 below. */