Hardware reference
PHY and RF
On this page
The PHY and RF blocks occupy a 0x6_0000-byte window at 0x0ab8_0000. The vendor programs most of it with absolute address/value sequences whose meaning cannot be recovered from the image, so this page covers what is known: the tables the loader applies before the runtime starts, the calibration engine, and a few words shared with packet DMA.
Loader tables
The bootloader, not the runtime, initializes the PHY. Before jumping to the runtime it applies 41 ordered register writes and copies four tables into PHY memory. A downloader that skips them starts the runtime with an uninitialized PHY, and the result looks like MAC or calibration bugs.
| Destination | Length | Contents |
|---|---|---|
| Register writes | 41 pairs | Below, in order |
0x0ab8_1000 |
0x400 |
PHY table PHY_INIT_AB81000 |
0x0ab8_8400 |
0x330 |
PHY table PHY_INIT_AB88400 |
0x0ab8_8800 |
0x330 |
PHY table PHY_INIT_AB88800 |
0x0ab8_8c00 |
0x330 |
PHY table PHY_INIT_AB88C00 |
The tables are copied as little-endian words after the register writes. They are not the SDD file. They live in src/init_data.rs.
Register writes
In write order. The last two land in the interrupt routing window.
Show the 41 writes
| Write | Address | Value |
|---|---|---|
| 0 | 0x0ab8_0004 |
0x0000_0023 |
| 1 | 0x0ab8_0008 |
0x0000_003f |
| 2 | 0x0ab8_0014 |
0x0000_001c |
| 3 | 0x0ab8_0018 |
0x0000_002c |
| 4 | 0x0ab8_001c |
0x0000_0044 |
| 5 | 0x0ab8_0020 |
0x0000_0041 |
| 6 | 0x0ab8_0024 |
0x0000_003e |
| 7 | 0x0ab8_0064 |
0x0021_0140 |
| 8 | 0x0ab8_0070 |
0x0000_0006 |
| 9 | 0x0ab8_0074 |
0x0000_4040 |
| 10 | 0x0ab8_0080 |
0x0190_007e |
| 11 | 0x0ab8_0108 |
0x0020_0300 |
| 12 | 0x0ab8_010c |
0x0000_0009 |
| 13 | 0x0ab8_0110 |
0x0050_01c2 |
| 14 | 0x0ab8_0408 |
0x0000_0081 |
| 15 | 0x0ab8_040c |
0x0000_007f |
| 16 | 0x0ab8_0c48 |
0x0050_0850 |
| 17 | 0x0ab8_0c04 |
0x0000_000d |
| 18 | 0x0ab8_0c08 |
0x0010_00a0 |
| 19 | 0x0ab8_0c24 |
0x0007_fcef |
| 20 | 0x0ab8_0c1c |
0x0000_0004 |
| 21 | 0x0ab8_0c10 |
0x0000_0afb |
| 22 | 0x0ab8_0c3c |
0x0803_f7a0 |
| 23 | 0x0ab8_0c28 |
0x0000_0085 |
| 24 | 0x0ab8_0c30 |
0x0000_00fc |
| 25 | 0x0ab8_0000 |
0x001e_27ff |
| 26 | 0x0ab8_0044 |
0x0150_0040 |
| 27 | 0x0ab8_8014 |
0x0033_0003 |
| 28 | 0x0ab8_808c |
0x0000_103f |
| 29 | 0x0ab8_8090 |
0x1010_103f |
| 30 | 0x0ab8_0c54 |
0x0000_001f |
| 31 | 0x0ab9_0008 |
0xa290_9330 |
| 32 | 0x0aba_8040 |
0x0007_7bbd |
| 33 | 0x0aba_805c |
0x430c_261a |
| 34 | 0x0aba_8574 |
0x090a_0f0f |
| 35 | 0x0aba_8070 |
0x0000_0004 |
| 36 | 0x0aba_8074 |
0x3638_3939 |
| 37 | 0x0aba_8550 |
0x0003_6389 |
| 38 | 0x0aba_8558 |
0x1aa0_ffa2 |
| 39 | 0x0abb_0008 |
0x0000_026d |
| 40 | 0x0abb_0078 |
0x0048_0035 |
Calibration engine
A command/result unit inside the PHY window at 0x0abb_8000. The firmware selects a mode, writes the I and Q settings, triggers a measurement, waits for completion and reads two accumulators.
| Address | Register | Access | Description |
|---|---|---|---|
0x0abb_8004 | CAL_ENABLE | RW | Bits 0x0004_8000 set enable the calibration engine; cleared disable it |
0x0abb_805c | CAL_CONTEXT[0..2] | RW | Three words up to 0x0abb_8064, restored around band selection inferred |
0x0abb_80f0 | CAL_COMMAND | RW | Mode command 0x0100_4008 + mode; sample command 0x0800_000d. Bit 4 reads set when the measurement has completed. |
0x0abb_80f4 | CAL_TIMING | W | 0x0020_0078 for modes 2 and 3, 0x0020_0190 otherwise |
0x0abb_80f8 | CAL_TIMING_2 | W | 0x012c_00c8; function unknown |
0x0abb_810c | CAL_ACCUM_I | R | I accumulator, decoded as the measured coefficient |
0x0abb_8110 | CAL_ACCUM_Q | R | Q accumulator |
0x0abb_8114 | CAL_SAMPLE | W | Sample settings: I and Q |
0x0abb_81a4 | CAL_GAIN | RW | Calibration gain |
CAL_COMMAND
Read side; writes are commands.
| Bits | Field | Description |
|---|---|---|
| 4 | DONE |
Set when the measurement has completed. |
Source: CalibrationCommand · 4 bytes
CAL_SAMPLE
| Bits | Field | Description |
|---|---|---|
| 25 | BIT25 |
Always cleared with a new Q value. |
| 24 | BIT24 |
Always set with a new Q value. |
| 23:16 | Q |
Q setting. |
| 9 | BIT9 |
Always cleared with a new I value. |
| 8 | BIT8 |
Always set with a new I value. |
| 7:0 | I |
I setting. |
Source: CalibrationSample · 4 bytes
CAL_GAIN
Written 0 for a negative gain.
| Bits | Field | Description |
|---|---|---|
| 6 | ENABLE |
Set with a non-negative gain. |
| 5:0 | GAIN |
Gain value. |
Source: CalibrationGain · 4 bytes
Channel PLL
The radio is tuned by a fractional-N PLL. For channel c the carrier is 2407 + 5c MHz, or 2484 MHz for channel 14, and the divider is
ratio = f_kHz × 1250 / (f_ref_kHz × 1000)
integer = floor(ratio)
fraction = floor((ratio − integer) × 2^21)
PLL_VALUE = integer << 21 | fraction
The reference is 26 MHz unless the SDD file’s element 0xc5 gives another. The factor 1.25 comes from the vendor arithmetic; what it corresponds to in the synthesizer is not established. For channel 6, 2437 MHz: integer 117, fraction 0x5_3b13, PLL_VALUE = 0x0ea5_3b13.
To retune, follow these steps. Delays are in spin-delay units: one unit is 34 iterations of a busy loop, of unmeasured duration.
- Write
PLL_VALUE. - Clear
PLL_CONTROL.RESTART, delay 1, set it again, delay 120. - In the 2.4 GHz mode only: clear bit 6 of
RF_MODE_0084and bit 9 ofRF_BAND_0050, delay 10, set both again, delay 10.
The 120 µs settle in Retuning to a channel is separate: it follows calibration and gain programming.
| Address | Register | Access | Description |
|---|---|---|---|
0x0abc_0050 | RF_BAND_0050 | RW | Bit 9 cleared and set again after the PLL restarts; function unknown |
0x0abc_0084 | RF_MODE_0084 | RW | Bit 6 cleared and set again after the PLL restarts; function unknown |
0x0abc_00b4 | PLL_VALUE | W | Channel divider |
0x0abc_00b8 | PLL_CONTROL | RW | PLL restart |
PLL_VALUE
| Bits | Field | Description |
|---|---|---|
| 31:21 | INTEGER |
Integer part. |
| 20:0 | FRACTION |
Fractional part, in units of 2⁻²¹. |
Source: PllValue · 4 bytes
PLL_CONTROL
| Bits | Field | Description |
|---|---|---|
| 13 | RESTART |
Cleared and set again to restart the PLL with a new divider. |
Source: PllControl · 4 bytes
Words shared with packet DMA
| Address | Register | Access | Description |
|---|---|---|---|
0x0ab9_8040 | PHY_DMA_8040 | W | Cleared at packet-DMA start-up, before packet DMA is enabled; function unknown |
0x0ab8_0c50 | PHY_SIDEBAND | R | Read once for each MAC event that marks a received frame; the read may acknowledge the capture. The value is not used. inferred |