Commit graph

1597 commits

Author SHA1 Message Date
liu zhifu 7d3733d255 esp32: backport some WiFi fixes to v3.2
Backport following WiFi fixes to v3.2:
1. Add support for STA HT2040 coexist management
2. Add support for WPA2 improvements
3. Disallow HT rate when unicast/mcast cipher is TKIP/WEP
4. Add support for signal test
5. Fix the bug that WPS fails when AP is encrypted
2019-05-07 10:50:09 +08:00
zhangyanjiao 4e78900fbf fix the bug when scan fail after STA failed to connect to a nonexistent AP 2019-05-05 11:53:33 +08:00
Jiang Jiang Jian 4156c6ddec Merge branch 'bugfix/improve_spi_timing_for_psram_and_flash_v3.2' into 'release/v3.2'
bugfix(psram): improve spi cs timing settings for psram (backport v3.2)

See merge request idf/esp-idf!4846
2019-04-28 10:35:41 +08:00
Jiang Jiang Jian 306a1173af Merge branch 'feature/wifi_refactor_softap_power_save_v3.2' into 'release/v3.2'
refactor softap power save (backport v3.2)

See merge request idf/esp-idf!4823
2019-04-25 17:05:49 +08:00
Wangjialin 464df4b788 bugfix: fix bug in flash 80M + sram 40M mode 2019-04-23 02:18:15 +00:00
Wangjialin 8ff0d986b6 bugfix(psram): improve spi cs timing settings for psram
1. remove redundant SPI clock settings, use rom functions to set clock.
2. remove redundant SPI cs setup and hold settings.
3. for old 32Mbit psram, cs hold time must only be 0.5T due to the special driving mode.(cs_setup = 0; cs_hold = 0)
4. for new 64Mbit psram, cs hold time is recommended to be 2.5T. (cs_setup = 1, cs_setup_time = 0;cs_hold = 1, cs_hold_time = 1)
2019-04-23 02:18:15 +00:00
Angus Gratton 225bc0f80a Merge branch 'bugfix/remove_second_sha_enable_v3.2' into 'release/v3.2'
esp32/sha: Remove second enabling in esp_sha_lock_engine_common (backport v3.2)

See merge request idf/esp-idf!4780
2019-04-23 07:38:00 +08:00
XiaXiaotian 3ee11bcafc refactor softap power save
1. Softap support multicast and broadcast saving and flushing
    when the associated stations enable IEEE80211 legacy power
    save(which is called modem sleep in ESP32).

    2. Improve the frame saving and flushing mechanism of softap power
    save.
2019-04-19 14:14:33 +08:00
XiaXiaotian 5059c7fac3 Decouple WiFi and BT with coexist to reduce bin size
1. Do not link WiFi code when only BT or BLE is used and WiFi is not
used.

2. Do not link coexist code when CONFIG_SW_COEXIST_ENABLE is disabled.
2019-04-17 16:59:24 +08:00
liu zhifu faec3211bd esp32: fix some WiFi and coexist bugs
Fix following WiFi and coexist bugs:
1. Fix BT disconnecting due to too many reset BB
2. Fix the bug that no TBTT is generated after rx wrong beacon when WiFi/BT coexist
3. Fix a DelBA bug
4. Add out of memory check
5. Fix the bug that STA incorrectly receives packets when scanning in connected status
6. PHY4008: Disable BT TX in force wifi mode, and enable BT TX in un-force wifi mode
2019-04-17 10:02:51 +08:00
Jiang Jiang Jian c7d0df5451 Merge branch 'bugfix/fix_scan_and_connect_bugs_0415_v3.2' into 'release/v3.2'
fix wifi scan and connect bugs (backport v3.2)

See merge request idf/esp-idf!4772
2019-04-16 21:09:15 +08:00
Mahavir Jain 1fcef31195 cpu_start: fix warnings with CONFIG_PM_DFS_INIT_AUTO option
Closes https://github.com/espressif/esp-idf/issues/3297
2019-04-16 11:21:26 +05:30
Konstantin Kondrashov b2455219cc esp32/sha: Remove second enabling in esp_sha_lock_engine_common 2019-04-15 21:14:38 +08:00
zhangyanjiao de6b7d6520 fix wifi scan and connect bugs:
1. fix the bug block scan tiemout before scan finish
2. make menuconfig can set the WiFi mgmt short buffer num
3. modify wifi reason code
4. fix the bug PMK recal too long
2019-04-15 18:59:52 +08:00
chenyudong 37063ea9b6 Decouple Wifi and ESP-Mesh to reduce bin size
Do not link mesh code when mesh is not used
2019-04-14 20:36:14 +08:00
Jiang Jiang Jian f6837e6117 Merge branch 'bugfix/esp_sha_signing_sha256_v3.2' into 'release/v3.2'
secure boot: Fix esp_sha INT WDT, switch to using mbedTLS API  (backport v3.2)

See merge request idf/esp-idf!4511
2019-04-14 02:57:45 +08:00
Jiang Jiang Jian f8597be435 Merge branch 'bugfix/wifi_modify_wifi_kconfig_v3.2' into 'release/v3.2'
esp32: modify WiFi Kconfig in order to achieve better compatility and performance (bakcport v3.2)

See merge request idf/esp-idf!4386
2019-04-12 23:11:24 +08:00
Angus Gratton 892c2be168 esp32: Chunk input blocks for esp_sha() function performance, add perf test 2019-04-12 05:45:05 +00:00
Angus Gratton 1d8e1c4ce4 esp32 hwcrypto: Prevent esp_sha() from disabling interrupts for extended period
* Closes https://github.com/espressif/esp-idf/issues/3127
* Closes IDFGH-681

Also reported at https://esp32.com/viewtopic.php?f=13&t=9506
2019-04-12 05:45:05 +00:00
chenyudong 1778573dad mesh: fix memory leak and group send
fix a bug in group send
fix esp_mesh_set_router when router_t not initialized
fix mesh memory leak with invalid option
2019-04-11 20:43:38 +08:00
Jiang Jiang Jian 9778549759 Merge branch 'bugfix/tw28146_make_wifi_iram_optimization_configurable_v3.2' into 'release/v3.2'
esp32: make WiFi IRAM optimization configurable (backport v3.2)

See merge request idf/esp-idf!4040
2019-04-11 18:44:19 +08:00
maojianxin f85294b058 Fix external start fail 2019-04-02 12:52:58 +11:00
Liu Zhi Fu 76c20ab9b3 esp32: make WiFi IRAM optimization configurable
With this feature, the WiFi IRAM optimization can be disabled/enabled via menuconfig.
2019-03-20 13:45:54 +00:00
zwj b305a96a74 component/bt: add vendor hci cmd 2019-03-12 11:55:42 +08:00
Ivan Grokhotkov 9d48cdb6f3 Merge branch 'bugfix/multiple_backports_v3.2' into 'release/v3.2'
multiple backports (v3.2)

See merge request idf/esp-idf!4367
2019-02-28 21:42:19 +08:00
Ivan Grokhotkov 742f8e7f8a esp_timer: fix occasional failures in "monotonic values" test
1. ref_clock used in unit tests occasionally produces time off by ~100
microseconds shortly after being started. Add a delay to let
ref_clock stabilise, until the cause is found.

2. Reduce roundoff error accumulation which would occasionally cause
the test to fail, by choosing an overflow value which can be divided
by APB frequency.

3. Move time sampling part of the test into an IRAM function to
reduce variations due to cache behavior.

4. Remove calculation of "standard deviation" in the test, as what was
calculated was not actually standard deviation, and it did not add any
useful information.
2019-02-28 20:38:31 +08:00
Ivan Grokhotkov 7e16a79cf7 esp_timer: improve unit test robustness
1. call esp_timer_get_time and ref_clock_get in the same order on
   start and in the loop

2. disable interrupts when calculating delta between ref_clock
   and esp_timer

3. ensure both functions are in cache before calculating the delta
2019-02-28 20:38:31 +08:00
XiaXiaotian 34f1c208a8 esp32: modify WiFi Kconfig in order to achieve better compatility
and performance
2019-02-28 10:07:13 +08:00
Angus Gratton 56694fb4b6 cmake: Fix psram workaround compiler flag application
Previously, this compiler flag was not being applied
regardless of CONFIG_SPIRAM_CACHE_WORKAROUND setting.

Explanation: add_compile_options() only applies to
source files added after the function is run, or in
subdirectories added after the function is run. In
this case, no new source files were being added after
this function was run.
2019-02-27 16:38:29 +11:00
Angus Gratton bf28a1a27b psram: Move newlib qsort() and setlocale() functions from IRAM to flash 2019-02-21 10:32:00 +11:00
Angus Gratton b7beefba9e Merge branch 'bugfix/cmake_stack_protector_v3.2' into 'release/v3.2'
esp32: disable stack protector for startup code (CMake) (backport v3.2)

See merge request idf/esp-idf!4250
2019-02-20 15:40:14 +08:00
Angus Gratton a7f826750b Merge branch 'revert-00d10688' into 'release/v3.2'
Revert "Merge branch 'bugfix/external_rtc_start_fail_3.2' into 'release/v3.2'"

See merge request idf/esp-idf!4293
2019-02-20 15:09:59 +08:00
Angus Gratton 38086ae737 Merge branch 'bugfix/spiram_linker_wildcards_v3.2' into 'release/v3.2'
esp32 psram: Provide library name for ROM libc objects linked as PSRAM workarounds (backport v3.2)

See merge request idf/esp-idf!4153
2019-02-20 14:17:52 +08:00
Jiang Jiang Jian 6173660ff0 Merge branch 'bugfix/coex_lc_protect_v3.2' into 'release/v3.2'
component/esp32 : fix coexist lc protect cause memory corrupted

See merge request idf/esp-idf!4267
2019-02-20 11:14:22 +08:00
Angus Gratton 79b450cfb4 esp32 psram: Provide library name for ROM libc objects linked as PSRAM workarounds
Fixes bug reported on forums where any source file ending in *lock.c or *creat.c
was being linked to IRAM.

https://esp32.com/viewtopic.php?f=13&t=8909&p=37362#p37362
2019-02-20 00:30:25 +00:00
Jiang Jiang Jian c7fbc6dd85 Merge branch 'bugfix/wdt_compability_app_with_old_bootloader_v3.2' into 'release/v3.2'
esp32: Fix wdt settings in esp_restart_noos (backport v3.2)

See merge request idf/esp-idf!4294
2019-02-20 02:17:09 +08:00
Jiang Jiang Jian 3b5bba1812 Merge branch 'bugfix/fix_psram_eid_v3.2' into 'release/v3.2'
bugfix(psram): fix psram size acquisition method, support esp32-pico chips (backport v3.2)

See merge request idf/esp-idf!4254
2019-02-20 02:13:47 +08:00
Ivan Grokhotkov 509884c5ac Revert "Merge branch 'bugfix/external_rtc_start_fail_3.2' into 'release/v3.2'"
This reverts merge request !4272
2019-02-19 12:47:44 +08:00
Konstantin Kondrashov 8a656f006e esp32: Fix wdt settings in esp_restart_noos
Fixed compatibility the new apps with the old bootloaders.

Closes: https://github.com/espressif/esp-idf/issues/2927
2019-02-19 12:43:35 +08:00
Tian Hao 6d6f71bbae component/esp32 : fix coexist lc protect cause memory corrupted
The bug will cause memory corrupted (the largest range is from 0x3ffc0000 ~ 0x3ffc8000),
some strange error will happen, like IllegalInstruction, LoadProhibited and .etc.
2019-02-19 03:30:02 +00:00
baohongde 30f2371917 components/bt: Fix crash when inquiry stop (backport v3.2) 2019-02-18 08:15:17 +00:00
Ivan Grokhotkov 00d1068869 Merge branch 'bugfix/external_rtc_start_fail_3.2' into 'release/v3.2'
Bugfix/external rtc start fail (backport 3.2)

See merge request idf/esp-idf!4272
2019-02-15 17:51:49 +08:00
maojianxin 9a229f4077 soc/rtc: fix RTC_TOUCH_TRIG_EN or RTC_ULP_TRIG_EN should keep RTC_PERIPH power on 2019-02-15 10:58:14 +08:00
chenjianqiang 8f2e1471af bugfix(psram): made some modifcations to support the psram driver backport 2019-02-13 16:06:38 +08:00
chenjianqiang a159e58ead feature(psram): add psram support for esp32-pico chip
1. esp32-pico use standard spi driver to access psram
2. for esp32-pico, flash and psram share the clock
3. for esp32-pico, psram cs io can be overwrite via menuconfig
2019-02-13 14:27:44 +08:00
chenjianqiang fe767855df bugfix(psram): fix psram size acquisition method
1. Use BIT[7:5] of EID to determine psram size
2. Add ID support for 16Mbit psram
3. Remove module reset on SPI1
4. Confirmed with the vendor that only the old 32Mbit psram need special clock timing. For other psram chips, we should use standard QPI mode.
2019-02-13 14:24:20 +08:00
Ivan Grokhotkov 1e674fb4ed esp32: disable stack protector for startup code (CMake)
Files where stack protector is initialized should not be compiled with
stack protector enabled. This was done for Make but missing for CMake.

Fixes https://github.com/espressif/esp-idf/issues/2990.
2019-02-13 10:27:22 +08:00
Liu Zhi Fu 741f97da4e esp32: fix some WiFi bugs
Fix following WiFi bugs:
1. Fix a crash bug which is caused by WiFi static TX buffer alloc/free.
2. Fix the bug that iphone fails to connect to ESP32 AP by enabling AP BAR receiving.
3. Fix the bug that ESP32 station fails to connect some APs, such as Xiaomi hotspot etc,
   after reset.
2019-02-01 11:52:40 +08:00
qiyuexia 137810915c mesh: modify to malloc routing table 2019-01-31 13:46:50 +08:00
Jiang Jiang Jian bb766355b5 Merge branch 'bugfix/tw28445_wps_thread_safe_v3.2' into 'release/v3.2'
esp32: fix WPS thread-safe (backport v3.2)

See merge request idf/esp-idf!4195
2019-01-30 17:50:33 +08:00