FiRa Preamble Duration/Repetition

Hi, I am working with DWM3001CDK with the latest SDK CLI firmware. By checking the code I found that the preamble code duration seems cannot be modified in FiRa, is that ture? In fira_region_params.h there is an enum:

/**
 * enum fira_preamble_duration - Duration of preamble in symbols.
 * @FIRA_PREAMBLE_DURATION_32: |NSQM33| 32 symbols duration.
 * @FIRA_PREAMBLE_DURATION_64: 64 symbols duration.
 */
enum fira_preamble_duration {
	FIRA_PREAMBLE_DURATION_32,
	FIRA_PREAMBLE_DURATION_64,
};

However, DWM3000 should be able to support up to 4096 preamble length. I have tried to set APP_DEFAULT_TXPREAMBLENGTH defined in default_config.h to other numbers such as DWT_PLEN_2048. But this seems didn’t work. I am assuming it is because that fira configuration overrides the default value.

  1. Is there a way for me to experiment with different preamble repetition/duration/length in FiRa application?

And a second question: when running the FiRa application, and I check the diag field, the accumulator count accCount is always around 42~44, even in very good LoS condition.

  1. If the default preamble length is 64, why is the accCount be around 40?

Thanks in advance and any suggestions will be really appreciated!

Hi @ybppbzm,

FiRa only supports preamble duration of 64 symbols in BPRF mode. HPRF mode can additionally support 32 symbols but only BPRF is available on DW3000 family. HPRF is available on our new QM35825 device. If you wish to use longer preambles, then it cannot be FiRa compliant.

Can you share a log with the accCount that you are referring to?

Hi @akash,

Thanks for your reply.

I am using this api to read the diagnostics data from the register:

/*! ------------------------------------------------------------------------------------------------------------------
 * @brief This function will read the Diagnostics Registers - IPATOV, STS1, STS2 from the device, which can help in
 *        determining if packet has been received in LOS (line-of-sight) or NLOS (non-line-of-sight) condition.
 *        To help determine/estimate NLOS condition either Ipatov, STS1 or STS2 can be used, (or all three).
 *
 * NOTE:  CIA Diagnostics need to be enabled to "DW_CIA_DIAG_LOG_ALL" else the diagnostic registers read will be 0.
 * input parameters:
 * @param dw        - DW3xxx chip descriptor handler.
 *
 * @param all_diag  - this is the pointer to the Structure into which to read the data.
 *
 * @return a uint8_t value indicating if DWT_SUCCESS if right enum is used else DWT_ERROR.
 */
uint8_t dwt_nlos_alldiag(dwt_nlos_alldiag_t *all_diag)
{
    (void)dw->dwt_driver->dwt_ops->ioctl(dw, DWT_NLOS_ALLDIAG, 0, (void *)all_diag);
    return all_diag->result;
}

The dwt_nlos_alldiag_t is defined as follows:

    //NLOS structs
    typedef struct
    {
        uint32_t accumCount;          // the number of preamble symbols accumulated, or accumulated STS length.
        uint32_t F1;                  // the First Path Amplitude (point 1) magnitude value.
        uint32_t F2;                  // the First Path Amplitude (point 2) magnitude value.
        uint32_t F3;                  // the First Path Amplitude (point 3) magnitude value.
        uint32_t cir_power;           // the Channel Impulse Response Power value.
        uint8_t D;                    // the DGC_DECISION, treated as an unsigned integer in range 0 to 7.
        dwt_diag_type_e diag_type;
        uint8_t  result;
    } dwt_nlos_alldiag_t;

Thanks!