| | |
| | | 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 |
| | | if(g_com_map[IMU_ENABLE]) |
| | | { |
| | | dwt_configcontinuousframemode(12480); |
| | | dwt_writetxdata(13, 0, 0);//将Poll包数据传给DW1000,将在开启发送时传出去 |
| | | dwt_writetxfctrl(13, 0);//设置超宽带发送数据长度 |
| | | dwt_starttx(DWT_START_TX_IMMEDIATE);//开启发送,发送完成后等待一段时间开启接收,等待时间在dwt_setrxaftertxdelay中设置 |
| | | while(1) |
| | | { |
| | | IdleTask(); |
| | | } |
| | | } |
| | | Spi_ChangePrescaler(SPIx_PRESCALER_FAST); //设置为快速模式 |
| | | |
| | | /* Configure DW1000. See NOTE 6 below. */ |