Commit graph

4707 commits

Author SHA1 Message Date
Liu Zhi Fu 6a418013a3 esp32: fix WiFi stop bug in WiFi/BT coexist mode
This fix includes following changes:
1. Fix the bug that esp_restart()/esp_wifi_stop() sometimes fails in WiFi/BT coexist mode.
2. Add a timer for WiFi stop and stop WiFi forcibly once the timer expires.
2018-12-17 20:39:54 +08:00
Tian Hao 129f1df461 fix bug that there's very low ratio to cause BLE assert(65536, 0) in rwble.c at line 222 2018-12-14 17:52:31 +08:00
Sagar Bijwe 76f98a4b36 mbedtls: Fix compilation errors when CONFIG_MBEDTLS_HARDWARE_AES is disabled 2018-12-07 09:41:59 +00:00
Ivan Grokhotkov 0b3fdf420f Merge branch 'bugfix/fat_lock_log_v3.1' into 'release/v3.1'
fatfs: Do not log from critical sections (backport v3.1)

See merge request idf/esp-idf!3720
2018-12-07 14:07:16 +08:00
Jiang Jiang Jian a7d37b303d Merge branch 'bugfix/btdm_assert_ble_32768_v3.1' into 'release/v3.1'
fix bug that there's very low ratio to cause BLE assert(32768, 0) in rwble.c at line 222

See merge request idf/esp-idf!3918
2018-12-07 13:54:18 +08:00
Angus Gratton a7b5496770 Merge branch 'fix/spi_callback_in_iram_v3.1' into 'release/v3.1'
spi: fix the crash when callbacks are not in the IRAM (Backports v3.1)

See merge request idf/esp-idf!3886
2018-12-07 09:11:47 +08:00
Tian Hao ce5b2709ab fix bug that there's very low ratio to cause BLE assert(32768, 0) in rwble.c at line 222 2018-12-06 21:17:49 +08:00
Michael (XIAO Xufeng) 3387d751d9 spi: fix the crash when callbacks are not in the IRAM
Introduced in 9c23b8e5 and 4f87a62f. To get higher speed, menuconfig
options are added to put ISR and other functions into the IRAM.  The
interrupt flag ESP_INTR_FLAG_IRAM is also mistakenly set when the ISR is
put into the IRAM. However callbacks, which are wrote by the user, are
called in the master and slave ISR. The user may not be aware of that
these callbacks are not disabled during flash operations. Any cache miss
during flash operation will cause panic.

Essentially IRAM functions and intrrupt flag ESP_INTR_FLAG_IRAM are
different, the latter means not disabling the ISR during flash
operations.  New bus_config flag intr_flags is offered to help set the
interrupt attribute, including priority level, SHARED, IRAM (not
disabled during flash operations).  It introduced a small BREAK to
IDFv3.1 (but the same as IDFv3.0) that the user has to manually set IRAM
flag now (therefore he's aware of the IRAM thing) to void the ISR being
disabled during flash operations.
2018-12-05 10:25:57 +08:00
Tian Hao 155e48bbde component/bt and esp32: fix two bluetooth bugs that caused by coexist module
1. Fix interrupt watchdog timeout in bluetooth "btdm_bb_isr"
    2. Fix BLE assert(512) or assert(1536)  in rwble.c at line 222
    3. Update librtc.a to fix BLE assert(512) in rwble.c at line 222

    The #1 and #2 occurs random.
    The #3 bug occurs in certain scenario:
    	1. If Wifi start softap and BLE is working
    	2. If wifi start station, but do not use normal station operation, such
    		as just use espnow, while BLE is working
    	3. Any other scenario, that wifi works without use software coexist
    		operation, while BLE is working(such as do advertising and ...)

    4. update libcoexist.a version to v1.1.2
2018-12-03 22:09:04 +08:00
Ivan Grokhotkov 93fcc418fe Merge branch 'bugfix/i2c_hardware_filter_default_enable_v3.1' into 'release/v3.1'
driver(i2c): enable I2C master hardware filter by default for release/v3.1

See merge request idf/esp-idf!3816
2018-11-29 19:29:04 +08:00
Ivan Grokhotkov f00c6d1e84 Merge branch 'bugfix/freertos_idle_tick_count_v3.1' into 'release/v3.1'
freertos: use xTaskQueueMutex to protect tick count (backport v3.1)

See merge request idf/esp-idf!3728
2018-11-29 12:01:56 +08:00
kooho 2aea6e5e9c driver(i2c): enable I2C master hardware filter by default for release/v3.1 2018-11-28 17:38:50 +08:00
Konstantin Kondrashov 868da0741c aes/sha/mpi: Bugfix a use of shared registers.
This commit resolves a blocking in esp_aes_block function.

Introduce:
The problem was in the fact that AES is switched off at the moment when he should give out the processed data. But because of the disabled, the operation can not be completed successfully, there is an infinite hang. The reason for this behavior is that the registers for controlling the inclusion of AES, SHA, MPI have shared registers and they were not protected from sharing.

Fix some related issue with shared using of AES SHA RSA accelerators.

Closes: https://github.com/espressif/esp-idf/issues/2295#issuecomment-432898137
2018-11-26 02:42:37 +00:00
Jiang Jiang Jian 09b2cd7d26 Merge branch 'bugfix/btdm_add_check_peer_addr_type_in_set_adv_params_v3.1' into 'release/v3.1'
Component/bt: add check peer addr type in set adv params (backport v3.1)

See merge request idf/esp-idf!3735
2018-11-23 20:14:15 +08:00
Liu Zhi Fu ddbb535080 esp32: fix some wifi bugs
Fix some wifi bugs
1. Enable RX BAR
2. Fix the bug that ESP32 AP negotiates with iphone to 11g
3. Fix the bug that ESP32 STA has ap_loss because CMCC AP contains two SSID
2018-11-21 15:24:30 +08:00
Jiang Jiang Jian 195f7274c4 Merge branch 'bugfix/btdm_controller_disable_v3.1' into 'release/v3.1'
Fix two bugs when disable bluetooth controller(backport v3.1)

See merge request idf/esp-idf!3693
2018-11-20 17:00:38 +08:00
Jiang Jiang Jian cdd3131f8a Merge branch 'bugfix/btdm_errors_in_comment_v3.1' into 'release/v3.1'
components/bt: Some errors in comment(backport 3.1)

See merge request idf/esp-idf!3714
2018-11-20 14:26:19 +08:00
zhiweijian dfd46965ae Component/bt: add check peer addr type in set adv params 2018-11-19 17:21:28 +08:00
Ivan Grokhotkov 845bbc293a freertos: use xTaskQueueMutex to protect tick count
Having two different spinlocks is problematic due to possibly
different order in which the locks will be taken. Changing the order
would require significant restructuring of kernel code which is
undesirable.

An additional place where taking xTickCountMutex was needed was in
vApplicationSleep function. Not taking xTickCountMutex resulted in
other CPU sometimes possibly advancing tick count while light sleep
entry/exit was happening. Taking xTickCountMutex in addition to
xTaskQueueMutex has shown a problem that in different code paths,
these two spinlocks could be taken in different order, leading to
(unlikely, but possible) deadlocks.
2018-11-19 11:09:37 +08:00
zhangyanjiao 50f8b7b783 wifi: fix the bug that if station (sleep is enabled) and sniffer are enabled at the same time,
when disable sniffer, station will never enable phy and rf againi. (backport v3.1)
2018-11-16 20:19:21 +08:00
Roland Dobai c4193d5ec1 fatfs: Do not log from critical sections
Logging in the critical section can result in a deadlock when the logger
is redirected to FATFS.

Closes https://github.com/espressif/esp-idf/issues/1693
2018-11-16 12:59:38 +01:00
baohongde 8e0bb3ec81 components/bt: Some errors in comment 2018-11-16 15:38:22 +08:00
Jiang Jiang Jian 13d4e43888 Merge branch 'bugfix/tw27096_fix_lwip_mbox_free_crash_v3.1' into 'release/v3.1'
fix the crash caused by sys_mbox_free (backport v3.1)

See merge request idf/esp-idf!3620
2018-11-15 10:32:06 +08:00
Tian Hao dbd225c673 Fix two bugs when disable bluetooth controller
1. Fix the bug that disable controller suddenly cause crash when ble is working
2. Fix the bug that when disable controller, it will cause wifi cannot RX, TX timeout, buffer lack and etc.
2018-11-13 17:49:06 +08:00
morris da8835aa0b ethernetif: fix potential memory leak
1. If L2_TO_L3_RX_BUF_MODE is not selected, we must assign l2_owner explictly before we call pbuf_free.
2018-11-13 11:41:17 +08:00
Jiang Jiang Jian 8e703b14ee Merge branch 'test/fix_bug_of_scan_interval_and_windows_for_v3.1' into 'release/v3.1'
test: fix bug of scan interval and window (backport v3.1)

See merge request idf/esp-idf!3668
2018-11-12 17:34:55 +08:00
Jiang Jiang Jian 79da87def9 Merge branch 'bugfix/wifi_do_not_load_phy_data_if_fail_to_open_nvs_v3.1' into 'release/v3.1'
esp32: do not try to load PHY data if fail to open NVS (backport v3.1)

See merge request idf/esp-idf!3649
2018-11-12 17:00:14 +08:00
Jiang Jiang Jian 0ffe9f0c4e Merge branch 'bugfix/mdns_crash_on_network_change_backport3.1' into 'release/v3.1'
Fixed mdns crashes on network changes (backport v3.1)

See merge request idf/esp-idf!3579
2018-11-12 15:30:44 +08:00
XiaXiaotian 8b50419f55 esp32: do not try to load PHY data if fail to open NVS 2018-11-12 03:17:11 +00:00
Liu Zhi Fu 3514effcd0 lwip: fix crash caused by sys_mbox_free
Fix lwip crashed bug caused by sys_mbox_free()
2018-11-11 11:51:10 +08:00
chensheng f7b9ea8cb5 test: fix bug of scan interval and window 2018-11-09 11:28:16 +08:00
baohongde ac124ee89c components/bt: Point ACL RX buffer ptr to ACL RX buffer if ACL RX buffer ptr is null(backprot 3.1)
1. When WIFI task or other high priority task blocks the Bluetooth task, ACL RX buffer will use up, ACL RX buffer ptr will point to null and will never point to a valid adress. Causing errors in Bluetooth.
2. hcimsgs.h used whether flow control is on or off
2018-11-09 03:26:36 +00:00
He Yin Ling 01cfb0d6bd Merge branch 'test/fixbug_create_service_check_message_change_v3.1' into 'release/v3.1'
test: bugfix create service check message change for v3.1

See merge request idf/esp-idf!3664
2018-11-09 11:22:05 +08:00
Jiang Jiang Jian 69b6eabef0 Merge branch 'bugfix/btdm_add_profile_descriptor_list_for_spp_v3.1' into 'release/v3.1'
component/bt: Add profile descriptor list for SPP(backport 3.1)

See merge request idf/esp-idf!3602
2018-11-08 17:27:21 +08:00
Jiang Jiang Jian 8c16be1edc Merge branch 'bugfix/btdm_name_buffer_allocation_size_differs_v3.1' into 'release/v3.1'
components/bt: Fix the different size of name buffer allocation size(backport 3.1)

See merge request idf/esp-idf!3588
2018-11-08 17:24:53 +08:00
chensheng a015072a7e test: bugfix create service check message change for v3.1 2018-11-08 11:23:59 +08:00
Jiang Jiang Jian 7cc2445b9a Merge branch 'bugfix/btdm_sniff_anchor_point_calculation_error_for_v3.1' into 'release/v3.1'
bugfix/btdm_sniff_anchor_point_calculation_error_for_v3.1(backport v3.1)

See merge request idf/esp-idf!3614
2018-11-06 17:12:39 +08:00
wangmengyang cfef8291bb component/bt: bugfix of two issues of sniff mode in classic bluetooth
1. resolve the error in calculating sniff anchor point that result in connection supervision timeout
2. resolve the issue of user case that requires sniff attempt is larger than 0xff
2018-11-06 12:02:18 +08:00
Jiang Jiang Jian 725978b817 Merge branch 'bugfix/btdm_allow_a2dp_codec_dynamic_alloc_for_v3.1' into 'release/v3.1'
bugfix/btdm_allow_a2dp_codec_dynamic_alloc_for_v3.1(backport v3.1)

See merge request idf/esp-idf!3600
2018-11-06 11:57:04 +08:00
Jiang Jiang Jian 1e598fc6db Merge branch 'bugfix/btdm_add_static_passkey_and_accept_specified_sec_aut' into 'release/v3.1'
component/bt:  add static passkey and accept specified sec auth (backport v3.1)

See merge request idf/esp-idf!3559
2018-11-05 11:02:18 +08:00
Jiang Jiang Jian 08c14389f6 Merge branch 'bugfix/fix_some_wifi_bugs_1022_v3.1' into 'release/v3.1'
esp32: fix some wifi bugs (backport v3.1)

See merge request idf/esp-idf!3540
2018-11-02 15:36:46 +08:00
Ivan Grokhotkov 2aa9a21180 Merge branch 'bugfix/fix_psram_eid_v3.1' into 'release/v3.1'
psram: fix psram eid (backport v3.1)

See merge request idf/esp-idf!3467
2018-11-01 22:15:04 +08:00
Ivan Grokhotkov acdc7b0511 Merge branch 'bugfix/workaround_free_peripherals_isr_when_using_dual_core_v3.1' into 'release/v3.1'
driver(interrupt): fix the issue that interrupt might be allocated and freed on different core for release/v3.1

See merge request idf/esp-idf!3436
2018-11-01 22:14:52 +08:00
Ivan Grokhotkov 3b92e85b30 Merge branch 'bugfix/bootloader_iram_overlap_check_v3.1' into 'release/v3.1'
bootloader: verify that loaded image does not overlap bootloader code (backport v3.1)

See merge request idf/esp-idf!3526
2018-11-01 16:40:26 +08:00
Angus Gratton 7d6b82673f bootloader: Fix crash enabling flash encryption
Regression in 9c715d7946
2018-11-01 14:14:18 +08:00
Mahavir Jain 12e5f25a1c bootloader: keep bootloader_common code to retention region
It is possible to utilize some of the routines related to otadata
partition validation, after firmware image is downloaded to RAM. Hence
these routines should be part of app cpu cache, so that they do not
get overwritten by firmware.

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-11-01 14:14:00 +08:00
baohongde 539064b93c component/bt: Add profile descriptor list for SPP(backport 3.1)
A cherry-pick of MR !2691
2018-11-01 10:36:11 +08:00
wangmengyang 82e69475ca component/bt: allow dynamic allocation of SBC encoder/decoder buffer used in A2DP to save internal DRAM 2018-10-31 17:54:51 +08:00
baohongde 7a05ef2002 components/bt: Fix the different size of name buffer allocation size(backport 3.1)
A cherry-pick of MR !3587
Close https://github.com/espressif/esp-idf/issues/2615
2018-10-31 10:56:16 +08:00
David Cermak 6a6fccc191 mdns: fixed crashes on network change (not properly locked sending packets to queue from timer task), backport 3.1 2018-10-30 07:37:02 +01:00