Commit Graph

133 Commits

Author SHA1 Message Date
Ivan Grokhotkov
dc07c9e110 esp_system: fix garbled UART output on startup on esp32s2
Closes https://github.com/espressif/esp-idf/issues/9168
2023-05-18 02:14:31 +00:00
wuzhenghui
e973d46045 bugfix: fix redefined _iram_end 2022-11-18 19:49:16 +08:00
Armando
0121b27a37 psram: remove CS/CLK pin settings in kconfig on ESP32S2 2022-11-11 18:20:06 +08:00
Omar Chebib
ebd63c499c (Xtensa) Build: add .xt.prop and .xt.lit to the compiled ELF file
Adding prop and lit sections to the ELF will let the debugger and the disassembler
have more info about data bytes present in the middle of the Xtensa
instructions, usually used for padding.
2022-08-18 10:44:31 +08:00
Michael (XIAO Xufeng)
7718c60d81 Merge branch 'bugfix/reserve_dma_ram_in_segments_v4.2' into 'release/v4.2'
psram: reserve dma pool in the step of heap max block (v4.2)

See merge request espressif/esp-idf!18861
2022-08-01 17:14:46 +08:00
David Čermák
9003e6d1eb Merge branch 'bugfix/cxx_exception_pool_4.2' into 'release/v4.2'
startup: Make __cxx_eh_arena_size_get return 0 if exceptions disabled (v4.2)

See merge request espressif/esp-idf!18800
2022-07-29 13:14:45 +08:00
wanlei
da340c02cc psram: fixed heap pool reservation for DMA/internal usage fail issue
As heap block may be allocated into multiple non-continuous chunks, to
reserve enough memory for dma/internal usage, we do the malloc in the
step of max available block.
2022-07-28 10:17:17 +08:00
Jiang Jiang Jian
a07f18ff9f Merge branch 'bugfix/cpu_reset_perip_clk_disable_v4.2' into 'release/v4.2'
esp_system: Peripheral clocks faulty become disabled during cpu reset (backport v4.2)

See merge request espressif/esp-idf!15486
2022-07-11 16:44:32 +08:00
Jakob Hasse
2bcfeb612f startup: Make __cxx_eh_arena_size_get return 0 if exceptions disabled
This function is necessary to provide the emergency exception
memory pool size for C++ code.
Since our libstdc++ always has exceptions enabled, this function
must exist here even if -fno-exception is set for user code.
2022-07-01 08:32:37 +02:00
Jiang Jiang Jian
8f9a3d508e Merge branch 'bugfix/idle_task_skipped_light_sleep_backport_v4.2' into 'release/v4.2'
pm_impl: fix neither enter light sleep nor enter waiti state in idle task(backport v4.2)

See merge request espressif/esp-idf!17849
2022-06-19 23:21:57 +08:00
jingli
57975000fe esp_hw_support/sleep: fix cannot lightsleep again after a wakeup from ULP
Since ulp wakeup signal are connected to ulp int raw(except esp32), we
need to clear ulp int raw before sleep when ulp wakeup enabled. Otherwise,
if the ulp int raw is already set, chip will not sleep properly.

Closes https://github.com/espressif/esp-idf/issues/6229
2022-05-23 01:00:28 +08:00
Jiang Jiang Jian
9cb1729107 Merge branch 'bugfix/fix_adc_calibration_light_sleep_issue_v4.2' into 'release/v4.2'
adc: fix calibration error when waking up from light sleep (v4.2)

See merge request espressif/esp-idf!16931
2022-05-19 10:55:10 +08:00
jingli
05b7db9cd8 fix _rtc_slow_length being incorrectly optimized by compiler 2022-05-01 23:26:52 +08:00
gaoxiaojie
5516dc7d0c pm_impl: fix neither enter light sleep nor enter waiti state in idle task 2022-04-21 14:40:57 +08:00
songruojing
affb956da5 esp_system: fix the bug that some peripheral clocks are being disabled during cpu reset for esp32s2 2022-03-29 03:42:34 +00:00
morris
84effb1708 Merge branch 'bugfix/sleep_wrong_log_lvl_v4.2' into 'release/v4.2'
Sleep: fix wrong debug level (backport v4.2)

See merge request espressif/esp-idf!17300
2022-03-16 17:10:53 +08:00
Omar Chebib
ba3266e2ec Sleep: fix wrong debug level
Fix usage of ESP_LOGD in sleep_modes.c which triggers a panic when
used in debug log level.
2022-03-15 11:18:42 +00:00
Armando
e6c97308b9 sleep: restore analog calibration registers after waking up from light sleep 2022-03-07 11:18:21 +08:00
jingli
8dd7662696 fix pm lock issue in dual core mode 2022-02-23 22:00:36 +08:00
Zim Kalinowski
5c82ebce35 Merge branch 'bugfix/fix_esp32s2_deep_sleep_timer_wake_up_fail_backport_v4.2' into 'release/v4.2'
rtc: fix esp32s2 fall into sleep forever when deep-sleep time is set to 0(backport v4.2)

See merge request espressif/esp-idf!13562
2021-07-26 07:39:16 +00:00
Aditya Patwardhan
e5b4d5f348 Fix memory leak on error path in register_select
And remove dead error handling code from unregister_select.

Closes https://github.com/espressif/esp-idf/pull/7296
2021-07-26 14:43:21 +08:00
Angus Gratton
1d64638333 esp_common: Correctly disable ".bss segment placed in external memory" for ESP32-S2 & ESP32-S3
Support for this feature is still pending.

As reported by https://github.com/espressif/esp-idf/issues/6162
2021-07-20 15:24:32 +08:00
Chen Yi Qun
20e41d6265 fix esp32s2 fall into sleep forever when deep-sleep time is set to 0(backport v4.2) 2021-07-14 17:46:20 +08:00
Marius Vikhammer
54383f684f soc: add dummy bytes to ensure instr prefetch always valid
The CPU might prefetch instructions, which means it in some cases
will try to fetch instruction located after the last instruction in
flash.text.

Add dummy bytes to ensure fetching these wont result in an error,
 e.g. MMU exceptions
2021-06-26 08:54:46 +08:00
Angus Gratton
2af8fac1d9 esp32s2 ds: Fix invalidating Digital Signature key from HMAC peripheral if assertions are disabled 2021-05-25 14:22:55 +00:00
Angus Gratton
d52331849e Merge branch 'bugfix/flash_rodata_any_alignement_v4.2' into 'release/v4.2'
build: Fix cache issue and add dedicated section for (Custom) App version info (backport v4.2)

See merge request espressif/esp-idf!13465
2021-05-11 01:03:12 +00:00
Jiang Jiang Jian
d29cce7f0a Merge branch 'bugfix/fix_some_pm_issue_v4.2' into 'release/v4.2'
esp_pm: add an interface to get pm configuration (backport to v4.2)

See merge request espressif/esp-idf!13124
2021-05-10 03:45:55 +00:00
Ivan Grokhotkov
af7b21851e freertos: fix TLS run-time address calculation
Since dd849ffc, _rodata_start label has been moved to a different
linker output section from where the TLS templates (.tdata, .tbss)
are located. Since link-time addresses of thread-local variables are
calculated relative to the section start address, this resulted in
incorrect calculation of THREADPTR/$tp registers.

Fix by introducing new linker label, _flash_rodata_start, which points
to the .flash.rodata output section where TLS variables are located,
and use it when calculating THREADPTR/$tp.

Also remove the hardcoded rodata section alignment for Xtensa targets.
Alignment of rodata can be affected by the user application, which is
the issue dd849ffc was fixing. To accommodate any possible alignment,
save it in a linker label (_flash_rodata_align) and then use when
calculating THREADPTR. Note that this is not required on RISC-V, since
this target doesn't use TPOFF.
2021-05-10 11:18:09 +08:00
Omar Chebib
974b8dd4c4 build: (Custom) App version info is now on a dedicated section, independent of the rodata alignment
It is now possible to have any alignment restriction on rodata in the user
applicaiton. It will not affect the first section which must be aligned
on a 16-byte bound.

Closes https://github.com/espressif/esp-idf/issues/6719
Closes https://github.com/espressif/esp-idf/issues/6976
2021-05-10 11:17:58 +08:00
Angus Gratton
c8d15588e5 Merge branch 'bugfix/rtc_fast_memory_force_on_in_use_for_heap_backport_v4.2' into 'release/v4.2'
Bugfix/rtc fast memory force on in use for heap (backport v4.2)

See merge request espressif/esp-idf!12873
2021-04-23 09:06:40 +00:00
ninh
e378ecd6cf esp_pm: add an interface to get pm configuration (backport to v4.2) 2021-04-13 17:15:35 +08:00
fuzhibo
2f5eba9263 driver(touch): fix touch sensor false trigger in sleep mode 2021-03-26 10:57:50 +08:00
fuzhibo
a866f0d8f6 fix: clear interrupt in touch sensor initialization 2021-03-25 11:14:24 +08:00
fuzhibo
9cb875949c fix: RTC_FAST_MEM always power on if used for heap 2021-03-24 11:52:55 +08:00
Jiang Jiang Jian
c4c500e241 Merge branch 'bugfix/deep_sleep_stub_heap_rtc_fast_mem_v4.2' into 'release/v4.2'
deep sleep: Calculate RTC CRC without using any stack or other RTC heap memory (v4.2)

See merge request espressif/esp-idf!10883
2021-03-18 04:09:50 +00:00
Marius Vikhammer
cf87e114cb 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-25 14:58:50 +08:00
Angus Gratton
7c5afa262d 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
2021-02-08 09:59:22 +11:00
Krzysztof Budzynski
2ef417df5f Merge branch 'docs/update_rtc_clock_source_description_in_api_references_backport_v4.2' into 'release/v4.2'
docs: update the description for RTC Clock Sources for esp32 and esp32s2 (backport/v4.2)

See merge request espressif/esp-idf!11329
2020-12-08 10:47:42 +08:00
KonstantinKondrashov
3d03264b0a esp32xx: Fix default values for all RTC sources in RTC_CLK_CAL_CYCLES option
Closes: https://github.com/espressif/esp-idf/issues/6037
2020-11-30 23:09:13 +08:00
Wang Fang
e9dae152cd docs: update the description for RTC Clock Sources for esp32 and esp32s2 2020-11-23 11:37:15 +08:00
Angus Gratton
e5aa2b1d73 Merge branch 'bugfix/esp32s2_define_correct_size_for_rtc_fast_mem_v4.2' into 'release/v4.2'
esp32s2: Fix missed features CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP and... (v4.2)

See merge request espressif/esp-idf!9965
2020-11-06 12:49:24 +08:00
ninh
a6467d7683 fix reboot or crash when enable lightsleep on esp32s2 2020-10-28 22:20:41 +08:00
Armando
4c7dca7105 spi: fix issue with closing DMA before CPU reset 2020-10-16 06:00:18 +00:00
KonstantinKondrashov
df5399cfb5 esp32s2: Fix missed features CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP and CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC
Defines the correct size for RTC fast memory (the same as for ESP32).

Closes: IDF-1800
2020-10-15 22:33:12 +00:00
Angus Gratton
f536db1782 Merge branch 'feature/secure_boot_esp32s2_v4.2' into 'release/v4.2'
Feature/secure boot esp32s2 v4.2

See merge request espressif/esp-idf!9958
2020-09-25 07:31:45 +08:00
Jakob Hasse
26481c4a9d toolchain: C++ exception workaround
* disable C++ exception FDE sorting (saves RAM)

Closes IDF-1128
2020-09-18 12:32:34 +07:00
Angus Gratton
9856198112 bootloader esp32s2: Increase bootloader DRAM & IRAM allowance
Bootloader DRAM now ends at 0x3FFEAB00 which is the start of ROM
static RAM (reclaimable after app is running).

IRAM loader segment increased by 8KB.

Available total static RAM for the app is now reduced by 16KB.
2020-09-15 11:23:51 +05:30
Angus Gratton
9409b2ecb7 Merge branch 'feature/support_for_esp32_pico_v3_02_v4.2' into 'release/v4.2'
psram: support for esp32-pico-v3-02 (backport v4.2)

See merge request espressif/esp-idf!9787
2020-08-04 14:30:14 +08:00
Darian Leung
e6db25af9d TWAI: Add ESP32-S2 support
This commit adds TWAI driver support for the
ESP32-S2. The following features were added:

- Expanded BRP support
- Expanded CLKOUT Divider Support
- Updated example READMEs
2020-07-30 22:09:39 +08:00
Michael (XIAO Xufeng)
b284c48854 Merge branch 'bugfix/esp32s2_lightsleep_uart_suspend_v4.2' into 'release/v4.2'
esp32s2: suspend UART output using XOFF before entering light sleep (backport v4.2)

See merge request espressif/esp-idf!9293
2020-07-27 15:55:33 +08:00