Commit graph

1839 commits

Author SHA1 Message Date
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
xiehang
4e831ac080 esp_wifi: Add API to get available internal heap size. 2020-07-08 17:40:19 +08: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
Michael (XIAO Xufeng)
6f6677ac42 spi: move deprecated functions into internal header
Resolves https://github.com/espressif/esp-idf/issues/4132
2019-12-24 17:43:32 +08:00
KonstantinKondrashov
dcbcb5fe58 esp_timer: Add Test case when set_alarm needs set timer < now_time 2019-12-14 04:46:27 +08:00
KonstantinKondrashov
8e54ee3f16 esp_timer: Fix set_alarm. Case when timestamp < now_time
arg1 = MAX(int64_t arg1, uint64_t arg2) gave the wrong result, if arg1 < 0, it was presented as a larger value.
And ALARM_REG = (uin32_t)arg1. This leads to an infinite loop.
Fixed: both args are int64_t.

Closes: WIFI-1511
2019-12-11 19:28:20 +08:00
Jack
939d5a0f6a esp_wifi: fix WiFi scan and connect bugs when coexist with Bluetooth
1. Fix WiFi scan leads to poor performance of Bluetooth.
2. Improve WiFi connect success ratio when coexist with Bluetooth.
3. Check if WiFi is still connected when CSA or beacon timeout happen.
4. add coex pre init
2019-12-09 12:17:16 +08:00
Jiang Jiang Jian
a8f956e590 Merge branch 'bugfix/warning_fix_latest_freertos_v4.0' into 'release/v4.0'
Fixed warnings for components driver, esp32 and mbedtls (v4.0)

See merge request espressif/esp-idf!6759
2019-11-20 12:20:02 +08:00
Shubham Kulkarni
f95a723412 Fixed warnings for components driver, esp32 and mbedtls 2019-11-19 15:02:02 +05:30
xiehang
e5773cc2fe esp_wifi: Put some rx code to iram and update phy4180 2019-11-18 02:54:46 +00:00
Angus Gratton
79f36e85d5 Merge branch 'fix/ci_ut_psram_wroverb_v4.0' into 'release/v4.0'
ci: fix one ut issue when using Wrover-B module with newer ver of PSRAM (backport v4.0)

See merge request espressif/esp-idf!6592
2019-11-11 18:38:53 +08:00
Michael (XIAO Xufeng)
f54cab62a2 ci: fix one ut issue when using Wrover-B module with newer ver of PSRAM
The workaround for PSRAM that will occupy an SPI bus is enabled only when:

1. used on 32MBit ver 0 PSRAM.
2. work at 80MHz.

The test used to only check 32MBit by the config option, but for PSRAM
on Wrover-B module seems to use a newer version of 32MBit PSRAM.  So it
expects the workaround to be enabled, but actually not.

This commit split the unit test into two parts:

1. check all SPI buses are available, for all configs except psram_hspi
and psram_vspi, run on regular runners (including Wrover and Wrover-B).
a hidden option is enabled so that the compiler knows it's not building
psram_hspi or psram_vspi.

2. check the specified bus are acquired, for config psram_hspi and
psram_vspi. This only run on special runner (legacy Wrover module).
2019-11-08 08:25:35 +00:00
Angus Gratton
947fc14a3f wifi: Include DMA reserved pool when allocating internal-only memory
Fix for root cause of https://github.com/espressif/esp-idf/issues/3592
2019-11-08 11:37:46 +08:00
Anton Maklakov
4f297ed3fa Revert "C++: add provisions for optional RTTI support"
This reverts commit 3d0466ccd1.
2019-10-31 13:26:53 +07:00
Jiang Jiang Jian
8eaa440221 Merge branch 'bugfix/jump_time_54_sec_v4.0' into 'release/v4.0'
esp_timer: Fix time jumps back ~ 54sec (v4.0)

See merge request espressif/esp-idf!6456
2019-10-31 12:31:39 +08:00
Tian Hao
c599d7aa49 fix bug that semaphore may schedule out in Critical Section
1. Since BLE full-scan feature for BLE mesh change the controller code cause this problem,
it cause coex semaphore take in "interrupt disable", then it may cause task schedule
and cause crash in freertos
2. Fix newlib lock ISR context and critical section check
3. Fix bt controller ISR context and critical section check
2019-10-25 12:01:06 +08:00
KonstantinKondrashov
f1e8a49836 esp_timer: Fix System time jumps back ~54secs
Closes: https://github.com/espressif/esp-idf/issues/2513
2019-10-22 23:43:28 +08:00
KonstantinKondrashov
09cc922b42 esp32: Add UTs to check the System time does not jump back 2019-10-22 23:43:28 +08:00
Ivan Grokhotkov
3d0466ccd1 C++: add provisions for optional RTTI support
Ref. https://github.com/espressif/esp-idf/issues/1684

This change allows RTTI to be enabled in menuconfig. For full RTTI
support, libstdc++.a in the toolchain should be built without
-fno-rtti, as it is done now.

Generally if libstdc++.a is built with RTTI, applications which do not
use RTTI (and build with -fno-rtti) could still include typeinfo
structures referenced from STL classes’ vtables. This change works
around this, by moving all typeinfo structures from libstdc++.a into
a non-loadable section, placed into a non-existent memory region
starting at address 0. This can be done because when the application
is compiled with -fno-rtti, typeinfo structures are not used at run
time. This way, typeinfo structures do not contribute to the
application binary size.

If the application is build with RTTI support, typeinfo structures are
linked into the application .rodata section as usual.

Note that this commit does not actually enable RTTI support.
The respective Kconfig option is hidden, and will be made visible when
the toolchain is updated.
2019-10-18 11:22:39 +02:00
Angus Gratton
57335cfc26 Merge branch 'feature/add_chip_revision_to_image_header_4.0' into 'release/v4.0'
Add chip revision into image header(v4.0)

See merge request espressif/esp-idf!6127
2019-10-11 13:22:12 +08:00
Angus Gratton
4cafa3e76e Merge branch 'feature/add_psram_workaround_option_4.0' into 'release/v4.0'
make psram workaround depend on chip revison(v4.0)

See merge request espressif/esp-idf!6115
2019-10-10 11:00:29 +08:00
suda-morris
79923d0199 Add chip revision into image header
Check chip id and chip revision before boot app image

Closes https://github.com/espressif/esp-idf/issues/4000
2019-10-08 02:45:36 +00:00
Roland Dobai
dedaf624db Handle deprecated values in sdkconfig.defaults
The issue was pointed out also in
https://github.com/espressif/esp-idf/issues/4092
2019-10-03 10:13:42 +02:00
Xia Xiaotian
10d26549fa Coexist: fix some coexist bugs
1. Fix high beacon and broadcast packets loss ratio of WiFi to
   make MDNS test pass.
2. Improve stability of WiFi performance with a little sacrifice
   of throughput.
3. Improve BLE advertising and connection performance with
   dynamic priority. It sacrifices a little WiFi throughput, but
   achieves balance between WiFi and Bluetooth.
2019-09-30 11:42:05 +08:00
Ivan Grokhotkov
e5ff431b35 Merge branch 'fix/esp_flash_coredump_4.0' into 'release/v4.0'
esp_flash: fix coredump issues (backport v4.0)

See merge request espressif/esp-idf!6136
2019-09-26 21:26:53 +08:00
Roland Dobai
fc738680f8 Fix Kconfig issues discovered by upstream Kconfiglib 2019-09-25 08:25:51 +02:00
Jiang Jiang Jian
7f9626d378 Merge branch 'cleanup/make_supp_headers_private_v4.0' into 'release/v4.0'
wpa_supplicant: Make internal crypto headers private (backport v4.0)

See merge request espressif/esp-idf!6061
2019-09-23 18:00:43 +08:00
Angus Gratton
e4a4e6ed81 wdt: Remove deprecated esp_task_wdt_feed() function
Deprecated in ESP-IDF V3.1
2019-09-19 18:48:55 +10:00
Angus Gratton
8094e880c6 esp32/esp_common: Remove deprecated esp_efuse_read_mac() function
Deprecated since ESP-IDF V2.0
2019-09-19 18:48:30 +10:00
Angus Gratton
35b9223cf4 esp32/esp_common: Remove deprecated system_* APIs
Mostly deprecated before ESP-IDF V1.0 & V2.0
2019-09-19 18:48:30 +10:00