mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-02 10:00:57 +02:00
Merge branch 'fix/rng_entropy_mixing_with_rtc_timer_v5.1' into 'release/v5.1'
fix(esp_hw_support): Fixed entropy mixing of RTC timer with RNG (v5.1) See merge request espressif/esp-idf!41828
This commit is contained in:
@@ -66,7 +66,7 @@ uint32_t IRAM_ATTR esp_random(void)
|
||||
result ^= REG_READ(WDEV_RND_REG);
|
||||
} while (ccount - last_ccount < cpu_to_apb_freq_ratio * APB_CYCLE_WAIT_NUM);
|
||||
uint32_t current_rtc_timer_counter = (lp_timer_hal_get_cycle_count() & 0xFF);
|
||||
result ^= ((result ^ current_rtc_timer_counter) & 0xFF) << (i * 8);
|
||||
result ^= (current_rtc_timer_counter << (i * 8));
|
||||
}
|
||||
#else
|
||||
do {
|
||||
|
Reference in New Issue
Block a user