Skip to content
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

esp_wifi: Fix error message for rtc apb clk frequency (IDFGH-6509) #8162

Closed
wants to merge 1 commit into from

Conversation

AxelLin
Copy link
Contributor

@AxelLin AxelLin commented Dec 29, 2021

Calling rtc_clk_apb_freq_get() in ESP_LOGE may return different freq value
from the value used in condition checking.
Avoid below message which is confusing because 80MHz == 80000000Hz.
E (37138888) wifi_apb80m_request: WiFi needs 80MHz APB frequency to work, but got 80000000Hz

Signed-off-by: Axel Lin [email protected]

Calling rtc_clk_apb_freq_get() in ESP_LOGE may return different freq value
from the value used in condition checking.
Avoid below message which is confusing because 80MHz == 80000000Hz.
E (37138888) wifi_apb80m_request: WiFi needs 80MHz APB frequency to work, but got 80000000Hz

Signed-off-by: Axel Lin <[email protected]>
@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 29, 2021
@github-actions github-actions bot changed the title esp_wifi: Fix error message for rtc apb clk frequency esp_wifi: Fix error message for rtc apb clk frequency (IDFGH-6509) Dec 29, 2021
@esp-lis
Copy link
Collaborator

esp-lis commented Dec 29, 2021

This issue should only appear on the release/v4.3 version, and it is a dual-core system. If it is, please modify the $IDF_PATH/components/esp_pm/pm_impl.c as shown in the figure below for testing.
image

Please feedback the test results to me, I will decide to add this fix on release/v4.3, Thank you!

@AxelLin
Copy link
Contributor Author

AxelLin commented Dec 29, 2021

Hi @esp-lis

  1. With your fix, the error message no longer happen on v4.3. thanks.
    ps. I'd appreciate if you post a diff file rather than png file in the future support.
  2. I think this PR is still valid.

@esp-lis
Copy link
Collaborator

esp-lis commented Dec 29, 2021

Hi @esp-lis

  1. With your fix, the error message no longer happen on v4.3. thanks.
    ps. I'd appreciate if you post a diff file rather than png file in the future support.
  2. I think this PR is still valid.

In fact, the RF PHY has requirements for the system frequency. The design requires that after the wifi_apb80m_request is executed, the APB bus frequency must be 80 MHz, otherwise it will affect the RF.

@AxelLin
Copy link
Contributor Author

AxelLin commented Dec 29, 2021

In fact, the RF PHY has requirements for the system frequency. The design requires that after the wifi_apb80m_request is executed, the APB bus frequency must be 80 MHz, otherwise it will affect the RF.

But that is nothing to do with this PR.
The point of this PR is to avoid calling rtc_clk_apb_freq_get() twice which
may cause confusing message.

@AxelLin
Copy link
Contributor Author

AxelLin commented Jan 17, 2022

Hi @esp-lis

  1. With your fix, the error message no longer happen on v4.3. thanks.

@esp-lis I hope the fix will be included in v4.3.3 release.

@AxelLin AxelLin closed this Mar 4, 2022
@espressif-bot espressif-bot added Status: In Progress Work is in progress Resolution: Done Issue is done internally Status: Done Issue is done internally and removed Status: Opened Issue is new Status: In Progress Work is in progress labels Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants