Commit graph

969 commits

Author SHA1 Message Date
Ivan Grokhotkov 90bbcbcdc0 unit tests: fix warnings, build with -Werror
- libsodium: silence warnings
- unit tests: fix warnings
- spiram: fix warnings
- ringbuf test: enable by default, reduce delays
2017-10-19 21:35:23 +08:00
Ivan Grokhotkov ae7404972c sleep: don't power down VDD_SDIO in light sleep if SPIRAM is enabled 2017-10-19 21:35:23 +08:00
Ivan Grokhotkov d55ddfe56d update libstdc++.a built with pSRAM workaround 2017-10-19 21:35:22 +08:00
Ivan Grokhotkov cc67500d3e unit test: adapt tests to single core configuration 2017-10-19 21:35:21 +08:00
He Yin Ling 1fc2ac8b09 unit-test: esp timer use same name as ets timer
We will use case name to select test cases in UT jobs.
Same case name is not allowed.
2017-10-19 21:35:21 +08:00
Ivan Grokhotkov 8e01b4aef8 Merge branch 'docs/esp32_hooks' into 'master'
docs/Added documentation about esp32 hooks

See merge request !1417
2017-10-19 12:32:36 +08:00
Ivan Grokhotkov 54d2dc7681 Merge branch 'bugfix/fix_some_wifi_bugs' into 'master'
esp32: fix some wifi bugs

See merge request !1414
2017-10-18 16:20:09 +08:00
Darian Leung 461f8da704 docs/Added documentation about esp32 hooks
This commit adds documentation about the esp32 Idle and Tick Hooks
2017-10-18 15:19:35 +08:00
Angus Gratton 78f70d4e79 Merge branch 'bugfix/cxx_exceptions' into 'master'
Full C++ Exception Support option (& reclaim memory when exceptions disabled)

See merge request !1353
2017-10-18 15:08:10 +08:00
Deng Xin 80b14fc77f esp32: fix some wifi bugs
1. Fix WiFi timer enable twice issue
2. Fix a softAP compatibility issue
3. Fix ebuf alloc counter issue
4. remove nvs_flash_init() in esp_wifi_init()
5. Fix scan only find few APs after set bssid
6. Fix can not connect to hidden SoftAP
7. Remove group key entry before connecting ot AP
2017-10-18 14:53:19 +08:00
Tian Hao 09862b5918 component/esp32 : update phy & rtc
RTC V230
add BT AGC saturation protection, replace RTC V229.

PHY V362
Power up print: "phy_version: 362.0, 61e8d92, Sep 8 2017, 18:48:13"
1. esp_init_data_v3.bin
modify TX target power
modify WIFI & BT RX gain table
2. modify phy_close_rf()
3. add phy_set_most_tpw()
4. 26M crystal work OK
5. noise_check_loop ok
2017-10-17 18:02:42 +08:00
Ivan Grokhotkov 7babc74fce Merge branch 'feature/reduce_min_num_of_wifi_static_tx_buffer' into 'master'
Reduce minimum number of WiFi static tx buffer

See merge request !1398
2017-10-17 17:40:14 +08:00
Angus Gratton 9c7477ef34 cxx: Add KConfig option for C++ exceptions, disable by default
Fixes https://github.com/espressif/esp-idf/issues/1072

(Additional 20KB is still used if C++ exception support is enabled in
menuconfig.)
2017-10-17 15:29:25 +08:00
Ivan Grokhotkov 6e7dd5962b Merge branch 'bugfix/add_mutex_for_dual_core_hooks' into 'master'
freertos/Add mutex for dual core hooks

See merge request !1406
2017-10-17 14:15:09 +08:00
Ivan Grokhotkov 08d6ca4f70 Merge branch 'bugfix/ets_timer_iram' into 'master'
wifi/bt coexistence: Fix disabled cache access race when writing to flash

See merge request !1409
2017-10-17 14:12:43 +08:00
Ivan Grokhotkov d3bb9de36a Merge branch 'feature/spiram_init_in_app' into 'master'
spiram: expose function to initialize SPI RAM cache

See merge request !1281
2017-10-17 04:56:35 +08:00
Ivan Grokhotkov b58e19f8a2 Merge branch 'bugfix/soc_component_rodata' into 'master'
soc: place constant data from rtc_clk.c into DRAM

See merge request !1321
2017-10-17 04:54:43 +08:00
Angus Gratton 094cf4d79d wifi/bt coexistence: Fix disabled cache access race when writing to flash
Moves the ets_timer_arm() / ets_timer_disarm() code paths to RAM

Overhead is 740 bytes of IRAM, 0 bytes DRAM

(For comparison: If all of esp_timer.c is moved to RAM, overhead is 1068 bytes IRAM and 480 bytes DRAM.)
2017-10-16 19:47:33 +08:00
Jiang Jiang Jian 99f2996779 Merge branch 'bugfix/tw15595_eth_got_ip_log_error' into 'master'
esp32/tcpipadapter: correct eth ip got event info

See merge request !1388
2017-10-16 17:30:14 +08:00
Darian Leung 7584f89278 esp32/Add mutex for dual core hooks
This commit adds critical sections for the dual core hooks
2017-10-16 11:47:38 +08:00
Ivan Grokhotkov 1da3204a7c spiram: expose function to initialize SPI RAM cache
Some frameworks based on ESP-IDF need to be able to decide whether to
initialize SPI RAM after the application has started. This change splits
out part of esp_spiram_init which manipulate cache MMU into a separate
function. Applications can disable cache, call esp_spiram_init_cache,
re-enable cache, and then call esp_spiram_init.
Disabling and re-enabling the cache can be achieved using functions
provided in esp_spi_flash.h.
2017-10-16 09:15:11 +08:00
He Yin Ling 3a271a4ae7 Merge branch 'bugfix/freertos_dual_core_hooks' into 'master'
bugfix/freertos_dual_core_hooks

See merge request !1399
2017-10-14 09:41:03 +08:00
Darian Leung 95d63137d1 bugfix/freertos_dual_core_hooks
This commit fixes bugs with the dual core changes to freeRTOS tick and idle hooks.
Interrupt watchdog now registers tick hooks to both cores.
API for cross core tick and idle hook registration were also added
2017-10-13 18:27:53 +08:00
XiaXiaotian c730f676c3 Reduce minimum number of WiFi static tx buffer
Calibrate tx power after sending five packets
2017-10-13 17:11:31 +08:00
Jiang Jiang Jian 713dee57f0 Merge branch 'feature/add_const_for_wifi_api' into 'master'
esp32: add const for some WiFi api

See merge request !1394
2017-10-13 17:08:29 +08:00
Liu Zhi Fu e04a0d66b8 esp32/tcpipadapter: correct eth ip got event info
1. Raise SYSTEM_EVENT_ETH_GOT_IP when eth got ip
2. Add default handler for SYSTEM_EVENT_ETH_GOT_IP
3. Minor change about ethernet kconfig
2017-10-13 15:56:51 +08:00
Jiang Jiang Jian 6ff5c32ae5 Merge branch 'feature/alloc_memories_of_wifi_and_lwip_in_spiram_first' into 'master'
Allocate some memories in SPIRAM first.

See merge request !1367
2017-10-13 15:47:27 +08:00
Liu Zhi Fu 0e586a4cdf esp32: add const for some WiFi api
Add const if the pointer parameter is const
2017-10-13 15:10:34 +08:00
XiaXiaotian 5df39cd4b6 Allocate some memories in SPIRAM first.
Try to allocate some WiFi and LWIP memories in SPIRAM first. If
    failed, try to allocate in internal RAM then.
2017-10-13 10:11:24 +08:00
Jiang Jiang Jian dbee895741 Merge branch 'bugfix/phy_init_remove_descriptions' into 'master'
phy init: remove descriptions of PHY init parameters

See merge request !1363
2017-10-12 19:00:10 +08:00
Jiang Jiang Jian 3f1198529f Merge branch 'bugfix/fail_to_connect_in_wps' into 'master'
WiFi :bug fix of fail to connect in wps

See merge request !1384
2017-10-12 17:39:29 +08:00
Angus Gratton 3a4bd7f16c Merge branch 'bugfix/wifi_tx_buffer_doc' into 'master'
wifi docs: Clarify WIFI_DYNAMIC_TX_BUFFER_NUM config item limit

See merge request !1375
2017-10-12 13:20:28 +08:00
Angus Gratton f3681e22de wifi docs: Clarify WIFI_DYNAMIC_TX_BUFFER_NUM config item limit
Setting WIFI_DYNAMIC_TX_BUFFER_NUM to zero is not possible.

Also edit some of the related config docs a little.
2017-10-12 15:53:53 +11:00
Deng Xin a99c89f6af bug fix of fail to connect in wps 2017-10-12 12:01:11 +08:00
Deng Xin a05867f673 Wifi: bugfix of fail to reconnect after reboot
fix the issue fail to reconnect after reboot
2017-10-11 17:58:36 +08:00
Jiang Jiang Jian 904d6c8f2b Merge branch 'feature/scan_optimize' into 'master'
wifi: scan optimize

See merge request !1334
2017-10-10 13:39:16 +08:00
Deng Xin d515494d1b wifi: optimize scan feature
1. add the threshold of match AP in fast scan
2. add blacklist feature
3. make sure would wrong if password didn't set
4. add scan example
2017-10-10 12:27:02 +08:00
Jiang Jiang Jian 3106ca1c1e Merge branch 'bugfix/btdm_ea_overloaded' into 'master'
component/bt: increase programming delay for event arbiter to allow for heavy workload

See merge request !1338
2017-10-10 12:26:25 +08:00
Ivan Grokhotkov fdc24eb118 phy init: remove descriptions of PHY init parameters 2017-10-09 14:40:08 +08:00
Daniel Campora 1c046f30a6 freertos: Make the tick/idle hooks dual core compatible
The way these hooks are implemented at the moment, once you register a tick or idle task hook, it is run by both cores, leading to intermittent crashes that are difficult to explain (and debug). One solution is to register the hook with the core that is currently running, which is what this patch attempts to do.

Merges https://github.com/espressif/esp-idf/pull/781
2017-10-09 13:04:20 +11:00
wangmengyang 2797966c47 component/bt: increase programming delay for event arbiter to allow for heavy workload 2017-09-30 18:12:45 +08:00
Jeroen Domburg b6a2bd1184 Revert "esp32: New Task Watchdog API"
This reverts commit 616baa239d.
2017-09-30 18:07:19 +08:00
Darian Leung 616baa239d esp32: New Task Watchdog API
Legacy API of task watchdog used the same function esp_task_wdt_feed() to add
and feed a task. This caused issues of implicitly adding a task to the wdt list
if the function was used in shared code.

The new API introduces init, adding, feeding, deleting, deinit functions. Tasks
must now be explicitly added to the task watchdog using their handles. Deletion
must also be explicit using task handles. This resolves the issue of implicit
task additions to the task watchdog due to shared code calling
esp_task_wdt_feed().

Task watchdog is now fully configurable at runtime by calling the init and
deinit functions.

Also added functions to get the handles of idle tasks of the other core. This
helps when adding idle tasks to the watchdog at run time.

Configuring the task watchdog using menu config is still available, however
menu config will only result in calling the init and add functions for idle
tasks shortly after the scheduler starts.

Menu config also allows for using legacy behavior, however the legacy behavior
willcall the new API functions but with slight variations to make them legacy
compatible.

Documentation and example have also been updated

gcov_rtio.c headers updated to prevent error of freertos header files being
included in the wrong order.

Resolves issue TW#13265
2017-09-29 23:10:55 +08:00
Darian Leung ae9041ab71 esp32: Fix task watchdog timer triggering issues TW#14794
The two task watchdog timer bugs are as follows...
1) If only a single task existed on the wdt task list, and esp_task_wdt_feed()
was only called once, the watchdog triggers but fails to print task name
2) If a single task already exists on the task wdt list, and another task calls
esp_task_wdt_feed() once, the watchdog fails to trigger

Problem stemmed from the loop responsible for resetting the watchdog timer
having incorrect loop parameters. The loop failed to traverse the full length
of the task wdt list
2017-09-29 22:12:58 +08:00
Jeroen Domburg 740f8a79f0 Add logic to make external RAM usable with malloc() 2017-09-28 17:17:50 +08:00
Ivan Grokhotkov 73e8afc5b9 soc: place constant data from rtc_clk.c into DRAM
In release mode, switches in rtc_clk_bbpll_set would be converted to
jump tables. These tables would be placed into .rodata, which caused
rtc_clk_cpu_freq_set to be unusable while cache is disabled. This
manifested itself in crashes when exiting from light sleep:

https://esp32.com/posting.php?mode=reply&f=13&t=3089#pr14590
2017-09-26 17:08:49 +08:00
Ivan Grokhotkov 7d436c9a44 Merge branch 'bugfix/timestamp' into 'master'
fix(global, log): correct the CCOUNT register when switching CPU clock during boot 2nd and before scheduler.

See merge request !1296
2017-09-26 16:15:42 +08:00
michael 9d9e771933 fix(global, log): fix esp_log(_early)_timestamp readings after startup by correct the CCOUNT register when switching CPU clock.
TW#13332, Closes #700
2017-09-26 15:18:17 +08:00
Liu Zhi Fu 762f8da078 esp32: support wifi country code
1. Add completed support for WiFi country code
2. Modify esp_wifi_set_country API
2017-09-26 13:36:53 +08:00
Ivan Grokhotkov fd02668d8b Merge branch 'feature/record_more_info_of_scanned_ap' into 'master'
Record more information of scanned AP

See merge request !1289
2017-09-26 10:13:48 +08:00