Commit Graph

9 Commits

Author SHA1 Message Date
KonstantinKondrashov
be904e4ae9 esp_hw_support: Fix time jump after reboot
Closes https://github.com/espressif/esp-idf/issues/9448
2022-11-02 18:54:37 +08:00
Darian Leung
baa28b54a2 esp_hw_support: Fix esp_light_sleep_start() deadlock
esp_light_sleep_start() will stall the other CPU via esp_ipc_isr_stall_other_cpu(). After stalling the other CPU,
will call esp_clk_... API which themselves take locks. If the other stalled CPU is holding those locks, this will
result in a deadlock.

This commit adds a workaround calling esp_clk_private_lock() to take the lock before stalling the other CPU.
2022-09-16 17:02:38 +08:00
Darian Leung
9ea9192efb esp_hw_support: esp_clk should use spinlock instead of mutex
esp_clk used to be protected using _lock_t (i.e., a FreeRTOS Mutex). However, esp_clk API is current called from
from critical sections, thus mutex should not be used (as they can be blocking).

This commit updates esp_clk to use spinlocks for critical sections instead.

Note: Added a small fix to exclude esp_clk.c from bootloader builds in the
      legacy build system (this is already the case in CMake).
2022-09-16 17:02:38 +08:00
Jan Brudný
83bd078eb4 esp_hw_support: update copyright notice 2021-08-05 17:38:43 +02:00
Shu Chen
5e3689ae0f esp32h2: update esp_system and esp_hw_support to support esp32h2 2021-07-01 19:53:11 +08:00
Angus Gratton
ad7ad185e3 Merge branch 'bugfix/c3_s3_apb_freq' into 'master'
esp_hw_support: Fix ESP32-C3/S3 APB frequency

See merge request espressif/esp-idf!13296
2021-06-09 23:42:09 +00:00
Angus Gratton
5b12cd4a76 esp_hw_support: Fix ESP32-C3/S3 APB frequency
Regression in e6edf34e82, APB frequency
accidentally set at 81MHz not 80MHz.
2021-06-08 07:52:32 +00:00
Anton Maklakov
343cc5025b make build system: fix build for undefined _lock_* funcs 2021-06-07 12:53:45 +07:00
Renz Bagaporo
e6edf34e82 esp32: move esp_clk functions 2021-03-31 19:17:33 +08:00