zhyinch
2018-09-15 cd37e4ce22e7d61e5cfd9ff88fca38eaeab5e363
改成快速通讯参数
已修改3个文件
37 ■■■■ 文件已修改
源码/核心板/Src/OnChipDevices/Spi.h 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/Src/application/dw_app.c 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/Src/main.c 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/Src/OnChipDevices/Spi.h
@@ -5,7 +5,7 @@
#include "stm32f10x.h"
#define SPIx_PRESCALER_SLOW            SPI_BaudRatePrescaler_32
#define SPIx_PRESCALER_FAST            SPI_BaudRatePrescaler_16
#define SPIx_PRESCALER_FAST            SPI_BaudRatePrescaler_4
#define SPIx                        SPI1
#define SPIx_GPIO                    GPIOA
源码/核心板/Src/application/dw_app.c
@@ -47,13 +47,13 @@
#define POLL_TX_TO_RESP_RX_DLY_UUS 150
/* This is the delay from Frame RX timestamp to TX reply timestamp used for calculating/setting the DW1000's delayed TX function. This includes the
 * frame length of approximately 2.66 ms with above configuration. */
#define RESP_RX_TO_FINAL_TX_DLY_UUS 5100
#define RESP_RX_TO_FINAL_TX_DLY_UUS 1500
/* Receive response timeout. See NOTE 5 below. */
#define RESP_RX_TIMEOUT_UUS 14700
#define RESP_RX_TIMEOUT_UUS 2700
#define POLL_RX_TO_RESP_TX_DLY_UUS 3600
#define POLL_RX_TO_RESP_TX_DLY_UUS 420
/* This is the delay from the end of the frame transmission to the enable of the receiver, as programmed for the DW1000's wait for response feature. */
#define RESP_TX_TO_FINAL_RX_DLY_UUS 1500
#define RESP_TX_TO_FINAL_RX_DLY_UUS 200
/* Receive final timeout. See NOTE 5 below. */
#define FINAL_RX_TIMEOUT_UUS 4300
@@ -76,18 +76,17 @@
/*------------------------------------ Variables ------------------------------------------*/
/* Default communication configuration. We use here EVK1000's default mode (mode 3). */
static dwt_config_t config =
{
    2,               /* Channel number. */
    DWT_PRF_64M,     /* Pulse repetition frequency. */
    DWT_PLEN_1024,   /* Preamble length. */
    DWT_PAC32,       /* 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_110K,     /* Data rate. */
    DWT_PHRMODE_STD, /* PHY header mode. */
    (1025 + 64 - 32) /* SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */
static dwt_config_t config = {
    5,               /* Channel number. */
    DWT_PRF_64M,     /* Pulse repetition frequency. */
    DWT_PLEN_128,    /* 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. */
    0,               /* 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. */
};
/* Frames used in the ranging process. See NOTE 2 below. */
源码/核心板/Src/main.c
@@ -11,8 +11,8 @@
#include "serial_at_cmd_app.h"
#include "deca_device_api.h"
//#define WORK_MODE_TAG
#define WORK_MODE_ANCHOR
#define WORK_MODE_TAG
//#define WORK_MODE_ANCHOR
#define START_ALARM_DIST_CM            200
#define BEEM_ON_TIME_MS                200