mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(phy): fix phy retention phy i2c reg config on esp32-c5
This commit is contained in:
@@ -103,8 +103,10 @@ static esp_err_t sleep_phy_retention_init(void *arg)
|
|||||||
memcpy(phy_modem_config, phy_modem_config_template, sizeof(phy_modem_config_template));
|
memcpy(phy_modem_config, phy_modem_config_template, sizeof(phy_modem_config_template));
|
||||||
|
|
||||||
extern uint32_t phy_ana_i2c_master_burst_rf_onoff(bool on);
|
extern uint32_t phy_ana_i2c_master_burst_rf_onoff(bool on);
|
||||||
phy_modem_config[4].config.write_wait.value = phy_ana_i2c_master_burst_rf_onoff(true);
|
phy_modem_config[5].config.write_wait.value = phy_ana_i2c_master_burst_rf_onoff(true);
|
||||||
phy_modem_config[15].config.write_wait.value = phy_ana_i2c_master_burst_rf_onoff(false);
|
assert(phy_modem_config[5].config.write_wait.backup == (void *)I2C_ANA_MST_I2C_BURST_CONF_REG);
|
||||||
|
phy_modem_config[17].config.write_wait.value = phy_ana_i2c_master_burst_rf_onoff(false);
|
||||||
|
assert(phy_modem_config[17].config.write_wait.backup == (void *)I2C_ANA_MST_I2C_BURST_CONF_REG);
|
||||||
esp_err_t err = sleep_retention_entries_create(phy_modem_config, ARRAY_SIZE(phy_modem_config_template), 7, SLEEP_RETENTION_MODULE_MODEM_PHY);
|
esp_err_t err = sleep_retention_entries_create(phy_modem_config, ARRAY_SIZE(phy_modem_config_template), 7, SLEEP_RETENTION_MODULE_MODEM_PHY);
|
||||||
free(phy_modem_config);
|
free(phy_modem_config);
|
||||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate modem phy link");
|
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate modem phy link");
|
||||||
|
|||||||
@@ -116,7 +116,9 @@ esp_err_t sleep_phy_link_init(void **link_context)
|
|||||||
|
|
||||||
extern uint32_t phy_ana_i2c_master_burst_rf_onoff(bool on);
|
extern uint32_t phy_ana_i2c_master_burst_rf_onoff(bool on);
|
||||||
phy_modem_config[8].write_wait.value = phy_ana_i2c_master_burst_rf_onoff(true);
|
phy_modem_config[8].write_wait.value = phy_ana_i2c_master_burst_rf_onoff(true);
|
||||||
|
assert(phy_modem_config[8].write_wait.backup == (void *)I2C_ANA_MST_I2C_BURST_CONF_REG);
|
||||||
phy_modem_config[24].write_wait.value = phy_ana_i2c_master_burst_rf_onoff(false);
|
phy_modem_config[24].write_wait.value = phy_ana_i2c_master_burst_rf_onoff(false);
|
||||||
|
assert(phy_modem_config[24].write_wait.backup == (void *)I2C_ANA_MST_I2C_BURST_CONF_REG);
|
||||||
|
|
||||||
void *link = NULL;
|
void *link = NULL;
|
||||||
for (int i = ARRAY_SIZE(phy_modem_config_template) - 1; (err == ESP_OK) && (i >= 0); i--) {
|
for (int i = ARRAY_SIZE(phy_modem_config_template) - 1; (err == ESP_OK) && (i >= 0); i--) {
|
||||||
|
|||||||
@@ -111,7 +111,9 @@ esp_err_t sleep_phy_link_init(void **link_context)
|
|||||||
|
|
||||||
extern uint32_t phy_ana_i2c_master_burst_rf_onoff(bool on);
|
extern uint32_t phy_ana_i2c_master_burst_rf_onoff(bool on);
|
||||||
phy_modem_config[5].write_wait.value = phy_ana_i2c_master_burst_rf_onoff(true);
|
phy_modem_config[5].write_wait.value = phy_ana_i2c_master_burst_rf_onoff(true);
|
||||||
|
assert(phy_modem_config[5].write_wait.backup == (void *)I2C_ANA_MST_I2C_BURST_CONF_REG);
|
||||||
phy_modem_config[21].write_wait.value = phy_ana_i2c_master_burst_rf_onoff(false);
|
phy_modem_config[21].write_wait.value = phy_ana_i2c_master_burst_rf_onoff(false);
|
||||||
|
assert(phy_modem_config[21].write_wait.backup == (void *)I2C_ANA_MST_I2C_BURST_CONF_REG);
|
||||||
|
|
||||||
void *link = NULL;
|
void *link = NULL;
|
||||||
for (int i = ARRAY_SIZE(phy_modem_config_template) - 1; (err == ESP_OK) && (i >= 0); i--) {
|
for (int i = ARRAY_SIZE(phy_modem_config_template) - 1; (err == ESP_OK) && (i >= 0); i--) {
|
||||||
|
|||||||
Reference in New Issue
Block a user