Commit Graph

1866 Commits

Author SHA1 Message Date
ronghulin
e01b690e5b feature: support multiple PHY init data 2023-07-06 15:30:15 +08:00
Cao Sen Miao
04a730c80c spi_flash: move the unlock patch to bootloader and add support for GD (backport v4.0) 2022-07-01 11:41:05 +08:00
Hrudaynath Dhabe
c616d9014e esp_wifi: Add esp_wifi_get_tsf_time() API to get the tsf time of specified interface. 2021-10-12 14:59:48 +05:30
Angus Gratton
c572e0bf5f paritition_table: Verify the partition table md5sum when loading the app
Additionally, always enable the partition MD5 check if flash encryption is on in
Release mode. This ensures the partition table ciphertext has not been modified
(CVE-2021-27926).

The exception is pre-V3.1 ESP-IDF bootloaders and partition tables, which
don't have support for the MD5 entry.
2021-06-02 16:30:02 +10:00
Darian Leung
29d6823d2f Add Task Watchdog backtrace printing
This commit makes the Task Watchdog print the backtrace of both
cores when it times out.
2021-05-10 03:09:20 +00:00
Hou Wen Xiang
4740d8e42c driver(uart): fix uart module reset issue (release V4.0) 2021-04-27 10:12:13 +00:00
Angus Gratton
acddb8fca2 Merge branch 'bugfix/dport_init_min_stack_size_v4.0' into 'release/v4.0'
freertos: Increase minimum task stack size when stack smashing checker is enabled (v4.0)

See merge request espressif/esp-idf!12801
2021-03-29 06:42:42 +00:00
baohongde
862f335f05 components/bt: Shutdown Bluetooth before esp_restart. 2021-03-22 02:54:06 +00:00
Angus Gratton
f24e1f5601 freertos: Increase minimum task stack size when stack smashing checker is enabled
Fixes issue with DPORT init task, this task uses minimum stack size and may not be
enough if stack smashing detection is set to Overall mode.

Also reworks the way we calculate minimum stack to allow for adding multiple
contributing factors.

Closes https://github.com/espressif/esp-idf/issues/6403
2021-03-19 13:33:48 +08:00
Michael (XIAO Xufeng)
e65ed8c959 spi_flash: add config option to override flash size in bootloader header
Sometimes the flash size read from bootloader is not correct. This may
forbid SPI Flash driver from reading the the area larger than the size
in bootloader header.

When the new config option is enabled, the latest configured
ESPTOOLPY_FLAHSIZE in the app header will be used to override the value
read from bootloader header.
2021-02-26 10:12:16 +08:00
Michael (XIAO Xufeng)
2a7aaacec6 Merge branch 'spi_dma_close_before_cpu_reset_v4.0' into 'release/v4.0'
spi: fix issue with closing DMA before CPU reset (4.0)

See merge request espressif/esp-idf!10840
2021-02-05 00:52:09 +08:00
xiehang
155a7f816d esp_wifi: ESP32 phy add [sections:phy_iram] 2021-01-15 03:51:36 +00:00
Jakob Hasse
8329d51fd0 toolchain: C++ exception workaround
* disable C++ exception FDE sorting (saves RAM)

Closes IDF-1128
2020-12-16 09:25:36 +07:00
KonstantinKondrashov
b902d6be39 esp32: Switch SPIRAM stack in esp_restart_noos() to internal stack
If esp_restart_noos() is run and the stack address points to external memory (SPIRAM)
then Cache_Read_Disable() raises up the error "Cache disabled but cached memory region accessed"
to fix this we switch stack to internal RAM before disable cache.

Added unit tests.

Closes: https://github.com/espressif/esp-idf/issues/5107
2020-12-08 16:55:50 +00:00
KonstantinKondrashov
80629a75a2 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:13:44 +08:00
Ivan Grokhotkov
a4d7f15625 Merge branch 'gdb/bt_on_invalid_pc_v4.0' into 'release/v4.0'
gdb: Modify PC in case of invalid PC (v4.0)

See merge request espressif/esp-idf!8980
2020-11-09 16:48:46 +08:00
Ivan Grokhotkov
f02e2c5e09 Merge branch 'init_priority_fix_v4.0' into 'release/v4.0'
CXX: make __attribute__((init_priority(n))) work (v4.0)

See merge request espressif/esp-idf!8445
2020-11-09 16:47:22 +08:00
Armando
85ca721867 spi: fix issue with closing DMA before CPU reset 2020-10-14 22:05:21 +08:00
dongyou
9039ddb20c Fix spin lock allocation in PSRAM bug 2020-09-22 14:19:56 +08:00
Jakob Hasse
54bc506d26 CXX: make __attribute__((init_priority(n))) work
* Added corresponding test case
* Moved all C++ init tests to separate file

Closes https://github.com/espressif/esp-idf/issues/5038
2020-09-04 19:01:20 +08:00
Sachin Parekh
6618e0c31d gdb: Modify PC in case of invalid PC
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2020-07-31 07:40:12 +00:00
Angus Gratton
bf1394eeb8 Merge branch 'feature/toolchain_2020r2_v4.0' into 'release/v4.0'
Update toolchain to esp-2020r2  (backport v4.0)

See merge request espressif/esp-idf!9001
2020-07-16 16:22:17 +08:00
Ivan Grokhotkov
48ea44f3d1 Merge branch 'feature/light_sleep_reject_v4.0' into 'release/v4.0'
sleep: enable sleep reject when entering light sleep (v4.0)

See merge request espressif/esp-idf!9501
2020-07-15 20:08:55 +08:00
Jeroen Domburg
faae3ceec5 Add fixes for gcc8 psram fix improvement 2020-07-14 14:04:53 +07:00
Angus Gratton
f7742dd9cc Merge branch 'bugfix/customer_baidu_int_wdt_v4.0' into 'release/v4.0'
backport v4.0: add soft solution for esp32 eco3 live lock issue

See merge request espressif/esp-idf!9214
2020-07-14 13:09:03 +08:00
Jiang Jiang Jian
0b3954c0c3 Merge branch 'bugfix/fix_some_wifi_bugs_0703_v4.0' into 'release/v4.0'
fix some wifi bugs 0703 (v4.0)

See merge request espressif/esp-idf!9532
2020-07-12 20:30:52 +08:00
Li Shuai
8560d88391 add soft solution for esp32 eco3 live lock issue 2020-07-10 02:14:47 +00:00
xiehang
4e831ac080 esp_wifi: Add API to get available internal heap size. 2020-07-08 17:40:19 +08:00
Ivan Grokhotkov
5da359c253 sleep: enable sleep reject when entering light sleep 2020-07-07 11:21:42 +02:00
Michael (XIAO Xufeng)
671ecd7522 spiram: fix the read id failure
The issue is caused by:
1. The disable_qio_mode inside read_id may have side effects.
2. read_id twice may have side effects.

Fix this issue by moving disable_qio_mode out of read_id and only do it
once before read_id. And retry read_id only when the first one is
failed.

Issue introduced in 3ecbb59c15.
2020-07-01 16:39:16 +08:00
chenjianqiang
fd475fc9bc psram: fix 16mbit psram id read error 2020-07-01 16:38:29 +08:00
Ivan Grokhotkov
2967334138 Merge branch 'bugfix/sleep_comments_v4.0' into 'release/v4.0'
doc: Specify that sleep wakeup source restrictions apply to all current ESP32 revisions (v4.0)

See merge request espressif/esp-idf!8568
2020-06-23 01:45:29 +08:00
KonstantinKondrashov
4a6e793322 esp32: Reduce using ESP_EARLY_LOGx and move some code after the stdout initialization
After setting _GLOBAL_REENT, ESP_LOGIx can be used instead of ESP_EARLY_LOGx.

Closes: https://github.com/espressif/esp-idf/issues/5343
2020-06-17 16:30:11 +08:00
Angus Gratton
02b5db37d1 doc: Specify that sleep wakeup source restrictions apply to all current ESP32 revisions
Closes https://github.com/espressif/esp-idf/issues/4681

Discussion https://esp32.com/viewtopic.php?f=13&t=15145
2020-04-30 15:36:04 +10:00
Ivan Grokhotkov
81f0744ada test: add a (non-automated) case for backtraces with ROM functions 2020-04-21 11:49:15 +02:00
Angus Gratton
a2d0fb348b Merge branch 'feature/add_rtc_xtal_cal_retry_option_v4.0' into 'release/v4.0'
esp32: Add a Kconfig option - Number of attempts to repeat 32k XTAL calibration (v4.0)

See merge request espressif/esp-idf!7932
2020-04-15 16:09:59 +08:00
chenjianqiang
a6b08cb025 psram: support psram 2T mode to fix single bit error
1. add enable PSRAM 2T mode function
2. abort when himem and 2T mode are enabled meanwhile
3. set SPIRAM_2T_MODE as "n" by default, enable it when needed
2020-04-13 14:52:33 +08:00
Ivan Grokhotkov
192c20c9f7 clk.h: add extern C guards
Closes https://github.com/espressif/esp-idf/issues/4215
2020-04-02 23:22:41 +02:00
xiehang
d71ac521cf esp_wifi: backport some wifi bugs 0323
1,Reduce WiFi bin size
2,Add TX packets size check
3,Fix scan get rssi error
4,Add wifi stop check at WiFi deinit entry
5,coex adjust scheme when bt is connected status
6,Return fail when setting AP's channel is out of range
7,Fix the bug for setting channel when WiFi in NULL mode
2020-03-24 15:10:31 +08:00
Mahavir Jain
0cc802e6ab ipc: prevent code getting pulled in for unicore configuration 2020-03-11 14:04:45 +05:30
KonstantinKondrashov
cb10ba5785 esp32: Add a Kconfig option- Number of attempts to repeat 32k XTAL calibration
Closes: IDF-1479
2020-03-10 19:39:56 +08:00
Ivan Grokhotkov
313c1ed1ba Merge branch 'bugfix/esp_log_from_critical_v4.0' into 'release/v4.0'
intr_alloc: don't call ESP_LOG from a critical section (backport v4.0)

See merge request espressif/esp-idf!7159
2020-02-10 17:34:53 +08:00
Ivan Grokhotkov
4ce7b666a6 esp32: panic: do digital reset if cache error interrupt is set
Even if frame->exccause != PANIC_RSN_CACHEERR, it is possible that
the cache error interrupt status is set. For example, this may happen
due to an invalid cache access in the panic handler itself.
Check cache error interrupt status instead of frame->exccause to
decide whether to do CPU reset or digital reset.

Also remove unnecessary esp_dport_access_int_pause from
esp_cache_err_get_cpuid, since the panic handler already calls
esp_dport_access_int_abort on entry.
2020-01-30 12:28:22 +01:00
Angus Gratton
a61fd1e42b Merge branch 'bugfix/esp_timer_stucks_into_esp_timer_impl_set_alarm_v4.0' into 'release/v4.0'
esp_timer/esp32: Fix esp_timer_impl_set_alarm() when CPU and APB freqs are changed (v4.0)

See merge request espressif/esp-idf!7304
2020-01-29 14:25:27 +08:00
KonstantinKondrashov
9a24d95907 esp_timer/esp32: Fix case when alarm_reg > counter_reg but FRC_TIMER_INT_STATUS is not set
Closes: WIFI-1576
Closes: https://github.com/espressif/esp-idf/issues/2954
2020-01-28 21:41:27 +08:00
KonstantinKondrashov
f927957950 esp32: Add UT for DPORT 2020-01-16 13:31:20 +08:00
KonstantinKondrashov
6fca0e3861 esp32: Fix esp_dport_access_reg_read 2020-01-16 13:31:20 +08:00
Ivan Grokhotkov
386804d407 intr_alloc: don't call ESP_LOG from a critical section
Calling ESP_LOG from a critical section leads to abort() in 4.1, and
may also randomly abort() in earlier versions.

Closes FCS-268
2020-01-15 04:16:24 +00:00
Jiang Jiang Jian
0cefe6df78 Merge branch 'bugfix/fix_a_wifi_rx_bug_v4.0' into 'release/v4.0'
esp_wifi: fix a WiFi receiving bug (backport v4.0)

See merge request espressif/esp-idf!7002
2020-01-02 16:30:04 +08:00
liu zhifu
0631d185bd esp_wifi: fix a WiFi receiving bug
Support WiFi/BT MAC register writting when the WiFi/BT common clock is disabled.
2019-12-26 19:41:04 +08:00