BBPLL Calibration never finishes in second stage bootloader in RTC Configuration
Posted: Mon Jan 15, 2024 6:36 pm
We are experiencing issues with our ESP32-S3-WROOM-1 modules, they are hanging in the bootloader and then resetting, then repeat. The ESP32-S3 modules are blocking in the second stage bootloader and being continuously reset by TG0WDT.
We have narrowed the issue down to the rtc_clk_bbpll_configure() function that is being called but never returns. The problem is the line while(!regi2c_ctrl_ll_bbpll_calibration_is_done()); which waits for the bbpll to be calibrated, but is blocking indefinitely.
At first we thought it may have been a faulty ESP32-S3 because when we heated the chip up to ~30C or higher, the ESP32-S3 chip would boot up properly but once we let it cool down, it would go into a bootloop again. This was making us think it was some sort of race condition that the heat was helping slow down just enough to help it work.
We found that the espressif team had made some changes 2 weeks ago (Jan 3, 2024) that pertained to this specific issue (we believe), so we tried pulling those changes, and still have the same error. We tried turning off the 'new' BBPLL Recalibrate setting (CONFIG_ESP_SYSTEM_BBPLL_RECALIB is not set) which was added in the last software version and still not working properly for us.
We manually made a counter inside of rtc_clk_bbpll_configure() function that will force it to pop out of the function. This seems to fix our issue but the question we have is, what are we losing when/if the bbpll is not calibrated or working properly?
Other questions:
1. Why does heat change the outcome of functioning properly?
2. Are we setting configuration settings incorrectly somehow? If so, how would we be able to tell?
We have narrowed the issue down to the rtc_clk_bbpll_configure() function that is being called but never returns. The problem is the line while(!regi2c_ctrl_ll_bbpll_calibration_is_done()); which waits for the bbpll to be calibrated, but is blocking indefinitely.
At first we thought it may have been a faulty ESP32-S3 because when we heated the chip up to ~30C or higher, the ESP32-S3 chip would boot up properly but once we let it cool down, it would go into a bootloop again. This was making us think it was some sort of race condition that the heat was helping slow down just enough to help it work.
We found that the espressif team had made some changes 2 weeks ago (Jan 3, 2024) that pertained to this specific issue (we believe), so we tried pulling those changes, and still have the same error. We tried turning off the 'new' BBPLL Recalibrate setting (CONFIG_ESP_SYSTEM_BBPLL_RECALIB is not set) which was added in the last software version and still not working properly for us.
We manually made a counter inside of rtc_clk_bbpll_configure() function that will force it to pop out of the function. This seems to fix our issue but the question we have is, what are we losing when/if the bbpll is not calibrated or working properly?
Other questions:
1. Why does heat change the outcome of functioning properly?
2. Are we setting configuration settings incorrectly somehow? If so, how would we be able to tell?