Configuring Transmit Power - damaki/DW1000 GitHub Wiki

Applications using the DW1000 must ensure that they transmit within regulatory limits, which is usually no more than -41.3 dBm/MHz. The DW1000 transmit (tx) power can be configured to account for design-specific losses/gains such as PCB/balun losses and antenna gain while transmitting at the maximum allowed power.

The DW1000 can operate in two different modes for tx power:

  • In manual tx power mode the DW1000 can use different tx power configurations for sending the synchronization header (SHR) and physical header (PHR) portions of the frame.
  • In smart tx power mode the DW1000 can adjust the transmit power based on the length of the frames. Since the regulatory limit of -41.3 dBm/MHz is measured over an average of 1 ms, if the frame to be transmitted takes less than 1 ms to transmit, then the DW1000 can boost its power and still remain within the regulatory limit.

For further details of the DW1000's transmit power modes, take a look at the DW1000 User Manual.

The transmit power is usually different for each combination of channel and PRF. For example, the transmit power used on channel 1 @ 16 MHz PRF is slightly different than channel 1 @ 64 MHz PRF. The DW1000 User Manual provides reference values that can be used as a starting point.

Configuring Transmit Power

The DW1000.Driver package defines data types and procedures to configure the transmit power, while keeping the code readable. Alternatively, the TX_POWER register can be written to directly.

Using the TX_POWER register

Below is an example of writing the TX_POwER register using the reference value for channel 1 @ 16 MHz PRF, when using smart tx power:

with DW1000.Registers;      use DW1000.Registers;
with DW1000.Register_Types; use DW1000.Register_Types;

procedure Example is
begin
   TX_POWER.Write 
     (TX_POWER_Type'
        (BOOSTNORM => 16#75#,
         BOOSTP500 => 16#55#,
         BOOSTP250 => 16#35#,
         BOOSTP125 => 16#15#));
end Example;

Using the driver

The DW1000.Driver package defines types which make configuring the transmit power much more readable and usable. The above example for configuring the smart tx power for channel 1 @ 16 MHz PRF is shown below:

with DW1000.Driver; use DW1000.Driver;

procedure Example is
begin
   DW1000.Driver.Configure_Tx_Power
     (Tx_Power_Config_Type'
         (Smart_Tx_Power_Enabled => True,
          Boost_Normal           => (Coarse_Gain_Enabled => True,
                                     Fine_Gain           => 10.5,
                                     Coarse_Gain         => 9.0),
          Boost_500us            => (Coarse_Gain_Enabled => True,
                                     Fine_Gain           => 10.5,
                                     Coarse_Gain         => 12.0),
          Boost_250us            => (Coarse_Gain_Enabled => True,
                                     Fine_Gain           => 10.5,
                                     Coarse_Gain         => 15.0),
          Boost_125us            => (Coarse_Gain_Enabled => True,
                                     Fine_Gain           => 10.5,
                                     Coarse_Gain         => 18.0)));
end Example;

An example of using manual tx power for the same channel is shown below:

with DW1000.Driver; use DW1000.Driver;

procedure Example is
begin
   DW1000.Driver.Configure_Tx_Power
     (Tx_Power_Config_Type'
         (Smart_Tx_Power_Enabled => False,
          Boost_SHR              => (Coarse_Gain_Enabled => True,
                                     Fine_Gain           => 10.5,
                                     Coarse_Gain         => 9.0),
          Boost_PHR              => (Coarse_Gain_Enabled => True,
                                     Fine_Gain           => 10.5,
                                     Coarse_Gain         => 9.0)));
end Example;

Note that the power boost for each option is expressed in dB. For example, the Boost_SHR transmit power boost is 10.5 dB + 9.0 dB = 19.5 dB gain. The coarse gain increments in steps of 3 dB ranging from 0.0 .. 18.0, and the fine gain increments in steps of 0.5 from 0.0 .. 15.5. For the best spectral shape, the coarse gain should be increased first.