Commit graph

1848 commits

Author SHA1 Message Date
Ivan Grokhotkov
b1d1e37f87 event loop: re-implement based on esp_event library
Includes ds2ds unit test fix, iperf example test fix
2019-04-11 12:04:58 +08:00
Wangjialin
448d32bc53 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-09 11:24:10 +08:00
Renz Christian Bagaporo
90ee405afd ldgen: update component linker fragment files 2019-04-04 15:57:34 +08:00
morris
f5b03c9ea3 misc adjustment of esp32 component 2019-04-03 19:57:46 +08:00
Ivan Grokhotkov
43d3e75125 Merge branch 'feature/derive_esp_wifi_from_esp32' into 'master'
derive esp_wifi from esp32 component

See merge request idf/esp-idf!4602
2019-04-02 10:13:15 +08:00
Angus Gratton
ae585b6615 Merge branch 'bugfix/external_rtc_start_fail' into 'master'
Bugfix/external rtc start fail

See merge request idf/esp-idf!4374
2019-04-02 09:42:27 +08:00
morris
79bb5de426 derive esp_wifi from esp32 component 2019-04-01 20:04:52 +08:00
zhangyanjiao
b13ceaf468 wifi: increase the block scan time because of changing channel will take at 30nm when BT/WiFi coexist 2019-04-01 03:12:20 +00:00
morris
dbdb299bb1 create xtensa component
1. move xtensa specific files out of esp32 component
2. merge xtensa-debug-module component into xtensa
2019-03-27 20:24:28 +08:00
Ivan Grokhotkov
18946a5421 Merge branch 'feature/common_parts_into_esp_common' into 'master'
move common include files from esp32 into esp_common

See merge request idf/esp-idf!4515
2019-03-27 17:00:58 +08:00
Jiang Jiang Jian
21f6b4d6c3 Merge branch 'bugfix/modify_wifi_reason_code' into 'master'
wifi: modify wifi reason code

Closes WIFI-268 and WIFI-388

See merge request idf/esp-idf!4604
2019-03-27 16:50:35 +08:00
morris
709a320f33 move hwcrypto from esp32 to mbedtls 2019-03-26 16:24:22 +08:00
morris
a2f07b0806 move common include files from esp32 into esp_common 2019-03-26 11:57:03 +08:00
zhangyanjiao
ebe7190f01 wifi: modify wifi reason code 2019-03-26 11:16:47 +08:00
Jiang Jiang Jian
c2d1f83bce Merge branch 'mesh/decouple_addition' into 'master'
wifi: decouple mesh functions from net80211

See merge request idf/esp-idf!4393
2019-03-22 12:57:03 +08:00
Angus Gratton
1be147c457 Merge branch 'feature/allow_components_to_declare_images_to_flash' into 'master'
Allow components to present their own images to flash

See merge request idf/esp-idf!4148
2019-03-22 11:14:37 +08:00
morris
fcedf442ce move common source files from esp32 to esp_common 2019-03-22 10:35:03 +08:00
morris
c159984264 separate rom from esp32 component to esp_rom
1. separate rom include files and linkscript to esp_rom
2. modefiy "include rom/xxx.h" to "include esp32/rom/xxx.h"
3. Forward compatible
4. update mqtt
2019-03-21 18:51:45 +08:00
Ivan Grokhotkov
106dc05903 Merge branch 'feature/specify_includes_belonging_esp32' into 'master'
move esp32 chip specific includes to esp32/xxx.h

See merge request idf/esp-idf!4534
2019-03-21 18:34:08 +08:00
Ivan Grokhotkov
ce07a1057c Merge branch 'feature/make-debug-verbose-usable' into 'master'
logs: Make verbose and debug logging cleaner

Closes IDFGH-782

See merge request idf/esp-idf!4578
2019-03-21 18:29:50 +08:00
Hanh Tran
e5e41e0a5e Fix comment typos in WiFi types header
Merges https://github.com/espressif/esp-idf/pull/3145
2019-03-21 15:06:24 +08:00
Anuj Deshpande
13cf867023 logs: Make verbose and debug logging cleaner
* Closes #3193
* Closes IDFGH-782

The logs that are deleted in this commit make debug and verbose mode
unusable.
2019-03-21 11:54:04 +05:30
Angus Gratton
25043c4d56 Merge branch 'feature/merge_flash_data_type-flash_partitions' into 'master'
merge esp_flash_data_types into esp_flash_partitions

See merge request idf/esp-idf!4504
2019-03-21 13:40:40 +08:00
maojianxin
95301c16bd Fix external start fail 2019-03-20 18:34:01 +08:00
chenyudong
b2b0f75fbb Decouple Wifi and ESP-Mesh to reduce bin size
Do not link mesh code when mesh is not used
2019-03-20 15:17:03 +08:00
Jiang Jiang Jian
d31a137f9c Merge branch 'bugfix/mesh_memory_leak' into 'master'
mesh: fix memory leak and group send

See merge request idf/esp-idf!4438
2019-03-20 14:57:05 +08:00
Anton Maklakov
886d8a6f28 Merge branch 'bugfix/newlib_misc_cleanups' into 'master'
newlib: minor cleanup

See merge request idf/esp-idf!4550
2019-03-20 11:08:20 +08:00
Ivan Grokhotkov
068b700786 newlib: remove usage of pre-ANSI defines 2019-03-19 22:15:26 +08:00
morris
fd9bc30aca separate legacy esp_event from esp32 component to esp_event 2019-03-18 19:58:04 +08:00
morris
956c25dedd move esp32 chip specific includes to esp32/xxx.h 2019-03-18 17:14:05 +08:00
morris
fae39dc326 merge esp_flash_data_types into esp_flash_partitions 2019-03-18 08:51:55 +00:00
chenyudong
7d96b3442a 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-03-18 14:43:21 +08:00
Renz Christian Bagaporo
234de8de55 cmake: Allow components to present their own images to flash 2019-03-18 03:45:22 +08:00
zhangyanjiao
6408ef9e7c wifi: fix the bug that when call set_config before connecting to an encrypted AP, PMK will be recalculated
Closes https://github.com/espressif/esp-idf/issues/2880
2019-03-15 16:28:58 +08:00
Jiang Jiang Jian
b1a81e8167 Merge branch 'bugfix/bb_watchdog_reset' into 'master'
esp32: add WiFi baseband watchdog reset

See merge request idf/esp-idf!4409
2019-03-15 16:12:30 +08:00
Angus Gratton
cc9b06d4da Merge branch 'bugfix/esp_sha_signing_sha256' into 'master'
secure boot: Fix esp_sha INT WDT, switch to using mbedTLS API

Closes IDFGH-681

See merge request idf/esp-idf!4440
2019-03-15 14:35:38 +08:00
Ivan Grokhotkov
416b756ea4 Merge branch 'bugfix/name_conflict_esp32_project_ld' into 'master'
esp32: Rename esp32.common.ld to esp32.project.ld to avoid build errors when downgrading

See merge request idf/esp-idf!4484
2019-03-15 11:42:20 +08:00
Angus Gratton
12bdf8e45b esp32: Chunk input blocks for esp_sha() function performance, add perf test 2019-03-14 05:56:06 +00:00
Angus Gratton
6a6fbde83d 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-03-14 05:56:06 +00:00
Angus Gratton
a79c5b8271 esp32: Rename esp32.common.ld to esp32.project.ld to avoid build errors when downgrading
Linker script generator produces build/esp32/esp32.common.ld from
components/esp32/ld/esp32.common.ld.in

This works fine until IDF is downgraded to V3.1 which uses components/esp32/ld/esp32.common.ld and
doesn't track build/esp32/esp32.common.ld at all.

At this point, the linker runs in the build/esp32 directory and "-T esp32.common.ld" picks up the
linker script generated .ld file, which causes mis-builds.

As reported on forums: https://esp32.com/viewtopic.php?f=13&t=9684&p=40105
2019-03-14 09:59:31 +11:00
Angus Gratton
fa5bc5d58b Merge branch 'bugfix/ssid_passwords_null_terminated' into 'master'
wifi: Specify that SSID & Password fields should be NULL terminated strings

See merge request idf/esp-idf!4468
2019-03-13 13:29:09 +08:00
Angus Gratton
710bcbd447 Merge branch 'feature/freertos_check_mutex_owner' into 'master'
freertos: check that mutex is released by owner task

See merge request idf/esp-idf!4012
2019-03-13 13:15:34 +08:00
Angus Gratton
f44dcf4878 Merge branch 'bugfix/macros_trailing_semicolon' into 'master'
Remove trialing semicolon from function-like macros

See merge request idf/esp-idf!4397
2019-03-13 13:15:12 +08:00
Angus Gratton
8120efc6ed Merge branch 'bugfix/modify_dhcpserver_and_tcpip_adapter' into 'master'
modify the behavior for dhcpserver and tcpip_adapter

Closes IDFGH-557 and IDFGH-563

See merge request idf/esp-idf!4453
2019-03-13 12:54:55 +08:00
Liu Zhi Fu
674d234283 esp32: add WiFi baseband watchdog reset
When WiFi enter into a special status (11b weak mode), then reset
Wifi baseband to recover to normal mode.
2019-03-13 11:09:30 +08:00
Angus Gratton
79d37b75f3 wifi: Specify that SSID & Password fields should be NULL terminated strings
Closes https://github.com/espressif/esp-idf/issues/1176
2019-03-13 11:44:41 +11:00
Ivan Grokhotkov
d539183b40 esp32: use binary semaphore instead of mutex in dport tests 2019-03-11 14:40:54 +00:00
zhangyanjiao
27cc0d1f91 modify the behavior for dhcpserver and tcpip_adapter:
1. dhcp_server: suppress send_offer debug output
2. tcpip_adapter: zero-initialize system_event_t structures
3. tcpip_adapter: pass client IP address along with SYSTEM_EVENT_AP_STAIPASSIGNED

Closes https://github.com/espressif/esp-idf/issues/2924
Closes https://github.com/espressif/esp-idf/issues/2949
2019-03-11 12:11:05 +08:00
aleks
13e1c0b32f esp32: coredump header (fix linker.lf)
remove duplicated include from components/esp32/incliude/esp_core_dump.h
espcoredump/incliude/esp_core_dump.h:
fix signature of the functions esp_core_dump_to_uart() and esp_core_dump_to_uart();
add espcoredump into COMPONENT_PRIV_REQUIRES list
fix linker.lf file
2019-03-08 09:49:37 +00:00
Ivan Grokhotkov
42c906140e Merge branch 'bugfix/level5_intr_alloc' into 'master'
esp32: esp_intr_alloc: Fixed issue with level 5 not being called

Closes IDFGH-616

See merge request idf/esp-idf!4405
2019-03-06 11:18:36 +08:00
Ivan Grokhotkov
d474018725 Merge branch 'feature/gdbstub_task_list' into 'master'
Add support for listing tasks to gdb in gdbstub

Closes IDFGH-498

See merge request idf/esp-idf!4357
2019-03-06 11:12:46 +08:00
Ivan Grokhotkov
c22e572ad0 gdbstub: minor cleanup
1. Add Kconfig options to control task listing support.
2. Convert magic values (-1, -2) to named constants.
3. Convert spaces to tabs to match the rest of the file.
4. Rename getAllTasksHandle to getTaskInfo to reflect its purpose.
5. Add some curly braces for single line statements.
2019-03-05 12:11:45 +08:00
X-Ryl669
b797f05558 Add support for listing tasks to gdb in gdbstub
…and changing the active task and fetching each task's stack

Merges https://github.com/espressif/esp-idf/pull/2828
2019-03-05 12:00:22 +08:00
XiaXiaotian
b9b401ee39 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-03-05 10:38:14 +08:00
Christian Hoene
025deab4d2 esp32: esp_intr_alloc: Fixed issue with level 5 not being called
Closes https://github.com/espressif/esp-idf/issues/3039
Merges https://github.com/espressif/esp-idf/issues/3040
2019-03-01 17:11:51 +11:00
Liu Zhi Fu
2f547ca7c8 esp32: fix some WiFi bugs
Fix following WiFi bugs:
1. Fix the bug that STA incorrectly deletes BA when receiving DelBA request
2. Add out of memory check
3. Fix the bug that STA incorrectly receives packets when scanning in connected status
2019-03-01 11:25:36 +08:00
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
Darian Leung
59d1ecc78b esp32: Remove trialing semicolon from function-like macros
This commit removes trailing semicolons following a while(0) from
function-like macros in IDF. This will force those macros to be called
with a semicolon when called.
2019-02-28 21:58:47 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
baohongde
27235e023f components/bt: Fix crash when inquiry stop 2019-01-31 11:47:41 +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
Roland Dobai
37126d3451 Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01: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
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
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
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
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
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
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
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
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
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
Liu Zhi Fu
4b234b0805 esp32: fix the incorrect tx complete state issue 2019-01-12 09:39:59 +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
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
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
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
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
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
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
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
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
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
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
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
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
He Yin Ling
582e89eca3 test: add test case to receive ds2ds packet 2018-11-29 23:06:16 +08:00
Jiang Jiang Jian
a134141320 Merge branch 'mesh/feature_channel_switch' into 'master'
mesh: add channel switch function

See merge request idf/esp-idf!3772
2018-11-28 20:11:38 +08:00
chenjianqiang
a0beff99d2 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.
2018-11-28 17:05:37 +08:00
qiyuexia
1692896e5e mesh: add channel switch function
1. add network channel switch function.
   - users can obtain the new channel through the event MESH_EVENT_CHANNEL_SWITCH.
   - the entire network will be moved to the same channel as the router without user intervention.
   - if no router is in the network, users can call esp_mesh_switch_channel() on the root side to
     move the entire network to their desired channel.
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.
   - if the channel is not specified, this value will be ignored.
   - if the channel is specified and this value is set, when "fail" (mesh_attempts_t) times of parent selection
     or look for networks are reached, device will change to perform a full channel scan for networks that could join.
   - if the channel is specified and this value is set to 0, when a root is not elected, channel switch is not allowed.
     but when a root appears, the root performs a full channel scan during the process of connecting to the router,
     so even allow_channel_switch is set to 0, the root may still switch channel and eventually the entire network
    changes channel.
5. add allow_router_switch to mesh router configuration.
   - if the BSSID of router is not specified, this value will be ignored.
   - if the BSSID of router is specified and this value is set, when the router of this specified BSSID fails to be found
     after "fail" (mesh_attempts_t) times, the entire network is allowed to switch to another router with the same SSID.
6. modify the root to perform a full channel scan when esp_wifi_connect().
7. support handling beacon without DS Paramter Set.
2018-11-27 23:36:01 +08:00
Renz Christian Bagaporo
37d30c7a6e cmake: separate app from idf lib project
mbedtls: import mbedtls using unmodified cmake file
2018-11-27 13:59:24 +08:00
Ivan Grokhotkov
5aa7abb216 Merge branch 'bugfix/spiram_80m_clk_config' into 'master'
clk: fix regression in clock setting for SPIRAM with 80MHz config

See merge request idf/esp-idf!3724
2018-11-25 22:25:19 +08:00
Liu Zhi Fu
f874b52f0a 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-23 05:41:41 +00:00
qiyueixa
6c3b5ae5a1 mesh: bugfix
1. fix failture of mesh stop caused by block-sending.
2. fix when FIXED_ROOT is set, 2nd layer devices can not receive mesh event ESP_ERR_MESH_NO_PARENT_FOUND.
3. fix when FIXED_ROOT is set and the root turns off mesh function, 2nd layer devices do not look for new parents.
4. add APIs esp_mesh_disconnect() and esp_mesh_connect().
5. disconnect from parent/router when the DSSS channel in received beacon is different from the home channel.
6. remove nvs task to release 3k bytes memory.
2018-11-21 19:13:41 +08:00
Jiang Jiang Jian
e7f9e3f6f6 Merge branch 'bugfix/add_connected_event_after_softap_finish_4_way' into 'master'
wifi: add connected event after softap finish 4 way

See merge request idf/esp-idf!3661
2018-11-20 20:04:12 +08:00
Ivan Grokhotkov
8027adaf81 esp32, mbedtls: check component name when enabling test flags
Otherwise flags get enabled even when building tests for other components.
2018-11-20 01:27:24 +08:00
Mahavir Jain
62efef0444 test: spiram: fix and enable test cases for default configuration 2018-11-19 22:40:14 +05:30
Ivan Grokhotkov
00a13bd8d3 Merge branch 'bugfix/init_memctl' into 'master'
bootloader, esp32: add workaround for Tensilica erratum 572

See merge request idf/esp-idf!3605
2018-11-19 18:36:47 +08:00
Ivan Grokhotkov
a46b884a14 Merge branch 'feature/unit_test_example' into 'master'
Move Unity into components, add unit test example

See merge request idf/esp-idf!3562
2018-11-19 18:35:54 +08:00
Angus Gratton
8915f48208 Merge branch 'feature/linker_script_generator' into 'master'
Linker script generator

See merge request idf/esp-idf!2286
2018-11-19 12:43:27 +08:00
Ivan Grokhotkov
964f5a91f7 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.
2018-11-19 04:39:35 +00:00
Ivan Grokhotkov
6091021e83 unity: separate common and IDF specific functionality
New unity component can be used for testing other applications.
Upstream version of Unity is included as a submodule.
Utilities specific to ESP-IDF unit tests (partitions, leak checking
setup/teardown functions, etc) are kept only in unit-test-app.
Kconfig options are added to allow disabling certain Unity features.
2018-11-19 12:36:31 +08:00
Ivan Grokhotkov
5fb3d59a92 esp32: fix typos in rom/uart.h 2018-11-19 12:36:31 +08:00
Deng Xin
5b4e3da759 wifi: add connected event after softap finish 4 way
Background

Softap will send connected event after receive assoc request as before, however, STA didn't connect to softAP if need security. As our mesh design, it will send data packet after receive connected event, so change the current behavior, softAP will send connected event if have encryption
2018-11-19 11:24:42 +08:00
Jiang Jiang Jian
26bcb7f2cf Merge branch 'bugfix/wifi_sta_sniffer_phy_config_bug' into 'master'
wifi: fix wifi sta and sniffer phy config bug

See merge request idf/esp-idf!3566
2018-11-19 10:11:23 +08:00
Mahavir Jain
e3956787f6 clk: fix regression in clock setting for SPIRAM with 80MHz config
Support for HSPI to output clock for 4M SPIRAM introduced regression
in clock configuration affecting SPIRAM access with 80MHz clock. This
commit fixes the issue.
2018-11-17 00:08:20 +05:30
Ivan Grokhotkov
96f152341a 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
2018-11-16 12:00:39 +00:00
zhangyanjiao
8be8ea2488 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 again.

Closes: https://github.com/espressif/esp-idf/issues/2545
2018-11-16 11:16:37 +00:00
Renz Bagaporo
63411fc556 tools: implement linker script generation 2018-11-16 12:42:02 +08:00
Ivan Grokhotkov
7b86247428 unit-test: use TEST_GROUPS to filter tests for psram_vspi and psram_hspi 2018-11-15 12:27:05 +00:00
Alexey Gerenkov
76e02cadcc esp32: Adds support for core dump format version 2018-11-15 06:13:48 +00:00
Alexey Gerenkov
181a40ae30 esp32: Adds menuconfig option for max tasks number in core dump 2018-11-15 06:13:48 +00:00
Alexey Gerenkov
30e766ee6b esp32: Core dump API to retrieve current core data layout in flash 2018-11-15 06:13:48 +00:00
Alexey Gerenkov
a55cc99f50 esp32: Replaces magic numbers with CRC for core dump in flash 2018-11-15 06:13:48 +00:00
Ivan Grokhotkov
7efb3926c5 Merge branch 'feature/build_system_multi_target' into 'master'
build system: support for multiple targets (CMake only)

See merge request idf/esp-idf!3499
2018-11-12 15:30:36 +08:00
Ivan Grokhotkov
ccfa134533 build system: support for multiple targets 2018-11-11 21:46:02 +08:00
zwj
baf57b9702 component/bt: add vendor hci cmd 2018-11-09 14:39:04 +08:00
Jiang Jiang Jian
05838641ff Merge branch 'bugfix/mesh_start_stop' into 'master'
mesh: update libs

See merge request idf/esp-idf!3569
2018-11-07 14:29:27 +08:00
qiyuexia
2d34a93dc4 mesh: update libs
1. fix ap_loss that occurs when the parent turns off the mesh function and becomes a normal WiFi with a different SSID.
2. add an event MESH_EVENT_NETWORK_STATE that contains information about whether there is a root in the current network.
3. modify the mechanism of mesh IE update.
4. fix a problem in the process of re-voting to select the root, the device that does not meet the conditions of being a root votes for itself.
5. fix an issue that occurs in esp_mesh_recv_toDS() when stopping the mesh.
6. when the user specifies a parent for the device, the device will set the authmode and password of its AP mode to the same value as the specified parent.
7. add two disconnected reason codes MESH_REASON_EMPTY_PASSWORD and MESH_REASON_PARENT_UNENCRYPTED.
2018-11-06 22:55:48 +08:00
Ivan Grokhotkov
621e316725 Merge branch 'feat/psram_support_hspi' into 'master'
esp32: support to use hspi to output clock for 4M psram

See merge request idf/esp-idf!3377
2018-11-06 20:34:41 +08:00
Jiang Jiang Jian
17c70a4a32 Merge branch 'bugfix/wifi_do_not_load_phy_data_if_fail_to_open_nvs' into 'master'
esp32: do not try to load PHY data if fail to open NVS

See merge request idf/esp-idf!3538
2018-11-06 18:01:58 +08:00
Ivan Grokhotkov
28f1e1597b Merge branch 'bugfix/tickless_idle_single_core' into 'master'
freertos, pm: fix tickless idle not entered in single core mode

See merge request idf/esp-idf!3584
2018-11-06 12:15:03 +08:00
morris
b6d7675e60 ethernet: fix some bugs in phy&mac driver
1. Original register mapping for LAN8720 has some registers that doesn't exist/support.
So just remove them, and fix the power and init function for LAN8720.
2. GPIO16 and GPIO17 is occupied by PSRAM, so only ETH_CLOCK_GPIO_IN mode is supported in that case if using PSRAM.
3. Fix bug of OTA failing with Ethernet
4. Fix bug of multicast with Ethernet

Closes https://github.com/espressif/esp-idf/issues/2564
Closes https://github.com/espressif/esp-idf/issues/2620
Closes https://github.com/espressif/esp-idf/issues/2657
2018-11-06 11:07:22 +08:00
Ivan Grokhotkov
761d44bd36 Merge branch 'bugfix/xts_compile_err' into 'master'
mbedtls: Fix compilation errors when CONFIG_MBEDTLS_HARDWARE_AES is disabled

See merge request idf/esp-idf!3506
2018-11-05 16:58:38 +08:00
Konstantin Kondrashov
8bba348528 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-05 04:22:47 +00:00
Ivan Grokhotkov
0716e65955 pm: prevent entering light sleep again immediately after wakeup
When light sleep is finished on one CPU, it is possible that the other
CPU will enter light sleep again very soon, before interrupts on the
first CPU get a chance to run. To avoid such situation, set a flag
for the other CPU to skip light sleep attempt.
2018-11-05 12:18:29 +08:00
Ivan Grokhotkov
22dd3103bd pm: fix entering light sleep in single core mode
Tickless idle/light sleep procedure had a bug in single core mode.
Consider the flow of events:
1. Idle task runs and calls vApplicationIdleHook
2. This calls esp_vApplicationIdleHook, which calls esp_pm_impl_idle_hook, and pm lock for RTOS on the current core is released.
3. Then esp_vApplicationIdleHook calls esp_pm_impl_waiti, which checks that s_entered_light_sleep[core_id]==false and goes into waiti state.
4. Some interrupt happens, calls esp_pm_impl_isr_hook, which takes pm lock for RTOS. PM state goes back to CPU_FREQ_MAX.
5. Once the interrupt is over, vApplicationIdleHook returns, and Idle task continues to run, finally reaching the call to vApplicationSleep.
6. vApplicationSleep does not enter light sleep, because esp_pm_impl_isr_hook has already changed PM state from IDLE to CPU_FREQ_MAX.

This didn’t happen in dual core mode, because waiti state of one CPU was interrupted by CCOMPARE update interrupt from the other CPU, in which case PM lock for FreeRTOS was not taken.

Fix by inverting the meaning of the flag (for convenience) and only setting it to true when vApplicationSleep actually fails to enter light sleep.
2018-11-05 12:18:29 +08:00
baohongde
f2309f1013 components/bt: Point ACL RX buffer ptr to ACL RX buffer if ACL RX buffer ptr is null
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-01 17:33:44 +08:00
Sagar Bijwe
fbcc160675 mbedtls: Fix compilation errors when CONFIG_MBEDTLS_HARDWARE_AES is disabled 2018-11-01 12:08:45 +05:30
wangmengyang
159d4ac742 component/bt: bugfix for the error in calculation sniff anchor point which can result in supervision timeout after connection is brought into sniff mode 2018-10-31 16:16:49 +00:00
Jiang Jiang Jian
97e3542947 Merge branch 'bugfix/release_some_memory_on_single_core_mode' into 'master'
release memory not used in single core mode

See merge request idf/esp-idf!2733
2018-10-30 15:53:31 +08:00
Deng Xin
b8784a1863 wifi: bugfix of assert when do wps with mikrotik
Problem Decribe

The problem happenned when do wps with a mikrotik router
1. router always want to do connect with 32 without EAP-WSC step
2. after 4 way timeour, 32 crash

Root Cause

The reason why can not start EAP-WSC step is router's check method is RSN > WPA > WPS, when it found there include RSN and WPS in assoc, it will choice do 4 way rather than WPS
The reason of second problem is 32's EAPOL start timer didn't stop and send EAPOL start to a null pointer

Soultion
1. remove RSN and WPA ie when do WPS step
2. check mac address's pointer before send EAPOL start

closes: https://github.com/espressif/esp-idf/issues/2382
2018-10-29 13:29:41 +00:00
Michael (XIAO Xufeng)
ff346f92af psram: add test for 4M psram 2018-10-29 20:26:30 +08:00
Michael (XIAO Xufeng)
20a666fe03 esp32: support to use hspi to output clock for 4MB PSRAM
Resolves https://github.com/espressif/esp-idf/issues/2128.
2018-10-29 20:22:44 +08:00
Michael (XIAO Xufeng)
9b5d0f3322 spi: shown owner of spi host explicitly 2018-10-29 20:22:44 +08:00
XiaXiaotian
901e2af793 esp32: do not try to load PHY data if fail to open NVS 2018-10-29 02:24:58 +00:00