Hardware reference
Receive DMA
On this page
Receive packet DMA is the only writer of received frames. It appends each frame to the RX FIFO in packet RAM, with a 0x20-byte header in front and a receive-status trailer after it, and advances a producer offset. The firmware reads frames up to the producer and advances the consumer as it frees their slots. A slot whose frame is still on its way to the host cannot be reused.
Registers
The block sits inside the MAC window, at +0x0600. Two slot-timing words, SLOT_TIMING_614 and SLOT_TIMING_618, fall inside its range but are not part of this layout; see MAC.
| Offset | Address | Register | Type | Description |
|---|---|---|---|---|
+0x00 |
0x09c0_0600 |
CONTROL |
u32 RW | Enable and activity. |
+0x04 |
0x09c0_0604 |
PRODUCER |
u32 RW | FIFO offset just past the newest frame written. |
+0x08 |
0x09c0_0608 |
CONSUMER |
u32 RW | FIFO offset up to which the firmware has released frames. |
+0x0c |
0x09c0_060c |
CONFIGURATION_0C |
u32 WO | Written 0x80, before CONTROL. |
+0x1c |
0x09c0_061c |
CONFIGURATION_1C |
u32 WO | Written 7. |
+0x20 |
0x09c0_0620 |
CONFIGURATION_20 |
u32 WO | Written 0x3000_0000. |
Source: RxDma · 36 bytes
CONTROL
Startup writes 0x0102_0418, which leaves ENABLE clear; the receive path sets it later. To stop the engine, clear ENABLE and poll ACTIVE with a timeout. The other startup bits are not described.
| Bits | Field | Description |
|---|---|---|
| 23 | ACTIVE |
Still moving a frame; clears after ENABLE is dropped. |
| 0 | ENABLE |
Packet DMA writes received frames into the RX FIFO. |
Source: RxDmaControl · 4 bytes
FIFO slots
Every slot starts with a 0x20-byte header. The frame follows it directly and is padded to a word boundary; the receive trailer follows the padding.
| Offset | Size | Register | Type | Description |
|---|---|---|---|---|
+0x00 |
4 B | MAGIC |
u32 RW | 0x00aa_55ff in a valid slot. The firmware writes it at the producer when it repairs a damaged tail slot, and clears it when it releases the slot. |
+0x04 |
4 B | NEXT |
u32 RW | Offset of the next slot, written by the firmware when it claims this one. |
+0x08 |
4 B | STATE |
u32 RW | On release the firmware writes 0xcccc_cc00, keeping the low byte. |
+0x14 |
4 B | RX_TSF |
u32 RO | Low word of the TSF at the start of the frame. |
+0x18 |
2 B | LENGTH |
u16 RO | Frame length in octets, including the FCS. |
Source: SlotHeader · 32 bytes · offsets are relative to the structure
| Offset | Contents |
|---|---|
0x00 |
Slot header, above |
0x20 |
The 802.11 frame, LENGTH octets including the FCS |
0x20 + align4(LENGTH) |
Receive trailer: rate index at +0x06, RCPI at +0x07 |
RX_TSF was measured on beacons: it holds the TSF at the start of the frame, so a beacon’s own timestamp is later by its airtime.
Offsets and wrap-around
FIFO offsets are logical and wrap below 0x7000. The storage is 0x8000 bytes: the extra 0x1000 let a slot that starts near the top of the ring continue linearly instead of wrapping. The CPU address of a slot is 0x0940_0000 + (offset % 0x7000).
Data beyond the producer is arbitrary. Receiving a frame says how the firmware decides that a slot is valid and recovers from one that is not.
Size limits
| Limit | Bytes |
|---|---|
| WSM message | 0x1ffe (8190) |
| Frame, after 16 bytes of host headroom | 8174 |
| Slot length field, including the FCS | 8178 |
A slot must also fit in the bytes available and in the physical storage.
Receiving a frame follows a frame from the FIFO to the host.