6. Patching the Radio
A Radio patch is a piece of software provided by Silicon Labs to change the operation of the radio chip. The patch runs on the internal
MCU of the radio chip and fixes bugs or adds/improves features of the firmware in the internal ROM. It is distributed in binary form and
has to be loaded in the RAM of the radio chip by the host MCU through the SPI interface. Since the RAM is volatile memory, the infor-
mation stored in it gets lost when the power of the chip is removed. Consequently, the content of the firmware patch has to be downloa-
ded into the radio chip each time after performing a power on reset.
6.1 Patch Usage
To apply a patch, the patch content has to be sent to the radio chip after POR but before issuing the POWER_UP command.
In the software demos the patch file is located at <radio>_patch.h. Following several lines of comments that identify the patch, it con-
tains the patch data lines, eight bytes in a line. Each line has to be sent to the chip as an eight byte long command. A CTS reply has to
be read from the chip after each line.
After all lines are sent, the POWER_UP command has to be issued with the PATCH bit of the BOOT_OPTIONS argument set to 1.
Table 6.1. PATCH bit in POWER_UP
POWER_UP
command
7 6 5 4 3 2 1 0
CMD 0x02
BOOT_OP-
TIONS
PATCH 0 FUNC[5:0]
XTAL_OP-
TIONS
0000000 TXCO
X0_FREQ X0_FREQ[31:24]
X0_FREQ X0_FREQ[23:16]
X0_FREQ X0_FREQ[15:8]
X0_FREQ X0_FREQ[7:0]
6.2 Patching Support
If a patch is necessary for a selected radio chip version, WDS will apply it automatically without any user interaction.
When deploying an example project from WDS, it includes the necessary patch commands (Si446X_PATCH_CMDS) in the RA-
DIO_CONFIGURATION_DATA_ARRAY automatically according to the selected chip version. The patch commands themselves are
defined in the <radio>_patch.h file that is also included in the project automatically. This way the patch will be applied as part of the
radio initialization process.
AN954: Programming Guide for EFM8 and EZRadio ®
Patching the Radio
silabs.com | Smart. Connected. Energy-friendly. Rev. 0.1 | 32