Commit Graph

42 Commits

Author SHA1 Message Date
Cao Sen Miao
a8343bc470 esp_system: support gpio wakeup from deep sleep on esp32c3 2021-02-26 12:26:49 +08:00
Angus Gratton
f72c296827 Merge branch 'bugfix/deepsleep_disable_brownout_s2' into 'master'
deep_sleep: on S2 disable the brown out detector before deep sleeping

Closes IDF-2716 and IDFGH-4341

See merge request espressif/esp-idf!12348
2021-02-24 05:48:19 +00:00
morris
0f5d1c1c46 rtc: supported disable rom log temporarily 2021-02-22 20:56:43 +08:00
Marius Vikhammer
0a4e5c99f9 deep_sleep: on S2 disable the brown out detector before deep sleeping
On S2 the brown out detector would occasionally trigger erroneously during deep sleep.

Disable it before sleeping to circumvent this issue.

Closes https://github.com/espressif/esp-idf/issues/6179
2021-02-18 18:39:06 +08:00
baohongde
eef66789d4 Mac BB power down in light sleep
components/bt: Do not use feature: timer support isr dispatch method

disable controller after wake up finished.

protect critical section of power down

choose clk in sleep

components/coex: mac bb power down in light sleep

components/coex: Macro changed

components/os: protect reserved interrupt number

update phy to phy_version 300,6e46ba7,Jan 25 2021

some bugfix
2021-01-28 22:28:04 +08:00
Jiang Jiang Jian
d097988608 Merge branch 'bugfix/keep_esp_rtc_time_correct' into 'master'
newlib: Keep esp rtc time correct

See merge request espressif/esp-idf!11932
2021-01-27 15:22:43 +08:00
Angus Gratton
d3ffaf4684 esp_system: Add soc_caps guards in esp_sleep.h 2021-01-25 17:20:04 +00:00
Angus Gratton
4026e7b250 esp_system esp32c3: Fix uart flush on entering deep sleep 2021-01-25 17:20:04 +00:00
ninh
25dcc68b5d newlib: keep esp_rtc_get_time_us when rewrite the value of RTC_SLOW_CLK_CAL_REG 2021-01-21 02:28:21 +00:00
Li Shuai
58ab3975ea light sleep: fix cpu pd bug of normal light sleep 2021-01-21 10:03:39 +08:00
Li Shuai
f168ac3b39 light sleep: add cpu power down support for esp32c3 2021-01-19 14:51:50 +08:00
Li Shuai
a43de3a44b fix set UART_FORCE_XOFF can't stop new Tx request issue 2021-01-19 14:51:22 +08:00
Li Shuai
ac7d1bec76 light sleep: overhead time accuracy optimization for esp32c3 2021-01-19 14:50:58 +08:00
Li Shuai
aa7fd175b9 light sleep: light sleep support for esp32c3 2021-01-19 14:50:58 +08:00
ninh
659d805411 esp_wifi: light sleep optimization 2021-01-18 15:31:03 +08:00
ninh
27aa6c289f components/pm: Add slp gpio configure workaround 2021-01-15 15:34:45 +08:00
ninh
6dd6c8c3cf ci: fix IDFCI-377 2021-01-12 13:04:53 +00:00
ninh
dc7bdb9857 adjust lightsleep overhead time and cali slowclk 2021-01-06 03:40:28 +00:00
Marius Vikhammer
68608f804c esp32c3: Misc fixes needed to build & run 2020-12-31 15:20:05 +11:00
Marius Vikhammer
eb788deb03 esp_hw_support: merge C3 changes to master
Merge RTC related C3 changes to master
2020-12-30 12:20:41 +08:00
Angus Gratton
1b0442b963 Merge branch 'feature/unify_rtc_fast_mem_as_heap_config_across_chips' into 'master'
esp_system: make rtc fast memory to heap configuration unified across chips

Closes IDF-2503

See merge request espressif/esp-idf!11693
2020-12-29 11:41:05 +08:00
Mahavir Jain
880a63b2e9 esp_system: make rtc fast memory to heap configuration unified across chips
Closes IDF-2503
2020-12-24 09:46:35 +05:30
Angus Gratton
01696afc34 esp32c3: Add new esp_sleep_is_valid_wakeup_gpio() function 2020-12-24 13:40:01 +11:00
Ivan Grokhotkov
829d94ad01 Merge branch 'fix/rtc_fast_memory_force_on_in_use_for_heap' into 'master'
fix: RTC_FAST_MEM always power on if used for heap

See merge request espressif/esp-idf!11555
2020-12-15 18:45:20 +08:00
fuzhibo
985e94139d driver(touch): fix touch sensor false trigger in sleep mode 2020-12-10 17:43:14 +08:00
fuzhibo
f4aedfd017 fix: RTC_FAST_MEM always power on if used for heap 2020-12-10 14:45:41 +08:00
Angus Gratton
5228d9f9ce esp32c3: Apply one-liner/small changes for ESP32-C3 2020-12-01 10:58:50 +11:00
chaijie
a48b5246cc ESP32: Fix xtal 32k not oscillate or oscillate too slowly issue
ESP32 in revision0 and revision1 uses touchpad to provide
current to oscillate xtal 32k. But revision2 and revision3
do not need to do that.
Note: touchpad can not work and toupad/ULP wakeup sources
are not available when toupad provides current to xtal 32k
2020-11-23 19:38:11 +08:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Angus Gratton
0032971311 Merge branch 'bugfix/ulp_wakeup_trigger' into 'master'
ulp risc_v: fix bug about bit for wakeup trigger

Closes IDF-2298

See merge request espressif/esp-idf!11106
2020-11-09 14:57:36 +08:00
Cao Sen Miao
bd2d70ca0b ulp risc_v: fix bug about bit for wakeup trigger 2020-11-04 10:47:40 +08:00
fuzhibo
93c7cf094e rtc: update rtc related code(rtc_sleep rtc_init) to support esp32s3 2020-11-04 02:43:41 +00:00
Renz Bagaporo
b3a7c6e27e components: remove some unneeded headers from source files 2020-10-22 19:37:10 +08:00
Michael (XIAO Xufeng)
647dea9395 soc: combine xxx_caps.h into one soc_caps.h
During HAL layer refactoring and new chip bringup, we have several
caps.h for each part, to reduce the conflicts to minimum. But this is
The capabilities headers will be relataive stable once completely
written (maybe after the featues are supported by drivers).

Now ESP32 and ESP32-S2 drivers are relative stable, making it a good
time to combine all these caps.h into one soc_caps.h

This cleanup also move HAL config and pin config into separated files,
to make the responsibilities of these headers more clear. This is
helpful for the stabilities of soc_caps.h because we want to make it
public some day.
2020-10-17 16:10:15 +08:00
Angus Gratton
562ab01046 deep sleep: Calculate RTC CRC immediately before deep sleep, without using RAM
Fix for issues where RTC FAST memory is updated as part of going into deep
sleep. Very high risk if heaps are in RTC memory - in particular task stacks
may be in RTC memory, but also other variables.

Also fixes potential concurrency problems as RTC FAST memory is not accessible
by CPU during the CRC calculation itself.

Method:
- Disable interrupts (currently for single core only, will need update for S3)
- Load all registers before calculating CRC or going to sleep
2020-10-12 11:19:56 +11:00
morris
61f89b97c6 bringup esp32-s3 on FPGA 2020-09-22 15:15:03 +08:00
Ivan Grokhotkov
77afbd51ae sleep: fix esp32 light sleep duration
Commit aa43ed8 was fixing the light sleep overhead calculation for
ESP32-S2. However it also changed the overhead values for ESP32,
resulting in incorrect light sleep time. This caused regression in
light sleep example test.

Revert the original values for the ESP32, keep different set of values
for each chip.
2020-09-09 23:34:54 +02:00
ninh
aa43ed8bb8 fix reboot or crash when enable lightsleep on esp32s2 2020-09-07 15:38:00 +08:00
Renz Bagaporo
3f6e366f56 esp_system: force RTC_SLEEP_PD_XTAL on ESP32 via get pdflags
Based on the original code (`esp32/sleep_modes.c`), `RTC_SLEEP_PD_XTAL`
is always given as an argument to `esp_sleep_start`. Enforce this in
function to get power down flags to avoid redundancy.
2020-08-17 19:09:24 +08:00
Renz Bagaporo
fe65bf00b1 esp_system: use ext0, ext1, ulp wakeup prepare hal 2020-08-17 19:09:24 +08:00
Renz Bagaporo
4f5135030f esp_system: remove register level operations for timer wakeup 2020-08-17 19:09:24 +08:00
Renz Bagaporo
b30522f701 esp32, esp32s2: move sleep modes code to esp_system 2020-08-17 19:09:23 +08:00