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

[TW#19295] Trash on console when Power Management enabled #1729

Closed
loboris opened this issue Mar 15, 2018 · 2 comments
Closed

[TW#19295] Trash on console when Power Management enabled #1729

loboris opened this issue Mar 15, 2018 · 2 comments

Comments

@loboris
Copy link

loboris commented Mar 15, 2018

When Support for power management is enabled in menuconfig and Enable dynamic frequency scaling (DFS) at startup is NOT enabled, soon after application start the UART output becomes garbled (corrupt).
If Enable dynamic frequency scaling (DFS) at startup is enabled, this does not happen.

This only happens if → Component config → ESP32-specific → CPU frequency is set to 240 MHz.

Possible workaround is to set the the CPU frequency to 160 MHz at the application start, then set it back to 250 MHz:

#if defined(CONFIG_PM_ENABLE) && !defined(CONFIG_PM_DFS_INIT_AUTO) && defined(CONFIG_ESP32_DEFAULT_CPU_FREQ_240)
esp_pm_config_esp32_t pm_config;
pm_config.max_cpu_freq = RTC_CPU_FREQ_160M;
pm_config.min_cpu_freq = RTC_CPU_FREQ_80M; // or RTC_CPU_FREQ_XTAL
pm_config.light_sleep_enable = false;
esp_pm_configure(&pm_config);
vTaskDelay(2);
pm_config.max_cpu_freq = RTC_CPU_FREQ_240M;
esp_pm_configure(&pm_config);
#endif
@igrr igrr added the Status: In Progress Work is in progress label Mar 16, 2018
@loboris
Copy link
Author

loboris commented Mar 18, 2018

Even with this workaround, after changing the max CPU frequency to 160 or 80 MHz, the console output (readable befor the frequency change) becomes unreadable, as if the boudrate changed.
Printing with printf works before freq change, not after.
Is REF_TICK used as clock source for the console uart ?

@FayeY FayeY changed the title Trash on console when Power Management enabled [TW#19295] Trash on console when Power Management enabled Mar 19, 2018
@igrr
Copy link
Member

igrr commented Mar 20, 2018

Thanks for the report @loboris, the fix for this will be in master branch shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants