Skip to content

Support user_rf_pre_init() for SDK v3.0 #8888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 30, 2023

Conversation

mhightower83
Copy link
Contributor

@mhightower83 mhightower83 commented Mar 13, 2023

For SDK v3.0+, early system calls that were called from user_rf_pre_init (SDK v2.2) need to be called from user_pre_init.

Moved call to user_rf_pre_init(), from user_init() to the end of user_pre_init(), so we can still perform early calls like system_phy_set_rfoption(rf_mode), system_phy_set_powerup_option(2), etc.

The hint for where to place user_rf_pre_init() came from ESP-FAQ : 2.2.4 How to modify the default method of RF calibration in ESP8266? (Side note, I think the FAQ has a typo. When they refer to byte 115, I think they meant 114.)
The specific sentence of interest: "Call system_phy_set_powerup_option(3) in function user_pre_init or user_rf_pre_init"

Edited for clarity

@mhightower83 mhightower83 marked this pull request as ready for review March 13, 2023 18:33
@d-a-v d-a-v added the alpha included in alpha release label Mar 20, 2023
(SDK v2.2) need to now be called from user_pre_init.

Moved user_rf_pre_init() call to the end of user_pre_init() so we
can still perform early calls like: system_phy_set_rfoption(rf_mode),
system_phy_set_powerup_option(2), etc.
Out of an overabundance of caution, limit logic change to the
experimental SDK v3.0.5.
@mhightower83 mhightower83 force-pushed the pr-fix-v305-user_rf_pre_init branch from 7a9c23c to 9cb0e9b Compare March 28, 2023 03:14
@d-a-v d-a-v merged commit a76ef29 into esp8266:master Mar 30, 2023
@mhightower83 mhightower83 deleted the pr-fix-v305-user_rf_pre_init branch March 30, 2023 18:21
hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request Nov 18, 2024
* For SDK v3.0+, early system calls that were called from user_rf_pre_init
(SDK v2.2) need to now be called from user_pre_init.

Moved user_rf_pre_init() call to the end of user_pre_init() so we
can still perform early calls like: system_phy_set_rfoption(rf_mode),
system_phy_set_powerup_option(2), etc.

* Update comment

* Improve "spoof_init_data" enable/disable logic.
Out of an overabundance of caution, limit logic change to the
experimental SDK v3.0.5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha included in alpha release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants