mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
phy_init: don’t rewrite valid calibration data
In the default PHY init routine, calibration data is loaded from NVS. Most of the time the incremental changes to calibration will be fairly small, so we don’t need to rewrite the existing calibration data stored in the NVS. Possible enhancement to be done in the future: expose a function in PHY library to tell how big was the change in calibration data. If the change was significant, then calibration data stored in NVS should be updated.
This commit is contained in:
parent
c78aa138b0
commit
777816cb99
@ -294,7 +294,7 @@ static void do_phy_init()
|
|||||||
|
|
||||||
esp_phy_init(init_data, calibration_mode, cal_data);
|
esp_phy_init(init_data, calibration_mode, cal_data);
|
||||||
|
|
||||||
if (calibration_mode != PHY_RF_CAL_NONE) {
|
if (calibration_mode != PHY_RF_CAL_NONE && err != ESP_OK) {
|
||||||
err = esp_phy_store_cal_data_to_nvs(cal_data);
|
err = esp_phy_store_cal_data_to_nvs(cal_data);
|
||||||
} else {
|
} else {
|
||||||
err = ESP_OK;
|
err = ESP_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user