1783 Commits

Author SHA1 Message Date
maojianxin
c2dac74cc5 Fix psram task coredump block
Fix coredump erase flash delay
2020-07-20 17:09:48 +08:00
xutao
b48bdefe54 skip app cpu when core dump stack in psram 2020-07-20 17:09:48 +08:00
Ivan Grokhotkov
de662d5e11 core dump: move stack into the internal memory when dumping to flash
Since SPI flash operations can not be performed when the stack is in
external RAM, we need to switch to a different stack when doing a
core dump to flash. This is achieved by a pair of longjmp's, one of
which is crafted manually to jump into a designated function with a
specific stack set up.
The cost of this feature is a bit of IRAM, plus the DRAM required for
the extra stack.

Closes AUD-1355
2020-07-20 17:09:48 +08:00
Li Shuai
a80cf2dc69 Fix interrupt watchdog caused by livelock 2020-07-20 17:09:48 +08:00
KonstantinKondrashov
ca51072461 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-07-20 17:09:47 +08:00
Ivan Grokhotkov
1fb82085b9 core dump: skip core dump to flash if the stack pointer is in PSRAM
Since flash operations disable the cache, we shouldn't try to run
core dump to flash when the stack is in PSRAM.

Ref. AUD-1355
2020-07-20 17:09:47 +08:00
KonstantinKondrashov
49cb9972de 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
2020-07-20 17:09:47 +08:00
Li Shuai
cef73cd232 added psram stack check in backtrace 2020-07-20 17:09:47 +08:00
maojianxin
c1374ff769 Fix http client read return value
1.esp_tls: fail connection if esp_tls_conn_new() timeouts
https://gitlab.espressif.cn:6688/espressif/esp-idf/merge_requests/7397

2.esp32:panic: avoid access cache in panichandler

3.Sync https://gitlab.espressif.cn:6688/espressif/esp-idf/merge_requests/7152
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$
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-07-20 17:09:28 +08:00
baohongde
a172605af4 components/bt: using high level interrupt in lc 2020-04-17 23:16:59 +08:00
liu zhifu
473db9c14b esp32: add esp_wifi_set_mgmt() 2020-04-17 22:44:22 +08:00
baohongde
a7a20f2e17 components/bt: Fix a bug that when frame program disable because of 'parity change has been detected on the slave ACL link at slave synchronization algorithm', while now is handling 'the last programmed frame' that cause no acl resched was called after that. 2020-04-17 22:43:45 +08:00
liu zhifu
dfd5e9da02 esp32: disable uncessary debug log for WiFi RX buffer allocation failure 2020-04-17 21:48:38 +08:00
liu zhifu
cb51f8c827 esp32: fix esp_wifi_internal_statistic_dump() 2020-04-17 21:48:11 +08:00
liu zhifu
5a09cf600e esp32: add esp_wifi_internal_statistic_dump()
The API is used to dump WiFi lmac/hmac/wpa key statistics, which is helpful for
WiFi issue debugging. The application need to call the API at the moment potential
problem happens, such as:
1. When receiving WiFi disconnect event
2. When receiving IP lost event
3. When sockets failed, such as TX or RX timeout etc
4. Any other places that the application suspect the WiFi works incorrectly
2020-04-17 21:45:58 +08:00
Xia Xiaotian
a0d85de8af Optimize 4-way-handshake failure time 2020-04-17 21:34:19 +08:00
Xia Xiaotian
1921a327c5 add more debug log for alloc null fail 2020-04-17 21:27:53 +08:00
liu zhifu
50b57516e8 esp_wifi: fix WiFi TX performance 2020-03-13 13:41:34 +08:00
Xia Xiaotian
5a86c5b3a7 Improve stability of coex WiFi performance
1. Fix force WiFi impacts WiFi receiving data in unforce WiFi status.
    2. Increase sleep delay time to 7ms to improve success ratio of sending NULL data.
2020-03-13 11:23:32 +08:00
Xia Xiaotian
1ea761ecee make sure WiFi connect first when run with ble gatt provision
fix incorrect coex scheme when bt is idle and ble is adv or connection
2020-03-03 16:51:09 +08:00
Xia Xiaotian
1413b84a8a coexist: adjust coexist scheme when BT is in connected status
Wi-Fi: revert to report specific reason code when receiving deauth during 4-way-handshake
2020-02-24 15:50:57 +08:00
Xia Xiaotian
3cbd8ce32e Fix two coex and WiFi issues
1. WiFi sleep when BT is in connected status.

    2. Fix double recycle BAR buffer.
2020-02-13 18:29:00 +08:00
baohongde
818ea3e3ce components/coex: backports for coex schm
1. support 40M Wi-Fi when calculate AFH

2. Calculate channel classification according to Host and coex

3. Set BR/EDR/LE coex schm status in controller

4. Only set AFH for BT when WiFi is connected

5. Fix a potential dead lock issue when set AFH

6. Fix WiFi connecting coex schm issue due to periodic timer

7. Complete BT a2dp pause coex schm

8. Increase BT slice when BT a2dp pause in order to receive AVRC event

9. Add more coex schm for BT/BLE
2020-01-14 20:17:46 +08:00
liu zhifu
8114c51da0 esp32: fix WiFi buffer reload issue 2020-01-08 10:29:30 +08:00
Xia Xiaotian
0b74249a01 Fix next TBTT calculation overflow issue 2020-01-03 14:46:51 +08:00
liu zhifu
c5d6efa59d esp32: fix WiFi RX bug
Disable WiFi last RX buffer
2020-01-02 20:07:27 +08:00
liu zhifu
d9a91b835a esp32: fix WiFi A-MSDU decrypt issue 2019-12-30 17:24:25 +08:00
baohongde
0d31937a7d components/coex: Fix dead lock 2019-12-28 16:59:44 +08:00
Xia Xiaotian
98e618f75e adjust next TBTT when it is ahead of now 2019-12-27 17:33:52 +08:00
ronghulin
8188138c35 esp32: fix a WiFi RX bug
Support WiFi/BT MAC register writting when the WiFi/BT common clock is disabled.
2019-12-26 13:51:29 +08:00
xiehang
1739654de4 esp_wifi:Put some rx code to iram 2019-12-25 15:53:13 +08:00
baohongde
c8e5433da3 Add A2DP paused state into schm 2019-12-24 22:11:14 +08:00
Xia Xiaotian
896ba3df56 improve wifi contention ability and optimize coex slice 2019-12-23 23:03:03 +08:00
Xia Xiaotian
f5d74b1106 fix AMPDU age timer crash 2019-12-16 17:09:55 +08:00
baohongde
99951fbcf8 support coex scheme
1. add bugfix of ble and add api to set max adv delay time
2. open full scan and change adv interval check in bluedroid
2019-12-16 15:25:38 +08:00
Xia Xiaotian
19913cec43 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-04 04:19:58 +00:00
Tian Hao
8ffe0ff357 fix bug that phy_enter_critical cannot effect on dual-core
Sometimes, libphy.a call phy_enter_critical() to protect accessing critical sections, such like
operating on I2C, but it may not effect when both the CPU core call it. It may cause accessing
I2C blocking and cannot recover by esp_restart(), until do HW reboot.
2019-11-28 17:12:07 +08:00
Jiang Jiang Jian
0d6cae963b Merge branch 'bugfix/fix_timer_deleted_and_run_broken_callback_v3.3' into 'release/v3.3'
esp_timer: fix the bug that when timeout of timer happens try to run callback(v3.3)

See merge request espressif/esp-idf!6768
2019-11-25 11:05:38 +08:00
Jack
5a6ac7f32f esp_timer: fix the bug that when timeout of timer happens try to run callback, and high priority task delete the timer and break the callback 2019-11-20 04:17:41 +00:00
Shubham Kulkarni
0f3f7d984a Fixed warnings for components driver, esp32 and mbedtls 2019-11-19 15:04:01 +05:30
Michael (XIAO Xufeng)
9b34085053 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-14 08:35:05 +00:00
Jiang Jiang Jian
0d1c490a7c Merge branch 'bugfix/coex_fix_some_bugs_v3.3' into 'release/v3.3'
Coexist: fix some coexist bugs (backportv3.3)

See merge request espressif/esp-idf!6435
2019-10-30 16:39:20 +08:00
Xia Xiaotian
9592346090 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.
4. fix bug bb reset lock flag to avoid bb reset lock unhandle
5. fix bug wifi reset mac cause task watch dog timeout
6. fix bug wifi reset mac position
2019-10-29 17:18:12 +00:00
KonstantinKondrashov
696d6867b4 esp_timer: Fix System time jumps back ~54secs
Closes: https://github.com/espressif/esp-idf/issues/2513
2019-10-29 17:17:26 +00:00
KonstantinKondrashov
f52b877199 esp32: Add UTs to check the System time does not jump back 2019-10-29 17:17:26 +00:00
Ivan Grokhotkov
a179125fd3 esp_timer: handle esp_timer_delete in timer task
Closes https://github.com/espressif/esp-idf/issues/3458
2019-10-29 17:17:26 +00:00
Tian Hao
cabe66195c 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-29 14:43:00 +08:00
Angus Gratton
9a6526554d Merge branch 'bugfix/ut_pre_read_DPORT_and_hi_interrupt' into 'release/v3.3'
esp32: Fix UT - Check pre-read workaround DPORT and Hi-interrupt

See merge request espressif/esp-idf!6240
2019-10-21 15:10:14 +08:00
Jiang Jiang Jian
4e27cbb89f Merge branch 'feature/esp_https_ota_improvements' into 'release/v3.3'
esp_https_ota: component refactoring, bugfixes and feature additions (backport v3.3)

See merge request espressif/esp-idf!6047
2019-10-21 10:40:37 +08:00
Jiang Jiang Jian
3e3ce3da81 Merge branch 'bugfix/backport_some_wifi_fixes_1009_v3.3' into 'release/v3.3'
esp32: fix some WiFi bugs 1009 (backport v3.3)

See merge request espressif/esp-idf!6298
2019-10-18 14:25:13 +08:00