Skip to content

RADIO_BANK_APPLIED does not contain correct register values after transmit #1799

Description

@antoinevg

Following a hackrf_transfer -c 127 -s 5e6 -f 500e6:

We get the following register values:

% hackrf_debug --radio --bank 0 --read
...
bank 0 register [ 1] -> 0x001dcd6500000000 # RADIO_FREQUENCY_RF (500000000)
bank 0 register [ 2] -> 0x008ddbeb00000000 # RADIO_FREQUENCY_IF (2380000000)
bank 0 register [ 3] -> 0x00ac41e680000000 # RADIO_FREQUENCY_LO (2890000000)
bank 0 register [ 4] -> 0x0000000000000001 # RADIO_IMAGE_REJECT
bank 0 register [ 5] -> 0x00000000c0000000 # RADIO_ROTATION
...

The expected values are:

bank 0 register [ 2] -> 0x008d8f9fc0000000 # RADIO_FREQUENCY_IF (2375000000)
bank 0 register [ 3] -> 0x00ab5d04c0000000 # RADIO_FREQUENCY_LO (2875000000)
bank 0 register [ 5] -> 0x0000000000000000 # RADIO_ROTATION (0 because we're in TX mode!)

The reason for this is that we're re-configuring the radio for RX mode when we are entering idle with the result that we are applying a rotation and 10MHz frequency offset to the tuning setup.

The initial rationale was that this would make it faster to switch modes between RX/TX operations but, in practice, this use-case occurs less frequently than the case where we'd like to examine the active radio settings after the most recent operation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions