RAIL provides two self calibrations: Temperature (TEMP or TEMP_VCO) and Image rejection (ONETIME or ONETIME_IRCAL)
The calibration needs to be taken place when the temperature crosses 0 degC, or when it increases by more than ~70 degC relative to the temperature of the last calibration, while sitting in receive state. It automatically runs every time it enters receive, so if you are frequently forcing a re-enter into receive mode you may not need to enable calibration.
Basically, you don't need this calibration, unless you use the chip in RX mode for a long time.
It means once per chip, and once per PHY config. You can do it during the manufacturing process, and you don't need to do it ever again (if you store it in non-volatile memory). If your product uses multiple configurations, you just store multiple calibration consts.
Unfortunately not, it only works on sub-GHz configs. On 2.4GHz RAIL_CalStart will load a factory calibrated value from the device information (DI) page of the chip, which is an OK value for 2.4G, but the actual calibration on the sub-GHz band is much better. Two values are stored, one for OQPSK modulation, and one for everything else. So, you don't have to do the "calibration" if you change between two FSK based 2.4GHz configuration.
If you call RAIL_ChannelConfig, RAIL will call the RAILCb_CalNeeded callback. If you didn't implement this callback, it will ask for a calibration with RAIL_CalStart, but it will not store the results.
You should, in two cases:
-Chip initialization time is important: Otherwise, RAIL will calibrate itself on each bootup
-You use multiple PHYs: Each time you change the PHY, you trigger a calibration, which extends the time of the PHY change (the exception is 2.4GHz, where you would only load the factory stored value again)
Yes: Every PHY configuration comes with an irCalConfig array. It should be uploaded with RAIL_CalInit. If you have multiple PHY-s you should upload the irCalConfig array each time you change the PHY, if you want to actually calibrate, not just loading stored values.
If you call RAIL_CalStart, it works differently, depending on the first argument
So, you should do something like this to store the const:
RAIL_CalValues_t calValues = RAIL_CAL_INVALID_VALUE; RAIL_CalStart(&calValues, RAIL_CAL_ALL_PENDING, true); <store calibration values>
To restore it:
RAIL_CalValues_t calValues = <get calibration values>; RAIL_CalStart(&calValues, RAIL_CAL_ALL_PENDING, false);
And you probably want to do this from the RAILCb_CalNeeded callback.