(The following post applies for all AX50xx-based devices including AX8052F143, AXM0F343 and the radio AX5043, AX5243, AX5045).
AX-RadioLab allows quick RF testing of boards by means of the Basic&Regulatory Tests (that generate the TEST example code):
By inspecting the TEST project file and the easyax5043.c radio-driver code is possible to see what registers are being programmed in order to generate the different test modes shown in the Figure above.
Carrier Wave (CW) transmission should be the first test to run on a newly assembled PCB to test its RF performance.
The TX CW is obtained in the radio by resetting the modulation and constantly filling the FIFO with bits using wire-mode. More in details, the following steps are done in the easyax5043.c driver code:
- Initialize the Radio with radio_init().
- Set modulation to FSK with 0 Hz deviation and 1bps data rate → The radio will TX a carrier wave.
- Set DATA pin to DATA Input/Output Modem Data → the FIFO will be filled with the bitstream coming from DATA pin.
Here the main lines of code coming from the function axradio_set_mode(AXRADIO_MODE_CW_TRANSMIT):
/*Assuming a fully initialized radio and autoranged PLL (with radio_init()).*/ ax5043_init_registers_tx(); // radio_write8(AX5043_REG_MODULATION, 8); // Set an FSK mode radio_write8(AX5043_REG_FSKDEV2, 0x00); //Set Deviation to 0 Hz radio_write8(AX5043_REG_FSKDEV1, 0x00); radio_write8(AX5043_REG_FSKDEV0, 0x00); radio_write8(AX5043_REG_TXRATE2, 0x00); //Set data-rate to almost 0. radio_write8(AX5043_REG_TXRATE1, 0x00); radio_write8(AX5043_REG_TXRATE0, 0x01); radio_write8(AX5043_REG_PINFUNCDATA, 0x84); // DATA pin pulled up, filling FIFO with 1s. radio_write8(AX5043_REG_PWRMODE, AX5043_PWRSTATE_FULL_TX); //start TX // AX5043 will transmit CW without MCU activity, MCU can be put into standby or sleep mode.
And a flow chart: