Commit graph

1814 commits

Author SHA1 Message Date
Jiang Jiang Jian ebdcbe8c60 Merge branch 'doc/crc_apis_usage' into 'master'
Add CRC APIs usage

See merge request idf/esp-idf!4351
2019-03-01 10:03:03 +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
Jiang Jiang Jian d82c80a07b Merge branch 'bugfix/wifi_modify_wifi_kconfig' into 'master'
esp32: modify WiFi Kconfig in order to achieve better compatility and performance

See merge request idf/esp-idf!4164
2019-02-28 18:21:16 +08:00
XiaXiaotian ae69a8adc0 esp32: modify WiFi Kconfig in order to achieve better compatility
and performance
2019-02-28 16:57:56 +08:00
Konstantin Kondrashov 509e1264b9 efuse: Fix to pass CI tests 2019-02-28 07:31:29 +00:00
Konstantin Kondrashov ed179ade8d esp32: Add using efuse component 2019-02-28 07:31:29 +00:00
XiaXiaotian 34f1c208a8 esp32: modify WiFi Kconfig in order to achieve better compatility
and performance
2019-02-28 10:07:13 +08:00
zhangyanjiao 4ea4d4744c wifi:
1. make menuconfig can set the WiFi mgmt short buffer num
2. fix several scan bugs
2019-02-27 18:31:32 +08:00
Angus Gratton 42f64e9a93 Merge branch 'bugfix/tw28146_make_wifi_iram_optimization_configurable' into 'master'
esp32: make WiFi IRAM optimization configurable

See merge request idf/esp-idf!4037
2019-02-27 16:33:05 +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
Ivan Grokhotkov 37b55a5eb5 esp32: print ELF file SHA256 in panic handler 2019-02-27 13:30:25 +08:00
Ivan Grokhotkov ea52a19c00 build system: include SHA256 hash of ELF file into app_desc structure 2019-02-27 13:30:25 +08:00
Angus Gratton fab11e1cec Merge branch 'bugfix/cmake_psram_fix_flag' into 'master'
cmake: Fix psram workaround compiler flag application

See merge request idf/esp-idf!4335
2019-02-27 13:20:21 +08:00
Liu Zhi Fu 711173b3d6 esp32: make WiFi IRAM optimization configurable
With this feature, the WiFi IRAM optimization can be disabled/enabled via menuconfig.
2019-02-26 19:55:57 +08:00
jack 299e4ca716 Add CRC APIs usage 2019-02-26 18:12:14 +08:00
Angus Gratton da390618c2 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-26 04:07:51 +00:00
Ivan Grokhotkov d3724dc35d 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-26 02:01:29 +00:00
Ivan Grokhotkov 4ae2c4c282 Merge branch 'feature/coredump_improvements_refactoring' into 'master'
coredump: improvements, refactoring (separate FLASH and UART functionality)

See merge request idf/esp-idf!4207
2019-02-21 11:04:19 +08: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 40a55823a9 Merge branch 'feature/anti_rollback_efuse' into 'master'
Support anti-rollback

See merge request idf/esp-idf!3682
2019-02-20 16:11:00 +08: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 91f97d121f Merge branch 'revert-23a03cf6' into 'master'
Revert "Merge branch 'bugfix/external_rtc_start_fail' into 'master'"

See merge request idf/esp-idf!4292
2019-02-20 15:09:35 +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
Jiang Jiang Jian c960bcb5e6 Merge branch 'bugfix/coex_lc_protect' into 'master'
component/esp32 : fix coexist lc protect cause memory corrupted

See merge request idf/esp-idf!4265
2019-02-20 02:11:37 +08:00
Tian Hao 64b7b0f94c Reduce part of IRAM consumption in wifi libnet80211.a
It might be a little effect of WIFI max TX throughput if the limitation is cache hit rate
2019-02-19 15:43:56 +08:00
Angus Gratton 5b182eefc1 Merge branch 'bugfix/spiram_linker_wildcards' into 'master'
newlib: Provide library name for ROM libc object files linked as PSRAM workarounds

See merge request idf/esp-idf!4152
2019-02-19 13:28:10 +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
Ivan Grokhotkov dc133f9fc4 Revert "Merge branch 'bugfix/external_rtc_start_fail' into 'master'"
This reverts merge request !2441
2019-02-19 12:39:47 +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
Tian Hao 2cf4c02be9 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:28:47 +00:00
Angus Gratton 6538acc94f Merge branch 'bugfix/wdt_compability_app_with_old_bootloader' into 'master'
esp32: Fix wdt settings in esp_restart_noos

See merge request idf/esp-idf!4098
2019-02-19 10:42:33 +08:00
baohongde 30f2371917 components/bt: Fix crash when inquiry stop (backport v3.2) 2019-02-18 08:15:17 +00:00
Jiang Jiang Jian 2ce401c664 Merge branch 'bugfix/btdm_crash_when_inquiry_cancel' into 'master'
Bugfix/btdm crash when inquiry cancel

See merge request idf/esp-idf!4142
2019-02-16 16:27:49 +08: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
Jiang Jiang Jian 2c7f603a83 Merge branch 'bugfix/fix_some_wifi_bugs_0131' into 'master'
esp32: fix some wifi bugs

See merge request idf/esp-idf!4216
2019-02-15 12:14:41 +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
Konstantin Kondrashov e916cf52a3 bootloader: Add support of anti-rollback
Added:
* set a secure version in app/bootloader.
* description anti-rollback to ota part
* emulate the secure_version write and read operations
* efuse_em partition.
* a description about a rollback for native_ota_example.

Closes: TW26335
2019-02-14 18:51:43 +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
maojianxin 0676941332 soc/rtc: fix RTC_TOUCH_TRIG_EN or RTC_ULP_TRIG_EN should keep RTC_PERIPH power on 2019-02-13 10:30:37 +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
aleks 10fe158f67 coredump: improvements refactoring
Move existing core dump files into espcoredump component folder
Add KConfig, linker.lf, make and CMakeList.txt for new component
Existing functionality separated into core_dump_common, core_dump_flash, core_dump_uart
Update test_core_dump.c and make files to link it as unit test
Update according to review:
Move target and RTOS related functionality into separated file (core_dump_port.c).
2019-02-12 10:22:33 +00:00
Roland Dobai 80cb4a1a18 tools: Don't use backslashes in Kconfigs and ignore long lines to avoid errors
Closes https://github.com/espressif/esp-idf/issues/3012
2019-02-01 11:33:41 +01: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
Liu Zhi Fu de79835251 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:51:05 +08:00
qiyuexia 02d3170cce mesh: modify to malloc routing table 2019-01-31 17:46:11 +08:00
qiyuexia 137810915c mesh: modify to malloc routing table 2019-01-31 13:46:50 +08:00
baohongde 27235e023f components/bt: Fix crash when inquiry stop 2019-01-31 11:47:41 +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
Jiang Jiang Jian a0416e9351 Merge branch 'bugfix/tw28445_wps_thread_safe' into 'master'
Bugfix/tw28445 wps thread safe

See merge request idf/esp-idf!4175
2019-01-30 17:50:25 +08:00
Ivan Grokhotkov 024c568c73 Merge branch 'bugfix/cmake_stack_protector' into 'master'
esp32: disable stack protector for startup code (CMake)

See merge request idf/esp-idf!4198
2019-01-30 16:28:40 +08:00
Angus Gratton e585121011 Merge branch 'bugfix/backtrace_from_interrupts_backport_v3.2' into 'release/v3.2'
Make backtrace work across interrupts (backport v3.2)

See merge request idf/esp-idf!4183
2019-01-30 13:11:29 +08:00
Roland Dobai 37126d3451 Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01:00
Liu Zhi Fu 2a47c5c7a4 esp32: fix WPS thread-safe
Fix WPS thread-safe bug
2019-01-29 19:44:24 +08:00
Ivan Grokhotkov 70b14bf615 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-01-29 17:41:00 +08:00
Liu Zhi Fu fd57c4ee67 esp32: fix WPS thread-safe
Fix WPS thread-safe bug
2019-01-29 17:30:21 +08:00
XiaXiaotian eff24857bc esp32: update libphy.a to fix interrupt watchdog when WiFi and BT run at
the same time and both enable modem sleep
2019-01-29 11:05:15 +08:00
XiaXiaotian a2cec1f636 esp32: update libphy.a to fix interrupt watchdog when WiFi and BT run at
the same time and both enable modem sleep
2019-01-29 10:55:45 +08:00
Darian Leung bab80ad202 freertos: Make backtrace work across interrupts (backport v3.2)
This commit adds the ability for backtracing to trace from the itnerrupt to the
task stack, and across nested interrupts. Test cases have also been added.

See MR !4084
2019-01-29 02:22:04 +08:00
Ivan Grokhotkov 44b97b7fe7 Merge branch 'bugfix/backtrace_from_interrupts' into 'master'
Make backtrace work across interrupts

See merge request idf/esp-idf!4084
2019-01-28 16:40:12 +08:00
Darian Leung 96af064209 freertos: Make backtrace work across interrupts
This commit adds the ability for backtracing to trace from the itnerrupt to the
task stack, and across nested interrupts. Test cases have also been added.
2019-01-28 14:34:26 +08:00
Jiang Jiang Jian 9896f45c79 Merge branch 'mesh/bugfix_0124' into 'master'
mesh: udpate libs

See merge request idf/esp-idf!4155
2019-01-28 14:06:00 +08:00
Jiang Jiang Jian 76f0dda3a4 Merge branch 'mesh/bugfix_backport_v3.2' into 'release/v3.2'
Mesh/bugfix backport v3.2

See merge request idf/esp-idf!4117
2019-01-28 14:05:51 +08:00
qiyueixa 8c675a52a7 mesh: udpate libs
1. during parent selection, when scanning a MAP without ext-assoc IE, it will be handled as it has the same router BSSID as itself.
2. for MAP, when its client leaves, always post SYSTEM_EVENT_AP_STADISCONNECTED to mesh layer regardless of whether the client has passed the encrypted authentication or not.
2019-01-24 15:15:09 +08:00
Ivan Grokhotkov 2eabed161a Merge branch 'feature/merge_multiple_github_prs' into 'master'
Multiple Github PRs

See merge request idf/esp-idf!4146
2019-01-24 15:14:47 +08:00
Jiang Jiang Jian 55b8f2ea8c Merge branch 'bugfix/sha_ownership_v3.2' into 'release/v3.2'
hwcrypto sha: Allow SHA contexts to be shared between tasks (backport v3.2)

See merge request idf/esp-idf!4143
2019-01-24 14:08:35 +08:00
Jiang Jiang Jian 2dadc7d549 Merge branch 'bugfix/sha_ownership' into 'master'
hwcrypto sha: Allow SHA contexts to be shared between tasks

See merge request idf/esp-idf!4010
2019-01-24 14:07:23 +08:00
qiyueixa 26646b5b31 mesh: bugfix
1. fix network channel switch function.
2. support not configuring the network channel.
3. support not configuring the router BSSID even if the router is hidden.
4. add allow_channel_switch to mesh configuration.
5. add allow_router_switch to mesh router configuration.
6. support handling beacon without IE of DS Parameter Set.
7. fix Wi-Fi RX fails in a specific scenario (update libphy.a).
8. fix STAs can not detect disconnection from AP when encrypt transmission is used.
9. fix can not find hidden APs.
10. for root, modify the active scan time to 120ms.
11. remove all rc when clear parent Wi-Fi configuration.
12. fix memory leak caused by the remove announcement being sent is not released when esp_mesh_stop() is called.
13. fix modify IE encrypt after mesh is started.
14. ignore esp_mesh_connect() if mesh automatic reconnection is enabled.
15. fix reason is cleared before vote is done.
16. fix issues in the example of manual_networking when mesh network is encrypted.
17. detect and fix root conflicts when router BSSID is not set.
18. when root can not connect to the router due to NO_MORE_STAS(reason code:5), root will stop re-connection and perform MESH_NWK_LOOK_FOR_NETWORK.
19. wifi: fix the disconnection caused by receiving a deauth frame from non-parent node during scanning.
20. fix routing table redundant issue due to the remove announcement is not 100% reliable.
21. modify the max routes limitation from 300 to 1000.
22. wifi: fix ap does not deauth the sta which has not yet completed the 4-way handshake but the max replay count is reached.
2019-01-24 11:31:00 +08:00
Angus Gratton 7f307423c1 newlib: Provide library name for ROM libc object files linked as PSRAM workarounds
Works around 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

Also moves all related functionality to newlib component.
2019-01-24 11:30:05 +08:00
Jiang Jiang Jian 1ae9a2ae0b Merge branch 'bugfix/wifi_fix_invalid_csi_data_index_v3.2' into 'release/v3.2'
esp32: fix invalid channel state information(CSI) data index (backort v3.2)

See merge request idf/esp-idf!4129
2019-01-23 22:14:04 +08:00
Jiang Jiang Jian fcf1dba9cd Merge branch 'bugfix/init_memctl_v3.2' into 'release/v3.2'
bootloader, esp32: add workaround for Tensilica erratum 572 (backport v3.2)

See merge request idf/esp-idf!4134
2019-01-23 21:43:58 +08:00
Michael Reutman 02da4154a1 Add static qualifier to s_light_sleep_wakeup variable to prevent it from being global.
Closes https://github.com/espressif/esp-idf/pull/2793
2019-01-23 16:47:23 +05:30
Angus Gratton 94ed7b8298 hwcrypto sha: Use spinlocks instead of semaphores for small state changes
Significant performance improvement and smaller RAM footprint.
2019-01-23 18:18:13 +08:00
Angus Gratton 24fab0b7a9 hwcrypto sha: Allow SHA contexts to be shared between tasks
Previously, hardware SHA engine "locks" were mutex semaphores. This meant that the task which
started a particular SHA session (in hardware) needed to finalise that session, or an invalid
FreeRTOS state was created.

Replace with binary semaphore which can be shared between tasks.

Includes a unit test, but unit test doesn't crash even without this fix
(some other unknown condition is required).
2019-01-23 18:18:13 +08:00
Ivan Grokhotkov 42b6c4953d bootloader, esp32: add workaround for Tensilica erratum 572
If zero-overhead loop buffer is enabled, under certain rare conditions
when executing a zero-overhead loop, the CPU may attempt to execute an invalid instruction. Work around by disabling the buffer.
2019-01-23 16:23:56 +08:00
Angus Gratton f141b29328 hwcrypto sha: Use spinlocks instead of semaphores for small state changes
Significant performance improvement and smaller RAM footprint.
2019-01-23 04:59:44 +00:00
Angus Gratton f3277cf2dc hwcrypto sha: Allow SHA contexts to be shared between tasks
Previously, hardware SHA engine "locks" were mutex semaphores. This meant that the task which
started a particular SHA session (in hardware) needed to finalise that session, or an invalid
FreeRTOS state was created.

Replace with binary semaphore which can be shared between tasks.

Includes a unit test, but unit test doesn't crash even without this fix
(some other unknown condition is required).
2019-01-23 04:59:44 +00:00
XiaXiaotian 746e831c19 esp32: fix invalid channel state information(CSI) data index
Due to a hardware limitation in ESP32, the first four bytes of some
    CSI data is invalid, not the last four bytes.

    Correct a mistake of CSI sub-carrier index in documentation.
2019-01-22 20:30:05 +08:00
XiaXiaotian f3b72ef6aa esp32: fix invalid channel state information(CSI) data index
Due to a hardware limitation in ESP32, the first four bytes of some
    CSI data is invalid, not the last four bytes.

    Correct a mistake of CSI sub-carrier index in documentation.
2019-01-22 20:11:05 +08:00
Tian Hao 423fbf0006 Fix some bugs in phy
1. fix bug PHY/RTC functions called in ISR (update phy to v4007)
2. add UnitTest to test it
3. disable/enable agc to mac deinit/init
2019-01-16 22:41:17 +08:00
Tian Hao a953f73c64 Fix some bugs in phy
1. fix bug PHY/RTC functions called in ISR (update phy to v4007)
2. add UnitTest to test it
3. fix task watchdog bug when wifi change channel
4. disable/enable agc to mac deinit/init
2019-01-16 22:04:49 +08:00
Jiang Jiang Jian 83447cae90 Merge branch 'mesh/cs_root_conflict' into 'master'
detect and fix root conflicts when router BSSID is not set

See merge request idf/esp-idf!3869
2019-01-16 21:16:56 +08:00
Wang Jia Lin a62cbfec9a Merge branch 'bugfix/fix_psram_eid' into 'master'
bugfix(psram): fix psram size acquisition method, support esp32-pico chips

See merge request idf/esp-idf!3750
2019-01-15 17:44:51 +08:00
qiyuexia a05fdd9c10 mesh: update libs
1. detect and fix root conflicts when router BSSID is not set.
2. when root can not connect to the router due to NO_MORE_STAS(reason code:5), root will stop re-connection and perform MESH_NWK_LOOK_FOR_NETWORK.
3. wifi: fix the disconnection caused by receiving a deauth frame from non-parent node during scanning.
4. fix routing table redundant issue.
5. modify the max routes limitation from 300 to 1000.
6. wifi: fix ap does not deauth sta which has not completed the 4-way handshake.
2019-01-15 14:26:05 +08:00
jack a80bfc1dcf esp32: fix the incorrect tx complete state issue 2019-01-12 19:40:52 +08:00
Liu Zhi Fu 4b234b0805 esp32: fix the incorrect tx complete state issue 2019-01-12 09:39:59 +08:00
Liu Zhi Fu ca54a5ce2a esp32: fix wrongly deleting hardware BA index bug
Fix the bug that hardware BA index will be wrongly removed in
WiFi mode WIFI_MODE_APSTA.
2019-01-11 21:46:28 +08:00
Liu Zhi Fu 85f018edbc esp32: fix wrongly deleting hardware BA index bug
Fix the bug that hardware BA index will be wrongly removed in
WiFi mode WIFI_MODE_APSTA.
2019-01-11 16:31:01 +08:00
Konstantin Kondrashov 82c5e648ad 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-01-10 20:22:26 +08:00
He Yin Ling 7c59207351 test: add test to check wifi conneciton between sta and softap 2019-01-10 09:51:17 +00:00
XiaXiaotian f0a6432717 esp32: do defragmentation only for data and management frame
Check frame type before defragmentation. Only data and management frame
    can do defragmentation.
2019-01-10 14:17:21 +08:00
Jiang Jiang Jian c18e86a826 Merge branch 'bugfix/coex_unforce_wifi_if_no_data_buffered_in_beacon_v3.2' into 'release/v3.2'
esp32: unforce wifi if receiving beacon with no data buffered in dream (backport v3.2)

See merge request idf/esp-idf!4036
2019-01-10 14:11:02 +08:00
Jiang Jiang Jian b5d53a0eff Merge branch 'bugfix/timer_delete_dispatch_race_v3.2' into 'release/v3.2'
esp_timer: do not allow deleting timers while callbacks are dispatched (backport v3.2)

See merge request idf/esp-idf!4062
2019-01-10 13:44:15 +08:00
Jiang Jiang Jian 097597b978 Merge branch 'bugfix/wifi_defragmentation_only_for_data_frame' into 'master'
esp32: do defragmentation only for data and management frame

See merge request idf/esp-idf!4072
2019-01-09 15:54:05 +08:00
XiaXiaotian 10afc3de77 esp32: unforce wifi if receiving beacon with no data buffered in dream
state and reduce force receiving broadcast data time

    1. If receiving beacon which indicates that there is no data buffered,
    do not force to receive WiFi data.
    2. If receiving beacon which indicates that there is broadcast data
    buffered, reduce the time to force receiving broadcast data.
2019-01-09 14:13:08 +08:00
chenjianqiang bd8733f74f 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-01-09 10:49:07 +08:00
Ivan Grokhotkov 456efd3d57 Merge branch 'bugfix/timer_delete_dispatch_race' into 'master'
esp_timer: fix race between deleting the timer and executing the callback

See merge request idf/esp-idf!3992
2019-01-08 14:06:46 +08:00
XiaXiaotian 1a492f0715 esp32: do defragmentation only for data and management frame
Check frame type before defragmentation. Only data and management frame can do
    defragmentation.
2019-01-07 20:38:16 +08:00
zhangyanjiao b80eba8d5a wifi: fix the bug that STA can scan the channel out of the country regdomain range 2019-01-04 14:34:36 +08:00
zhangyanjiao 2d5e9d765f wifi: fix the bug that STA can scan the channel out of the country regdomain range 2019-01-03 17:55:06 +08:00
Ivan Grokhotkov 227f8daef3 esp_timer: do not allow deleting timers while callbacks are dispatched
timer_process_alarm function of esp_timer holds a spinlock for the
entire duration of its operation, except for the time when timer
callback function is called. It is possible that when
timer_process_alarm releases the spinlock, a higher priority task may
run and delete the timer. Then the execution will return to
timer_process_alarm, and this will either cause a crash, or undesired
execution of callback after the timer has been stopped or deleted.

To solve this problem, add a mutex which will prevent deletion of timers
while callbacks are being dispatched.
2019-01-03 07:14:53 +00:00
Ivan Grokhotkov 31b7db5c38 esp_timer: do not allow deleting timers while callbacks are dispatched
timer_process_alarm function of esp_timer holds a spinlock for the
entire duration of its operation, except for the time when timer
callback function is called. It is possible that when
timer_process_alarm releases the spinlock, a higher priority task may
run and delete the timer. Then the execution will return to
timer_process_alarm, and this will either cause a crash, or undesired
execution of callback after the timer has been stopped or deleted.

To solve this problem, add a mutex which will prevent deletion of timers
while callbacks are being dispatched.
2019-01-02 20:06:06 +11:00
Angus Gratton 4a42827c4a esp32: esp_attr.h should include sdkconfig.h
Reported on forum https://esp32.com/viewtopic.php?f=13&t=8669#p36395
2019-01-02 17:04:53 +11:00
XiaXiaotian 36c956070b esp32: unforce wifi if receiving beacon with no data buffered in dream
state and reduce force receiving broadcast data time

    1. If receiving beacon which indicates that there is no data buffered,
    do not force to receive WiFi data.
    2. If receiving beacon which indicates that there is broadcast data
    buffered, reduce the time to force receiving broadcast data.
2018-12-28 17:09:45 +08:00
qiyueixa e3833999ea mesh: update libs
1. when no parent is found, send probe request via broadcast.
2. fix memory leak caused by the remove announcement being sent is not released when esp_mesh_stop() is called.
3. fix modify IE encrypt after mesh is started.
4. ignore esp_mesh_connect() if mesh automatic reconnection is enabled.
5. fix reason is cleared before vote is done.
2018-12-26 16:10:55 +08:00
qiyueixa 84277e5887 mesh: when no parent is found, send probe request via broadcast
1. fix error in checking Wi-Fi commit ID.
2018-12-21 17:49:58 +08:00
Jiang Jiang Jian 1f794cfff1 Merge branch 'mesh/bugfix_v3.3' into 'master'
wifi: fix STAs can not detect disconnection from AP when encrypt transmission is used

See merge request idf/esp-idf!3907
2018-12-21 17:27:11 +08:00
Angus Gratton aa0d2078b7 psram: Use 8-bit type for _ext_ram_bss_start/_ext_ram_bss_end
Fixes pointer arithmetic when printing size of remaining heap
2018-12-21 19:03:12 +11:00
Angus Gratton 46228db9a8 linker external bss: Align end of ext bss to word boundary
TW27954
2018-12-21 19:03:12 +11:00
Ivan Grokhotkov 75ef4b2242 Merge branch 'bugfix/ext_ram_bss_align' into 'master'
Fix crash if ext_ram_bss is unaligned length

See merge request idf/esp-idf!4000
2018-12-21 12:06:58 +08:00
Angus Gratton 78487123bf Merge branch 'feature/cut_len_for_header_struct' into 'master'
build: Add trimming PROJECT_VER and PROJECT_NAME vars

See merge request idf/esp-idf!3927
2018-12-21 07:45:22 +08:00
qiyueixa ed8c5a18cb mesh: update libs
1. fix STAs can not detect disconnection from AP when encrypt transmission is used.
2. fix can not find hidden APs.
3. for root, modify the active scan time to 120ms.
4. remove all rc when clear parent Wi-Fi configuration.
5. fix error in checking Wi-Fi commit ID.
2018-12-20 12:11:30 +08:00
Angus Gratton e1a1c7f17c psram: Use 8-bit type for _ext_ram_bss_start/_ext_ram_bss_end
Fixes pointer arithmetic when printing size of remaining heap
2018-12-20 01:40:05 +00:00
Angus Gratton db243d092c linker external bss: Align end of ext bss to word boundary
TW27954
2018-12-20 01:40:05 +00:00
Jiang Jiang Jian 14d7a63459 Merge branch 'bugfix/wifi_rx_fail' into 'master'
wifi: fix wifi rx fails

See merge request idf/esp-idf!3976
2018-12-19 19:12:36 +08:00
Angus Gratton d453cce1b3 Merge branch 'bugfix/individual_custom_sections' into 'master'
linker: When using section type attributes, create unique sections

See merge request idf/esp-idf!3920
2018-12-19 15:18:26 +08:00
Angus Gratton ad200227d2 Merge branch 'feature/add_rollback_flags' into 'master'
bootloader/app_update: Add a support of an app rollback.

See merge request idf/esp-idf!3547
2018-12-19 14:28:11 +08:00
Angus Gratton 769bd4a4af linker: When using section type attributes, create unique sections
* Prevents section type conflict errors if (say) const & non-const data
  is put into the same section (ie with DRAM_ATTR)

* Allows linker --gc-sections to remove unused custom sections
2018-12-19 04:42:04 +00:00
qiyueixa 2b83460814 wifi: fix wifi rx fails
1. add MAC reset.
2. update libphy.a from 4000 to 4006.
2018-12-18 23:39:54 +08:00
Konstantin Kondrashov 51133083f6 app_update: Add EXCLUDE option
Added two options for PROJECT_NAME and PROJECT_VER variables to exclude them from the firmware image.

Closes: https://github.com/espressif/esp-idf/issues/2803
2018-12-18 15:58:47 +08:00
kooho e22c0cce45 driver(timer_group): fixed bug that init hw_timer caused cresh after system soft reset
closes https://github.com/espressif/esp-idf/issues/2756
2018-12-18 13:10:15 +08:00
Liu Zhi Fu cb650382ca 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:52:40 +08:00
Liu Zhi Fu b3380b79d1 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:33:31 +08:00
wangmengyang 8de9149b11 component/bt: bugfix of bluetooth modem sleep not being able to work with Dynamic Frequency Scaling
1. start an esp_timer on entering sleep to acquire pm_lock before wake up from modem sleep
2. decrease the clock division of XTAL fed to bluetooth low power clock from 32us to 2us period to allow to work under 240MHz Max CPU frequency
3. decrease the minimum sleep duration threshold to allow shorter bluetooth modem sleep period, especially for BLE with short connection interval
4. reconfigure bluetooth baseband(BT-BB) settings after PHY/RF init upon waking up from modem sleep to avoid packet RX/TX performance degradation
2018-12-14 14:56:29 +08:00
Jiang Jiang Jian 6cb37ecc57 Merge branch 'bugfix/btdm_modem_sleep_cowork_with_DFS' into 'master'
bugfix/btdm_modem_sleep_cowork_with_DFS

See merge request idf/esp-idf!3797
2018-12-14 14:03:56 +08:00
Jiang Jiang Jian 24ebdbd3f4 Merge branch 'test/add_case_to_detect_ds2ds_issue_v3.2' into 'release/v3.2'
test: add case to detect ds2ds issue (backport v3.2)

See merge request idf/esp-idf!3851
2018-12-13 14:52:58 +08:00
Jiang Jiang Jian d75ab3208f Merge branch 'test/add_case_to_detect_ds2ds_issue' into 'master'
test: add case to detect ds2ds issue

See merge request idf/esp-idf!3834
2018-12-13 14:49:30 +08:00
Ivan Grokhotkov ade85cc850 panic: dump some instruction memory on IllegalInstruction exception 2018-12-12 11:58:55 +08:00
wangmengyang 59f34461d7 component/bt: bugfix of bluetooth modem sleep not being able to work with Dynamic Frequency Scaling
1. start an esp_timer on entering sleep to acquire pm_lock before wake up from modem sleep
2. decrease the clock division of XTAL fed to bluetooth low power clock from 32us to 2us period to allow to work under 240MHz Max CPU frequency
3. decrease the minimum sleep duration threshold to allow shorter bluetooth modem sleep period, especially for BLE with short connection interval
4. reconfigure bluetooth baseband(BT-BB) settings after PHY/RF init upon waking up from modem sleep to avoid packet RX/TX performance degradation
2018-12-11 16:49:01 +08:00
Konstantin Kondrashov dde1fd9b94 bootloader: Add support flags for rollback app
Added
* Set actual ota_seq if both ota are init or incorrect.
* Description of rollback
* UT tests

Closes TW15459
2018-12-11 11:54:21 +08:00
Anton Maklakov 81bf07ed4d test: Fix some unused identifier warnings 2018-12-10 12:34:16 +08:00
Ivan Grokhotkov 04c511c9b5 panic: dump some instruction memory on IllegalInstruction exception 2018-12-07 16:50:00 +08:00
Konstantin Kondrashov d4cb14bc65 app_update: Fix esp_app_desc unused var for Cmake 2018-12-07 12:04:40 +08:00
He Yin Ling 6b5649190f test: add test case to receive ds2ds packet 2018-12-07 02:04:55 +00:00
Jiang Jiang Jian eb27686416 Merge branch 'bugfix/btdm_bugs_caused_by_coex' into 'master'
component/bt and esp32:  fix two bluetooth bugs that caused by coexist module

See merge request idf/esp-idf!3860
2018-12-05 14:17:14 +08:00
Tian Hao a9429ee5da 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 19:41:43 +08:00
Tian Hao 2d67ce3109 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 19:30:28 +08:00
Konstantin Kondrashov 3b9cb25fe1 esp32: Add firmware version to app
Added a new structure esp_app_desc_t. It has info about firmware:
version, secure_version, project_name, time/date build and IDF version.
Added the ability to add a custom structure with a description of the firmware.

The esp_app_desc_t is located in fixed place in start of ROM secotor. It is located after structures esp_image_header_t and esp_image_segment_header_t.

app_version is filed from PROJECT_VER variable (if set in custom make file) or PROJECT_PATH/version.txt or git repo (git describe).

Add API to get app_desc from partition.
2018-12-03 16:52:04 +08:00
Jiang Jiang Jian e07c5a22f2 Merge branch 'doc/RF_calibration' into 'master'
doc: add documentation for RF calibration

See merge request idf/esp-idf!3828
2018-11-30 21:50:29 +08:00
Xia Xiaotian 59761b0fcb doc: add documentation for RF calibration
Add an API to erase phy namespace of NVS
2018-11-30 16:26:56 +08:00
zhangyanjiao e621e0af8b wifi: add code for setting wifi log level and module 2018-11-30 15:24:22 +08:00