Commit graph

3081 commits

Author SHA1 Message Date
Ivan Grokhotkov 5f9ac5fadb Merge branch 'doc/freertos_port_comments' into 'master'
freertos: Update comments in "port" section (portMUX/etc)

See merge request !1431
2017-11-07 19:31:21 +08:00
Ivan Grokhotkov 744896bde2 Merge branch 'bugfix/hardware_mpi_sign' into 'master'
hwcrypto mpi: Fix losing sign when multiplying by -1 (github PR)

Contribution from github: https://github.com/espressif/esp-idf/pull/1181/

See merge request !1471
2017-11-07 19:30:31 +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
Ivan Grokhotkov 5f6be9b4ce esp32: reconfigure SPI flash pins in esp_restart 2017-11-06 16:44:26 +08:00
Darian Leung 637ba2e8bb freertos: Test untested functions
Test cases were added for the following functions
- xTaskNotify(), xTaskNotifyGive(), xTaskNotifyFromISR(), vTaskNotifyGiveFromISR(),
- xTaskNotifyWait(), ulTaskNotifyTake()
- vTaskDelayUntil()

The following function was made smp compatible and tested as well
- eTaskGetState()
2017-11-06 15:31:01 +08:00
Angus Gratton 2c72223a4e Merge branch 'bugfix/protect_spiflash_regions' into 'master'
spi_flash: Abort on writes to dangerous regions (bootloader, partition table, app)

See merge request !1452
2017-11-04 12:40:21 +08:00
Angus Gratton 670733df9f spi_flash: Abort on writes to dangerous regions (bootloader, partition table, app)
Can be disabled or made into a failure result in kconfig if needed.
2017-11-03 15:52:27 -07: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
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
Wangjialin d034bc9ca0 bootloader: add configuration of flash pins and VDDIO boost 2017-11-03 16:29:56 +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
Ivan Grokhotkov 5a294c9acd soc/gpio: fix description of GPIO_STRAP_REG 2017-11-03 15:49:09 +08:00
Jiang Jiang Jian b13cd4adf8 Merge branch 'feature/btdm_add_value_callback_when_send_notification_or_indicate_failed' into 'master'
component/bt: add value callback when send notification or indicate failed

See merge request !1457
2017-11-03 10:05:29 +08:00
Ivan Grokhotkov 80eb3b6ddb Merge branch 'bugfix/light_sleep_current' into 'master'
soc/rtc: fix increased current consumption in light sleep

See merge request !1483
2017-11-02 18:26:23 +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
Jiang Jiang Jian 1de3fc4a2c Merge branch 'bugfix/btdm_master_dont_send_pair_req_#13686' into 'master'
component/bt: Fix the bug of master don't send pair request to the slave when the sec_act set to the value of ESP_BLE_SEC_ENCRYPT.

See merge request !1376
2017-11-02 15:49:27 +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
Jiang Jiang Jian da178e446d Merge branch 'feature/increase_dynamic_tx_buffer_number' into 'master'
Feature/increase dynamic tx buffer number

See merge request !1473
2017-11-02 15:09:37 +08:00
Ivan Grokhotkov 9bfb45aa1d soc/rtc: fix increased current consumption in light sleep
This fixes a configuration issue of RTC, which caused light sleep current
to be 1.35mA instead of 0.85mA.
2017-11-02 13:57:26 +08:00
zhiweijian e7020460c6 Component/bt: add value callback when send notification or indicate failed 2017-11-01 11:00:08 +08:00
zhiweijian 481e436587 Component/bt: modify close event and disconnection event params
- modify close event params
- modify disconnection event params
- modify connect event params
2017-11-01 10:40:03 +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
Jiang Jiang Jian 19aa3c72e9 Merge branch 'bugfix/wrong_ap_info_in_all_channel_scan' into 'master'
Wifi: bugfix of get wrong ap information in all channel scan

See merge request !1470
2017-10-31 15:15:07 +08:00
Jiang Jiang Jian 939b46596f Merge branch 'bugfix/btdm_unable_use_esp_ble_gatts_get_attr_value_after_long_write' into 'master'
component/bt: Fix the bug cann't use esp_ble_gatts_get_attr_value to get the att…

See merge request !1381
2017-10-31 14:45:17 +08:00
Jiang Jiang Jian 07f92f0bd1 Merge branch 'bugfix/btdm_smp_decide_association_model' into 'master'
component/bt: Fix bug of function smp_decide_association_model

See merge request !1377
2017-10-31 14:34:41 +08:00
Jiang Jiang Jian c4bb378e4c Merge branch 'bugfix/btdm_set_MAX_L2CAP_CHANNELS_error' into 'master'
component/bt: Fix bug of set MAX_L2CAP_CHANNELS error

See merge request !1448
2017-10-31 14:32:53 +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
Jiang Jiang Jian 97dffbfc47 Merge branch 'bugfix/btdm_disable_role_switch' into 'master'
component/bt: disable the use of ROLE_SWITCH feature for classic BT as workaround

See merge request !1446
2017-10-31 11:31:15 +08:00
Jiang Jiang Jian 182cd1ce4d Merge branch 'bugfix/btdm_fix_crash_when_set_device_name_null' into 'master'
component/bt: fix crash when set device name NULL

See merge request !1462
2017-10-31 11:17:49 +08:00
Jiang Jiang Jian 5b19cf23fc Merge branch 'feature/reduce_default_wifi_static_buffer_number' into 'master'
esp32: reduce default wifi static tx buffer

See merge request !1465
2017-10-31 11:16:22 +08:00
Angus Gratton 696dfbcfee Merge branch 'bugfix/fix_tcp_crash' into 'master'
fix tcp crash

See merge request !1444
2017-10-31 06:18:49 +08:00
Darian Leung b908b3cd58 unit_tests/Update unit test timer divider
This commit updates various test cases throughout esp-idf such that
the values used for timer divider pass the assertions in the timer component.
Timer divider values must be between 2 to 65536
2017-10-30 19:42:16 +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
Alexey Skalozub 5405255928 Fix losing sign when multiplying by -1 2017-10-28 03:47:00 +03:00
Angus Gratton 7c9b24b407 Merge branch 'bugfix/fix_uart_vfs_test_error' into 'master'
bugfix(uart): Don't disable console uart peripheral

See merge request !1456
2017-10-27 19:20:13 +08:00
Jiang Jiang Jian a9b63b796e Merge branch 'bugfix/btdm_cpu_core' into 'master'
component/bt : fix bug of sw interrupt cause to run btdm to different cpu core.

See merge request !1434
2017-10-27 18:36:59 +08:00
Wangjialin 102eb96c8b bugfix(uart): Don't disable console UART peripheral 2017-10-27 16:46:10 +08:00
zhiweijian 15c75974de component/bt: fix crash when set device name NULL 2017-10-27 15:21:00 +08:00
Angus Gratton ffeecde9e2 Merge branch 'feature/docs_update_timer_api' into 'master'
Timer API docs update, refactored example

See merge request !1316
2017-10-27 13:31:18 +08:00
krzychb 9b7d5d76a7 Timer API docs update, refactored example 2017-10-27 07:13:59 +02:00
Ivan Grokhotkov 00bf160f94 Merge branch 'bugfix/pthread_once' into 'master'
[pthread] Perform init_routine execution outside of the mutex

See merge request !1453
2017-10-27 09:21:55 +08:00
Angus Gratton 3338f1074f Merge branch 'bugfix/set_cppflags' into 'master'
Ensure that C++ and C compilers get the same preprocessor setup (from github)

See merge request !1459
2017-10-26 20:21:49 +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
Ivan Grokhotkov f11ad0c904 soc/rtc: fix spurious warnings about XTAL frequency on startup
1. Make sure that 8MD256 clock used to estimate XTAL frequency is enabled
   before trying to use rtc_clk_cal_ratio.
   This fixes "Bogus XTAL frequency: 0 MHz" warnings after software reset.

2. Don't call rtc_clk_xtal_freq_estimate if XTAL frequency is already
   known. This reduces startup time after deep sleep or software reset.

3. Compare known XTAL frequency and estimated one before printing a
   warning. This fixes "Possibly invalid CONFIG_ESP32_XTAL_FREQ setting
   (40MHz). Detected 40 MHz." warnings.
2017-10-26 19:53:53 +08:00