Front-End Control: Auto and Manual PA/LNA Configuration for DW1000 UWB Radios

2026-11-25/ By Admin

A DW1000 can drive an external PA, LNA, and RF switch over three GPIO signals—or hand that timing back to the host
A DW1000 can drive an external PA, LNA, and RF switch over three GPIO signals—or hand that timing back to the host

Why does adding a PA and an LNA to a DW1000 design so often turn into a debugging project? The parts are simple; the timing is not. A PA cannot be switched on after the RF has already started, and an LNA cannot stay connected while the PA is transmitting. Between those two facts sits a window of microseconds that someone has to own.

The DW1000 offers three signals for that job: EXTPA, EXTTXE, and EXTRXE. They share GPIO4, GPIO5, and GPIO6, and can either be driven by the chip’s internal transmit/receive state machine or returned to plain GPIO for the host to toggle. The first is automatic control; the second is manual control.

Both modes control the same external front end; the difference is who owns the timing. This article explains what each signal does, how both modes are configured, where the timing risk lives, and how to choose between them.

01 The difference is not the PA—it is who owns the timing

One clarification first: the DW1000’s normal transmit and receive chain is already on-chip. The PA and LNA discussed here are external extensions added for more output power or a better noise figure. Automatic control does not mean the chip contains a high-power PA; it means the chip sequences the external front end close to the RF event.

A typical front end reduces to two paths: on transmit, DW1000 → PA → RF switch → antenna; on receive, antenna → RF switch → LNA → DW1000. The PA raises output power, the LNA pulls weak returns out of the noise, and the switch selects the path.

Automatic mode switches GPIO4/5/6 to their special functions so EXTPA, EXTTXE, and EXTRXE follow the TX/RX state. Manual mode returns them to plain GPIO and lets the host write GPIO_DOUT. A third option hands the PA/LNA to an external MCU and uses the DW1000 only for “TX is starting” or “RX is done” events. It is the most flexible and the easiest way to put the radio’s timing at the mercy of software latency.

02 Three signals, three jobs

EXTPA enables the PA. It goes high before TX and stays high through TX, giving the PA bias and the RF switch time to settle. Turn the PA on after the RF has started and the preamble is chopped, producing a fixed range bias.

EXTTXE enables the transmit path. By default it is affected by fine-grain TX power sequencing, so it pulses with the power-up phases instead of staying high. For a PA, that means the bias is switched repeatedly: at best the spectrum suffers; at worst the preamble is fragmented.

EXTRXE enables the receive path and LNA. It is high during RX and must be off during TX. If the RX path is connected while the PA is still working, PA output drives the LNA—at best the receiver is blocked, at worst the LNA is damaged.

The three signals are not three ordinary GPIOs; they are three RF events with an order. Giving that order to the chip is more repeatable than chasing every edge from an interrupt.

03 Automatic control: let the chip own the timing

Automatic setup takes two steps, and the order matters. First, disable fine-grain TX power sequencing: call dwt_setfinegraintxseq(0), which writes 0 to TXFINESEQ at 0x36:26. The user manual requires this when an external PA is used; otherwise EXTTXE keeps pulsing.

Second, enable automatic front-end control: call dwt_setlnapamode(1, 1). The function clears MSGP4/5/6 first, then sets GPIO4 to EXTPA, GPIO5 to EXTTXE, and GPIO6 to EXTRXE. For LNA only, pass (1, 0); for PA only, pass (0, 1).

After configuration, read back two values: the relevant bits of GPIO_MODE should be 0x00054000 (compare with 0x000FC000), and PMSC_TXFSEQ should be 0x0000. These two checks catch most “the mode never switched” mistakes.

The advantage is that the hardest timing is no longer in the host. EXTPA establishes before TX, EXTTXE and EXTRXE follow the state, and the CPU is almost idle. But automatic mode only handles enable and path selection. It does not guarantee that the PA settles quickly enough, that the switch breaks before make, that the LNA needs no bypass, or that the control polarity matches the front end.

Nor is there a public “EXTPA lead time” knob. You cannot tune the internal lead from a register; you can choose a faster PA, add an enable pre-bias, or move the timing into external logic. One bench measurement on a TTK1000 reported EXTPA leading EXTTXE by only about 8 ns. That is a board-level observation, not a data-sheet guarantee. If your PA needs hundreds of nanoseconds to settle, 8 ns is not enough.

So automatic mode fits the standard front end and the high-rate radio, but it still needs a scope: confirm the PA is up before RF, off after TX, and really absent during RX.

04 Manual control: take the timing back

Manual control starts by returning the three pins to plain GPIO: clear MSGP4/5/6 to 00. Next, set GPIO4/5/6 as outputs: in GPIO_DIR, set GDM4/5/6 and clear GDP4/5/6. Then write GPIO_DOUT to choose the initial state, usually RX path on and PA off.

One easy mistake: GxP4/GxP5/GxP6 are not 1<<4/5/6. GPIO4–7 data bits sit in bits 8–11; GPIO4 data is 0x0100 and its mask is 0x1000. Use the driver macros, or write the bit definitions down, or you will eventually configure the wrong pin.

The hard part is not the register; it is the state machine. A safe order is RX → PA on → wait t_lead → TXE on, RXE off → transmit → TXE off → wait t_break → PA off, RXE on. Do not reverse it: if the PA is still on when RX is selected, PA output drives the LNA; if TXE and RXE are high together, the switch state is undefined. Break-before-make is mandatory.

t_lead and t_break come from the PA enable settling time, the switch t_on/t_off, and the RF envelope on a scope. Temperature, supply, and lot change all three. Leave margin in the prototype and keep test points in production.

The real cost of manual mode is latency and jitter. A host write to GPIO_DOUT takes an SPI transaction—microseconds at best, tens of microseconds at worst. An external MCU adds interrupt latency and RTOS scheduling. For high-rate TWR, that is enough to miss the preamble. Manual mode fits non-standard timing, active-low control, single-wire control, slow links, or hardware bring-up—not per-packet PA toggling.

05 Choosing between them

The choice reduces to three rules.

Standard front end, TWR/TDOA, high packet rate: use automatic. Let the DW1000 sequence EXTPA/EXTTXE/EXTRXE; the host only initializes, reads back, and handles faults.

Non-standard timing or polarity, slow duty cycle, forced states: use manual. Examples are a PA that needs longer lead/hold, an active-low switch, or a single control line.

Need both automatic determinism and custom logic: combine in external logic. For example, let EXTPA run automatically and control the TX/RX switch from a CPLD or gate. That requires writing GPIO_MODE directly: MSGP4=01 and MSGP5/6=00. Do not call dwt_setlnapamode(1,1), which claims all three pins.

A final engineering judgment: if the automatic EXTPA lead is too short, choose a faster PA or add an enable pre-bias before moving to software manual. Manual mode turns an analog timing problem into a firmware real-time problem; the second is usually harder to measure and harder to guarantee.

06 A configuration and verification checklist

Before power-up. Confirm the enable polarity and voltage of the PA, LNA, and switch. DW1000 GPIO is a 3.3 V domain; add level shifting or inversion if needed. Check the switch truth table: PA connected and LNA disconnected in TX; the reverse in RX. Decouple the PA supply, keep the burst-current loop short, and protect the LNA input.

Automatic setup. dwt_initialise, dwt_configure, dwt_setfinegraintxseq(0), dwt_setlnapamode(1, 1). Read back GPIO_MODE = 0x00054000 (masked) and PMSC_TXFSEQ = 0x0000.

Manual setup. Make sure the PA is off and the radio is idle; clear MSGP4/5/6; set GDM4/5/6=1 and GDP4/5/6=0 in GPIO_DIR; write the initial GPIO_DOUT; then run the TX/RX state machine.

Scope check. Capture EXTPA, EXTTXE, EXTRXE, and the RF envelope together. Confirm the PA settles before RF and turns off after TX; EXTTXE is continuously high with fine-grain off; EXTRXE stays high through RX; the TX→RX transition breaks before make.

Common failures. No output or short range: check PA enable, polarity, and fine-grain. EXTTXE still pulses: check whether 0x36:26 is overwritten later. RX sensitivity degraded: check whether the PA is still on during RX. Preamble chopped: check EXTPA lead and PA settling. Intermittent loss: check manual switching jitter. PA current spike: check make-before-break and current limiting.

The boundary: automatic control is a timing convenience, not a fix for a bad front end. A slow PA, a slow switch, or an LNA that is easily blocked will not disappear when you change control mode. Automatic gives you more deterministic, lower-CPU timing; manual gives you more room to adjust. Pick the right one, then make the schematic, initialization, and scope verification solid, and the PA/LNA will stop being a black box that “looks configured but does not work.”

Technical reference: SKYLAB DW1000 User Manual v2.17, sections 6.2, 7.2.39, and 7.2.50.6.

icon_up
close_white