Commit graph

1135 commits

Author SHA1 Message Date
Liu Zhi Fu
063c23deff esp32: update libphy.a
Update lib phy to v3662, including two modifications:
1. Support PHY IRAM optimization
2. Remove some debug log in noisefloor api
2018-05-09 21:23:37 +08:00
Jiang Jiang Jian
3868307efd Merge branch 'bugfix/tw20575_fix_potential_phy_calibration_bug_v3.0' into 'release/v3.0'
esp32: fix potential PHY calibration bug

See merge request idf/esp-idf!2356
2018-05-07 20:02:10 +08:00
Liu Zhi Fu
e99b4e85b9 esp32: fix potential PHY calibration bug
1. Add error log if failed to store calibration version/mac/data
2. Change the NVS calibration version/mac/data store sequence
2018-05-07 09:53:30 +08:00
XiaXiaotian
98dd235819 Fix a few WiFi bugs
1. copy full TIM bitmap from pp task to pm task

2. allocate mimo packet to internal memory

3. remove rc when ap not found

    close github issue: https://github.com/espressif/esp-idf/issues/1797
2018-04-26 14:19:36 +08:00
Jiang Jiang Jian
fddc905fa3 Merge branch 'bugfix/tw19728_support_static_allocation_of_freertos_queue_used_by_isr' into 'release/v3.0'
esp32/driver/bt: support static allocation of FreeRTOS queues used by ISR routine

See merge request idf/esp-idf!2171
2018-04-12 23:07:51 +08:00
Liu Zhi Fu
212222a9e0 esp32/bt/driver: support static allocation of FreeRTOS queues used by ISR routine
Support static allocation of FreeRTOS queues used by ISR routine in WiFi/BT/esp_timer/driver etc
2018-04-09 13:39:31 +08:00
Ivan Grokhotkov
6d3f81aa77 pm: fix initialisation only done in dual core mode
Introduced in 9377d4ac. Accidentally put the new code block under an
2018-04-08 14:08:31 +08:00
Deng Xin
b563219f93 Fix some wifi bugs
1. Do not filter out TKIP MIC ERR packet
2. Modify response retry counter from 32 to 5
3. support enrollee feature in APSTA mode
2018-03-31 06:50:15 +00:00
Jiang Jiang Jian
c9ed467e26 Merge branch 'bugfix/dfs_rtc_fixes' into 'master'
DFS related fixes

See merge request idf/esp-idf!2102

(cherry picked from commit 8478823039)

9377d4ac pm: fix incorrect configuration at startup
7167ad45 pm: improve debug output from esp_pm_dump_locks
1618dbc9 soc/rtc: wait for frequency switch to complete
2018-03-21 12:02:58 +08:00
Jiang Jiang Jian
dfce994b54 Merge branch 'feature/optimize_wifi_tx_v3.0' into 'release/v3.0'
esp32: optimize wifi tx

See merge request idf/esp-idf!2092
2018-03-20 18:22:24 +08:00
Liu Zhi Fu
37a4b0e933 esp32: optimize wifi tx
1. Optimize WiFi TX retry counter
2. Optimize WiFi TX timeout
2018-03-20 15:23:47 +08:00
Jiang Jiang Jian
8fab9ffb95 Merge branch 'bugfix/wpa2_assert_when_use_sha256_signature' into 'master'
bugfix of wpa2 assert when use sha256 do signature

See merge request idf/esp-idf!2089

(cherry picked from commit 45eb556ddf)

bc97b0f3 bugfix of wpa2 assert when use sha256 do signature
2018-03-20 15:20:13 +08:00
Liu Zhi Fu
0399c8ecaf esp32: Fix wifi stop never returns issue
Fix esp_wifi_stop never returns issue
2018-03-19 21:06:05 +08:00
XiaXiaotian
acff7e58d2 fix the issue that wpa2 assert when disconnect from AP 2018-03-15 14:42:31 +08:00
Tian Hao
c574ad90df component/esp32: fix esp_timer bug
1. fix the bug that cause esp_timer_get_time is not accuracy(the max margin may be 106s).
2. fix the bug that causes esp timer come too early.
2018-03-13 15:03:54 +08:00
Liu Zhi Fu
229be8c025 esp32: fix some WiFi bugs
1. Fix esp_wifi_deinit causes system crash issue
2. Fix QoS AC map issue
2018-03-06 16:59:24 +08:00
XiaXiaotian
5a1247246c fix espnow memory leak 2018-01-24 16:20:20 +08:00
XiaXiaotian
891c1f4a2b Fix the bug that in sniffer mode it asserts when receive misc data at first.
close github issue#1037 WiFi Promiscuous filter breaks w/
WIFI_PROMIS_FILTER_MASK_ALL and issue#1404
esp_wifi_set_promiscuous_filter set WIFI_PROMIS_FILTER_MASK_ALL error
2018-01-23 19:12:37 +08:00
XiaXiaotian
c5f63bf701 Fix two wifi bugs
1. Fix the bug that receiving beacon time is not correct.

2. close github issue#233 esp_wifi_restore() bug.
2018-01-15 20:42:44 +08:00
Jiang Jiang Jian
b0c7f28aed Merge branch 'bugfix/fix_qos_bug_in_11g_mode_v3.0' into 'release/v3.0'
Bugfix/fix qos bug in 11g mode v3.0

See merge request !1790
2018-01-15 18:26:30 +08:00
Liu Zhi Fu
9b0c252e67 esp32: fix qos bug in 11g mode
Fix qos bug in 11g mode (release/v3.0 - 8e861901)
2018-01-12 14:14:20 +08:00
Ivan Grokhotkov
2a55629556 Merge branch 'feature/toolchain-80-g6c4433a-v30' into 'release/v3.0'
Toolchain: Update to version 1.22.0-80-g6c4433a (v3.0 backport)

See merge request !1772
2018-01-11 21:45:11 +08:00
Angus Gratton
b523660199 build: Remove explict -lstdc++-psram-workaround
This is now handled internally to the toolchain.
2018-01-11 10:32:28 +11:00
Jiang Jiang Jian
404a6b3782 Merge branch 'bugfix/full_calibration_will_not_use_init_data' into 'master'
Fix bug that when we do full calibration init data bin is not used

See merge request !1746
2018-01-10 17:02:08 +08:00
XiaXiaotian
281874d380 recompile wifi lib with new toolchain 1.22.0-78-g4b87650 2017-12-29 16:42:05 +08:00
Angus Gratton
9065498a5a esp32: Change 192KB runtime static limit workaround to a 176KB link time workaround
Turns out some app memory around 0x3ffdc000 is also used by APP CPU.

This is a workaround until code to remove the 176KB limit is committed.
2017-12-29 09:11:50 +11:00
Jeroen Domburg
41baf59287 Fix the clock subsystem so it doesn't undo the weird condition spiram_psram.c jams the enable/reset bits of SPI3 in when 80MHz mode is selected anymore 2017-12-27 16:54:26 +08:00
Angus Gratton
87f7d1875d esp32: Fix backwards compatibility for pre-v2.1 bootloaders
Older bootloaders don't set RTC_XTAL_FREQ_REG or call rtc_clk_init(),
app needs to pick this up.

Reported at
https://esp32.com/viewtopic.php?f=2&t=3939&p=17836
2017-12-27 16:54:25 +08:00
Angus Gratton
c4b861ad65 log: Remove non-static TAG variables 2017-12-27 16:54:24 +08:00
Ivan Grokhotkov
fbff8eb95b esp32: fix incorrect clock enable bit name for UART0
Closes https://github.com/espressif/esp-idf/issues/1301
2017-12-27 16:54:21 +08:00
Ivan Grokhotkov
e8fbd6e288 time: rename time source option from FRC to "high-resolution timer"
libc time function now rely on esp_timer_get_time as the source of
high-resolution time, rather than FRC1 timer. Internally, on the ESP32
esp_timer implementation uses FRC2 timer.

- Change help text and labels in Kconfig to use "high-resolution timer"
  instead of FRC1. Keep existing Kconfig option name to be backwards
  compatible.
- Change references to "FRC1" in the source code to "FRC".
2017-12-27 16:54:19 +08:00
Mahavir Jain
58accf05cf docs: fix i2s code snippet for interrupt flags setting
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2017-12-27 16:54:15 +08:00
Jack
4837f93968 esp_timer:fix three bugs about timer get and timer alarm where overflow is not correct 2017-12-19 20:07:45 +08:00
XiaXiaotian
3a4cf72f30 Fix some wifi bugs
1. change first scanning channel to adjust different country code.

2. fix a bug that system crashes when station disconnects from AP.
2017-12-15 17:56:30 +08:00
Ivan Grokhotkov
f58c5b21ec watchdog: increase default INT WDT interval if SPIRAM is used
Running heap_caps_check_integrity for 4MB of PSRAM can take longer than
the default WDT interval, 300ms.
2017-12-01 20:10:26 +08:00
Ivan Grokhotkov
15b6b64c99 watchdog: enable INT WDT unit test 2017-12-01 20:10:26 +08:00
Ivan Grokhotkov
bd1d631134 watchdogs: make sure timer group peripherals are enabled 2017-12-01 20:10:26 +08:00
Jiang Jiang Jian
96cd6f8626 Merge branch 'bugfix/update_libstdcxx_psram' into 'master'
libstdc++: update the library built with PSRAM workaround

See merge request !1588
2017-12-01 19:34:29 +08:00
XiaXiaotian
aaa17b8740 Fix some wifi lib bugs
1. Add a hide API for station to receive and process probe request
frame.

    2. Fix an issue that wifi/bt coexistence crashes in PSRAM version.

    3. Fix an issue that the API for clearing vendor ie can not work.

    4. Fix an issue that wifi stop and reboot leads watchdog.
2017-12-01 15:00:49 +08:00
Ivan Grokhotkov
f0547d58e4 esp_timer: add documentation, expose profiling option in Kconfig 2017-11-29 11:44:46 +08:00
Ivan Grokhotkov
6e7eb3c776 esp_timer: fix for the case when timer is deleted in callback
Timer callback can delete the timer. If CONFIG_ESP_TIMER_PROFILING was
enabled, this caused an access to invalid (freed) memory.
This fix adds a pointer to track the timer while executing the callback.
This is needed so that we can check if callback deletes the timer,
in which case we won't try updating profiling counters for this timer
after the callback is done.
2017-11-29 11:44:46 +08:00
zhangyanjiao
768bbcd8aa fix buffer overflow in ipc.c 2017-11-27 18:47:40 +08:00
Darian Leung
4c13b2f391 docs/ipc documentation
This commit updates doxygen comments in the IPC header files and adds an rst
docs page.
2017-11-24 15:31:28 +08:00
Jiang Jiang Jian
082f5716c6 Merge branch 'feature/enable_disable_ampdu_rx_tx_independently' into 'master'
Feature/enable disable ampdu rx tx independently

See merge request !1560
2017-11-23 22:22:43 +08:00
Ivan Grokhotkov
983ec73413 libstdc++: update the library built with PSRAM workaround 2017-11-23 15:34:23 +08:00
Ivan Grokhotkov
b669b415e6 Merge branch 'feature/cxx_exceptions_emg_pool' into 'master'
esp32: Adds C++ exceptions emergency pool size menuconfig option

See merge request !1561
2017-11-23 13:02:49 +08:00
Alexey Gerenkov
7df96718a2 esp32: Adds C++ exceptions emergency pool size menuconfig option 2017-11-23 06:14:11 +03:00
Liu Zhi Fu
3f6a8f1430 esp32: add options to disable/enable TX/RX AMPDU independently
Make menuconfig can disable/enable TX/RX AMPDU independently
2017-11-23 09:42:31 +08:00
Ivan Grokhotkov
6e1453e864 Merge branch 'feature/bot' into 'master'
CI: support customize test with @bot

See merge request !1502
2017-11-21 18:43:56 +08:00
Angus Gratton
93c75b4978 Merge branch 'bugfix/update_BOD_voltages' into 'master'
esp32/Update brownout voltages

See merge request !1520
2017-11-21 05:37:55 +08:00
Angus Gratton
4395f7c94e Merge branch 'feature/spi_flash_lock_recursive' into 'master'
spi_flash: Expose recursive op_lock for atomic multi-part flash operations

See merge request !1556
2017-11-20 13:24:41 +08:00
Angus Gratton
7a924bd85a spi_flash: Expose an accessor the current SPI flash guard functions
Change places which uses g_flash_guard_default_ops to use this. Probably exact same data, but a bit
cleaner.
2017-11-20 15:54:31 +11:00
Darian Leung
91ccf588d1 esp32/Update brownout voltages
This commit updates the voltages of each brownout level in Kconfig.
Note that there is some variation of brownout voltage between each chip.
2017-11-20 12:26:13 +08:00
Ivan Grokhotkov
148130066f Merge branch 'feature/esp32_stack_protector' into 'master'
esp32: Adds Stack Smashing Protection Feature

See merge request !1537
2017-11-20 10:16:15 +08:00
Alexey Gerenkov
692a890232 esp32: Adds Stack Smashing Protection Feature
These changes add posibility to enable GCC stack protector via menuconfig
for all source files in project.
2017-11-17 12:08:36 +03:00
He Yin Ling
0c40b2ec9d test: collect performance for esp-timer / spinlock 2017-11-16 17:48:48 +08:00
Jiang Jiang Jian
88e1a374a0 Merge branch 'bugfix/fix_airkiss_macro_typo' into 'master'
Fix an airkiss macro error

See merge request !1532
2017-11-16 17:25:45 +08:00
XiaXiaotian
eef595501c Fix an airkiss macro error 2017-11-15 21:44:12 +08:00
Angus Gratton
b83792f504 Merge branch 'doc/esp_wifi_types' into 'master'
docs: Add esp_wifi_types.h items to wifi API reference

See merge request !1320
2017-11-15 15:03:02 +08:00
Angus Gratton
c40dc36814 docs: Remove internal header esp_wifi_crypto_types.h from documentation 2017-11-15 17:40:38 +11:00
Angus Gratton
beba74ff61 docs: Add esp_wifi_types.h descriptions 2017-11-15 17:40:38 +11:00
Liu Zhi Fu
3554d190ff esp32: update wifi lib to fix some wifi bugs
1. Fix resend eapol cause crash issue
2. Don't asser the system when the channel is in 14
2017-11-14 20:45:33 +08:00
Liu Zhi Fu
48ca949fd4 lwip: fix socket close crash issue
When lwip_close free the socket resource (netconn etc), any work
related to these resource (netconn etc) must be aborted.
2017-11-13 06:00:52 +00:00
He Yin Ling
e64b9ecaf4 Merge branch 'bugfix/ut_only_test_app_core_sleep_on_dual_core' into 'master'
test: only test app core sleep on dual core

See merge request !1517
2017-11-13 13:35:07 +08:00
Jiang Jiang Jian
004c391591 Merge branch 'feature/adjust_task_stack_size_according_to_nano' into 'master'
esp32/lwip: adjust task stack size according 'nano' print

See merge request !1510
2017-11-13 11:18:20 +08:00
Angus Gratton
36692dbac7 docs: Add esp_wifi_types.h items to wifi API reference
Previously only items defined esp_wifi.h in esp_wifi_crypto_types.h
were including in documentation reference.
2017-11-10 11:00:44 -08:00
He Yin Ling
be405d69d8 test: ut only test app core reset on dual core 2017-11-10 17:53:59 +08:00
Jiang Jiang Jian
b8694eeeb9 Merge branch 'bugfix/tw16339_sta_cant_connect_ap_in_channel_14' into 'master'
Bugfix/tw16339 sta cant connect ap in channel 14

See merge request !1514
2017-11-10 15:31:19 +08:00
He Yin Ling
b1d13ded1a test: only test app core sleep on dual core 2017-11-10 13:26:11 +08:00
Ivan Grokhotkov
7632c6a80c Merge branch 'test/UT_reset_check' into 'master'
Test/ut reset check

See merge request !1086
2017-11-10 11:30:46 +08:00
Ivan Grokhotkov
3eedf3ed18 Merge branch 'bugfix/to_docs_from_github' into 'master'
Documentation bugfixes from the github

See merge request !1501
2017-11-10 11:13:25 +08:00
Ivan Grokhotkov
d1f6030921 Merge branch 'bugfix/from_github' into 'master'
Bug fixes from Github

See merge request !1487
2017-11-10 11:13:04 +08:00
Liu Zhi Fu
2041ba9add esp32: fix station can't connect esp32 softap in channel 14
Channel 14 only supports HT20 while ESP32 softap channel 14 is HT40, fix it.
2017-11-10 10:55:08 +08:00
Liu Zhi Fu
710055025e esp32/lwip: adjust task stack size according 'nano' print
1. Adjust tcpip/main/event/timer task stack size according 'nano' print
2. If 'nano' print is disabled the task stack size reduces 512 bytes
2017-11-09 10:09:42 +08:00
Jiang Jiang Jian
793ea56204 Merge branch 'bugfix/fail_to_scan_all_matched_ap' into 'master'
Wifi: bugfix/fail_to_scan_all_matched_ap

See merge request !1493
2017-11-08 17:39:29 +08:00
Seppe Stas
a106dc183d Clean up documentation of esp_wifi_set_country
Signed-off-by: krzychb
2017-11-07 20:26:22 +01:00
houchenyao
f80824a2d8 test: support test for UT cases expect to reset 2017-11-07 12:19:39 +08:00
Ivan Grokhotkov
1613044aef Merge branch 'bugfix/restart_reconfigure_flash_pins' into 'master'
esp32: reconfigure SPI flash pins in esp_restart

See merge request !1492
2017-11-07 12:08:52 +08:00
Ivan Grokhotkov
a45e9c806d Merge branch 'bugfix/new_task_watchdog_API_false_trigger' into 'master'
feat/New Task Watchdog API

See merge request !1380
2017-11-07 10:43:56 +08:00
Deng Xin
092e99c05d Wifi: bugfix/fail_to_scan_all_matched_ap
fail to scan all matched ap in fast scan mode
2017-11-06 21:31:45 +08:00
Ivan Grokhotkov
5f6be9b4ce esp32: reconfigure SPI flash pins in esp_restart 2017-11-06 16:44:26 +08:00
Jiang Jiang Jian
abacf8d2a0 Merge branch 'bugfix/rtc_and_restart_fixes' into 'master'
rtc_clk and esp_restart fixes

See merge request !1458
2017-11-04 01:34:38 +08:00
Liu Zhi Fu
13621852dd esp32: add wifi lib which is compiled with psram gcc
Add psram wifi lib because it doesn't impact the WiFi throughput once the psram is not enabled in IDF menuconfig
2017-11-03 23:02:35 +08:00
Frederik Merz
20ccec1061 Disable all UART CLKs that are not console 2017-11-03 19:03:00 +08:00
jeanleflambeur
8712fd3ccf Update esp_err.h
Renamed the internal rc to __err_rc to avoid clashes with local variables.
This code would not do the expected thing with the original ESP_ERROR_CHECK macro:

esp_err_t my_func(esp_err_t x)
{
  assert(x == 23);
}

esp_err_t rc = 23; //some value that is important fo the user
ESP_ERROR_CHECK(my_func(rc));

The macro will expand to:
esp_err_t rc = (my_func(rc));

And the code will assert, as my_func will receive a random value - whatever is in the internal macro rc temp variable. This is due to the C weirdness of allowing this code:

int x = x; //x has a random value.
2017-11-03 16:45:28 +08:00
Wangjialin
cea7dfbe90 psram: improve clock signal generation, increase drive strength
Also check the chip type when initializing.
2017-11-03 16:30:10 +08:00
Ivan Grokhotkov
a02b30ccda efuse: add package definitions for PICOD2/D4 2017-11-03 15:49:10 +08:00
Ivan Grokhotkov
fb9c106bcb soc/rtc: add function to get/set VDDSDIO configuration
Also consider case of VDDSDIO force powered on in rtc_sleep.
2017-11-03 15:49:09 +08:00
Darian Leung
9d63e1da4a New Task Watchdog API (Revert of Revert)
This commit reverts the revert on the new task watchdog API. It also
fixes the following bug which caused the reversion.

- sdkconfig TASK_WDT_TIMEOUT_S has been reverted from the unit of ms back to the
unit of seconds. Fixes bug where projects using the new API without rebuilding sdkconfig
would cause the old default value of 5 to be interpreted in ms.

This commit also adds the following features to the task watchdog

- Updated idle hook registration to be compatible with dual core hooks

- Updated dual core hooks to support deregistration for cpu

- Legacy mode has been removed and esp_task_wdt_feed() is now replaced by
  esp_task_wdt_reset().  esp_task_wdt_feed() is deprecated

- Idle hooks to reset are now registered/deregistered when the idle tasks are
  added/deleted from the Task Watchdog instead of at Task Watchdog init/deinit

- Updated example
2017-11-02 16:47:51 +08:00
XiaXiaotian
27b52dfd18 fix some phy bugs
1. V366, fix a problem which initialize current can reach 800mA.

    2. V365, fix a problem for pll_cap tracking in Coexist (BT & WIFI)
       mode. The problem will make Coexist (BT & WIFI) WIFI AP mode TX
       Fail in high temperature(>70).

    3. V364, fix a bug of BT and Wifi coexist (hung in function of
       force_wifi_mode())
2017-11-02 15:53:17 +08:00
XiaXiaotian
42cefc173f refractor WiFi clock setting
Do not set WiFi clock in PHY initializing function, move it to WiFi
   start/stop function.
2017-11-02 15:24:21 +08:00
wangmengyang
bd6394db92 component/bt: clean up WIFI_CLK_EN_REG settings for Bluetooth
1. move settings of WIFI_CLK_EN_REG for bluetooth into controller init/deinit APIs
2. modify the bit mask used in phy_rf init/deinit to use WIFI-BT shared bits
2017-11-02 15:24:21 +08:00
XiaXiaotian
50b6912bf8 Increase maximum number of WiFi dynamic transmitting buffer 2017-10-31 15:18:20 +08:00
XiaXiaotian
87d3986b87 Fix the return value of esp_now_send() 2017-10-31 15:18:20 +08:00
Deng Xin
ccfbecd25f Wifi: bugfix of get wrong ap information in all channel scan
fix the issue get wrong ap information in all channel scan
2017-10-31 11:35:11 +08:00
Liu Zhi Fu
1195ced75c esp32: reduce default wifi static tx buffer
Modify the the default WiFi static tx buffer from 32 to 16
2017-10-28 12:15:40 +08:00
Ivan Grokhotkov
eb5752c635 esp_restart: fix possible race while stalling other CPU, enable WDT early
Previously esp_restart would stall the other CPU before enabling RTC_WDT.
If the other CPU was executing an s32c1i instruction, the lock signal
from CPU to the arbiter would still be held after CPU was stalled. If
the CPU running esp_restart would then try to access the same locked
memory pool, it would be stuck, because lock signal would never be
released.

With this change, esp_restart resets the other CPU before stalling it.
Ideally, we would want to reset the CPU and keep it in reset, but the
hardware doesn't have such feature for PRO_CPU (it is possible to hold
APP_CPU in reset using DPORT register). Given that ROM code will not use
s32c1i in the first few hundred cycles, doing reset and then stall seems
to be safe.

In addition to than, RTC_WDT initialization is moved to the beginning of
the function, to prevent possible lock-up if CPU stalling still has any
issue.
2017-10-26 19:53:53 +08:00
Angus Gratton
2c2e7f6303 Merge branch 'bugfix/optmize_ipv6_event' into 'master'
bugfix: add netif info in event message when got ipv6 address

See merge request !959
2017-10-23 17:00:10 +08:00
Tian Zhong Xing
55e95b04bd bugfix: add netif info in event message when got ipv6 address 2017-10-23 13:50:43 +08:00
Ivan Grokhotkov
59b7d98fec Merge branch 'feature/dfs' into 'master'
Dynamic frequency scaling

See merge request !1189
2017-10-22 12:34:11 +08:00