Commit graph

591 commits

Author SHA1 Message Date
Ivan Grokhotkov
848494b20f Merge branch 'feature/enable_qio_directly' into 'master'
Enable SPI flash Quad I/O in bootloader

Bootloader checks flash ID, enables Quad I/O mode based on flash type.

See merge request !479
2017-03-03 11:25:52 +08:00
Liu Zhi Fu
abdd8feebb esp32: menuconfig adds some WiFi options
1. Add options to enable/disable AMPDU
2. Add options to enable/disable WIFI NVS
3. Add options to configure WiFi RX/TX buffer number
2017-03-02 18:13:49 +08:00
Jiang Jiang Jian
3b8c9a407f Merge branch 'feature/add_user_set_mac' into 'master'
Feature/add user set mac

1. Add menuconfig for user to set mac address of wifi, bt and ethernet.
2. Add the number of MAC address generated from efuse for user to choose.
3. Add MAC address derive method.

See merge request !542
2017-03-02 17:34:14 +08:00
Jeroen Domburg
432b25f755 Merge branch 'feature/in_isr_context' into 'master'
Add xPortInIsrContext function + unit test

As title states.

See merge request !533
2017-03-02 17:17:23 +08:00
Jeroen Domburg
6739d5b99f Add xPortInIsrContext function + unit test. This function returns true when the current CPU runs in an interrupt handler context. 2017-03-02 17:00:32 +08:00
XiaXiaotian
d3eede2110 mac address: add the number of MAC address generated from efuse for user to choose
1. Add the number of MAC address generated from efuse for user to choose.

2. Add MAC address derive method.
2017-03-02 15:54:35 +08:00
XiaXiaotian
fabe0493c2 mac address: add user set mac address
add menuconfig for user to set mac address of wifi, bt and ethernet.
2017-03-01 20:51:49 +08:00
Angus Gratton
4d67a2ba8b esp32 phy_init: Move DPORT Wifi clock masks to macro values
Amended fix for c642079 !534
2017-03-01 12:11:57 +11:00
Angus Gratton
98f8594151 esp32 dport_reg.h: Fix typo in register bit names 2017-03-01 12:01:07 +11:00
XiaXiaotian
f36c909528 update phy and rtc lib
1. RTC V214: modify APLL function for the chip of ECO version.

2. Add API phy_close_rf() and use it in esp_phy_deinit() instead of pm_close_rf().

3. RTC V213: fix BT will not work when BT-init is called more than once.
2017-02-27 19:54:22 +08:00
XiaXiaotian
c6420792f2 1. Do not disable clock for generating random number.
2. And fix the bug that system crashes if call esp_wifi_stop() twice.
2017-02-27 16:48:04 +08:00
qiyueixa
d9c649d26e wifi: fix issue in setting channel API 2017-02-24 22:08:54 +08:00
qiyueixa
ff81e17504 wifi: fix issue in setting channel before sniffer is enabled 2017-02-24 15:19:31 +08:00
Ivan Grokhotkov
36b3963efb Merge branch 'feature/btdm_ram_config' into 'master'
Optimize or release memory in bluetooth

1. add option to release about 30K from BT if BLE only
2. later BT/BLE will be separated by BT/BLE macro, but this option should use when user make sure that in BLE only mode.

See merge request !520
2017-02-23 18:21:16 +08:00
Tian Hao
55693b1168 component/bt : add option to release about 30K from BT if BLE only
1. later BT/BLE will be separated by BT/BLE macro, but this option should use when user make sure that in BLE only mode.
2017-02-21 17:46:59 +08:00
Ivan Grokhotkov
26dec992eb deep sleep: add note about disabling WiFi and BT
This change adds a note to esp_deep_sleep that applications should disable WiFi and BT before going into deep sleep.
SNTP example is also updated.
2017-02-21 17:07:16 +08:00
Ivan Grokhotkov
d3fde5188e deep sleep: bring some registers into known state
In case WiFi/BT stack has been enabled but wasn’t disabled, some RTC
bits may be left enabled, causing increased current consumption.
This change returns some of the bits back to their default values.
2017-02-21 17:07:15 +08:00
XiaXiaotian
a51f378ecc bugfix: it causes exception that wifi interrupt happens when read/write flash, if pp_post() is on icache. 2017-02-21 14:25:34 +08:00
XiaXiaotian
678ec0bd04 Merge branch 'master' of ssh://gitlab.espressif.cn:27227/idf/esp-idf into feature/disable_phy_rf_when_disable_wifi_bt 2017-02-21 01:20:48 +08:00
XiaXiaotian
bb0298bc71 coexist: enable coexist when wifi&bt are enabled, disable coexist when one of wifi&bt is disabled. 2017-02-20 23:53:25 +08:00
XiaXiaotian
770c2ade05 phy init: modify some comments 2017-02-20 10:44:40 +08:00
Tian Hao
4bd5b0c91a component/bt : add bt enable/disable for power save
1. add new APIs bt controller enable/disab/deinit
2. make bt controller work need to call two APIs of esp_bt_controller_init and enable
3. modify phy init to make mac reset once
2017-02-17 19:24:58 +08:00
XiaXiaotian
8f3d1d3184 fix compile error that if enable CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION compile fail 2017-02-17 15:29:11 +08:00
Tian Hao
ad890aa5ea component/bt : wide range work temperature for bluetooth RF
1. add PLL track for bluetooth RF for wide range temperature
2. move some initialized codes to cache
2017-02-17 12:26:28 +08:00
XiaXiaotian
cd13c9e95d disable phy and rf
1. add a macro in menuconfig for users to choose whether store phy calibration data into NVS or not.

2. rename some disable phy and rf APIs so that existing code which calls old APIS will fail to compile.
2017-02-17 10:24:55 +08:00
XiaXiaotian
eb14284c92 disable PHY and RF when stop WiFi and disable BT
1. Add disable PHY and RF when WiFi and BT are both disabled(including call sniffer disable API).

2. Do not init PHY and RF when cpu start. Init PHY and RF when call Wifi or BT start APIs(including sniffer enable API).

3. Add a temporary lib: librtc_clk.a and will delete it when CPU frequency switching function is done.

4. Add an function to get OS tick rate.

5. Do not put the whole pp.a in iram0, only put lmac.o, ieee80211_misc.o, ets_time.o and wdev.o in iram0.
2017-02-17 10:24:54 +08:00
Ivan Grokhotkov
dd5401749d Merge branch 'bugfix/phy_init_write_nvs_once' into 'master'
phy_init: don’t rewrite valid calibration data

In the default PHY init routine, calibration data is loaded from NVS.
Most of the time the incremental changes to calibration will be fairly
small, so we don’t need to rewrite the existing calibration data stored
in the NVS.

Possible enhancement to be done in the future: expose a function in PHY
library to tell how big was the change in calibration data. If the
change was significant, then calibration data stored in NVS should be
updated.

See merge request !487
2017-02-15 13:26:22 +08:00
Ivan Grokhotkov
25f05bef71 Merge branch 'bugfix/OTA_and_flash_encryption_incompatible' into 'master'
bootloader_support: fix bug OTA & flash encryption incompatible

github issue:https://github.com/espressif/esp-idf/issues/253

See merge request !464
2017-02-15 13:24:10 +08:00
Liu Zhi Fu
7093c59a74 esp32: update wifi lib for some fixes and optimizations
1. Reduce the default static rx buffer size from 25 to 10
2. Adjust ampdu interrupt size to 3, namely, raise 1 interrupt per 3-mpdu
3. Make a copy for all received packets, including AMSDU/AMPDU/MPDU
4. Fix softap mis-forward issue
5. Fix pp q full issue
6. Fix sniffer copy wrong content issue
2017-02-10 10:28:03 +08:00
Angus Gratton
68cba2a1fb Bootloader: Support switching to Quad I/O mode during boot process 2017-02-09 08:44:05 +11:00
Ivan Grokhotkov
777816cb99 phy_init: don’t rewrite valid calibration data
In the default PHY init routine, calibration data is loaded from NVS.
Most of the time the incremental changes to calibration will be fairly
small, so we don’t need to rewrite the existing calibration data stored
in the NVS.

Possible enhancement to be done in the future: expose a function in PHY
library to tell how big was the change in calibration data. If the
change was significant, then calibration data stored in NVS should be
updated.
2017-02-07 15:14:45 +08:00
Jiang Jiang Jian
89fea85a45 Merge branch 'bugfix/fix_several_wifi_misc_issues' into 'master'
esp32: fix several misc wifi issue

1. Fix ssid_str not free issue
2. Fix sniffer not work issue
3. Fix null parameter cause esp_wifi_init crash issue
4. Enable ap ampdu rx interface

See merge request !484
2017-02-07 11:15:58 +08:00
Liu Zhi Fu
b748a63a43 esp32: fix several misc wifi issue
1. Fix ssid_str not free issue
2. Fix sniffer not work issue
3. Fix null parameter cause esp_wifi_init crash issue
4. Enable ap ampdu rx interface
2017-02-06 17:56:42 +08:00
Ivan Grokhotkov
c78aa138b0 Merge branch 'bugfix/esp32_core_dump_wd_uart' into 'master'
esp32: Fixes watchdog problem when printing core dump to uart

1) Fixes watchdog problem when printing core dump to uart
2) Also fixes generation of core dumps when flash cache is disabled


See merge request !472
2017-02-06 17:44:08 +08:00
Alexey Gerenkov
04acc88023 esp32: Fixes watchdog problem when printing core dump to uart
Also fixes generation of core dumps when flash cache is disabled
2017-02-01 18:39:28 +03:00
Angus Gratton
b6a2329f0f FreeRTOS: esp_crosscore_int_send_yield() should be in IRAM
Possible for xQueueGenericSendFromISR -> xTaskRemoveFromEventQueueList
-> taskYIELD_OTHER_CORE code path to occur while cache is off.
2017-01-26 18:53:02 +11:00
Liu Zhi Fu
385c61e183 esp32: udpate wifi lib to fix two datapath issues
1. fix ampdu<->mpdu<->ampdu switch may cause rx slow issue by put mpdu into ampdu reorder queue
2. fix each ac first sending always fail issue by adding retry
2017-01-26 15:35:04 +08:00
qiyueixa
03e3b137bf lwip: optimize the dhcp client
1. modify the discover retry backoff time from (2,4,8,16,32,60,60)s to (500m,1,2,4,8,15,15)s.
2. add DHCP_DOES_ARP_CHECK to menuconfig for users to specify if do a ARP check on the offered address.
   If enable, one more second will be taken in obtaining IP address.
3. update wifi libs
2017-01-23 13:44:34 +08:00
Dermot Duffy
6f3f3bb30c Add missing bit from LEDC interrupt state struct.
Resolves #191 https://github.com/espressif/esp-idf/pull/191
2017-01-20 14:57:24 +11:00
Angus Gratton
b022232e84 esp_panic.h: Add C++ include guards 2017-01-20 14:56:59 +11:00
Liu Zhi Fu
12b1c99962 esp32: update wifi lib to fix ap not respond BA bug
Currently softap doesn't respond BA when receiving AMPDU, this fix is to fix this bug
2017-01-19 18:01:32 +08:00
Ivan Grokhotkov
7eb570b039 Merge branch 'bugfix/phy_auto_init' into 'master'
Move PHY options out of WiFi config, improve descriptions

- move PHY-related settings into new menu, make it dependent on WIFI_ENABLED || BT_ENABLED

- improve descriptions of Ethernet Kconfig options


See merge request !443
2017-01-19 13:27:17 +08:00
Ivan Grokhotkov
b1df4c47f9 kconfig: define ESP32_PHY_MAX_TX_POWER if PHY_ENABLED
ESP32_PHY_MAX_TX_POWER option is only meaningful for WiFi, so previous
change made it depend on WIFI_ENABLED. However if WiFi is not enabled,
but BT is, this option becomes undefined which breaks phy_init_data
generation.

This change turns ESP32_PHY_MAX_TX_POWER into a hidden parameter, which
depends on PHY_ENABLED. New user-visible parameter,
ESP32_PHY_MAX_WIFI_TX_POWER is introduced which depends on WIFI_ENABLED
and is used as default value for ESP32_PHY_MAX_TX_POWER if WIFI_ENABLED
is set. Otherwise ESP32_PHY_MAX_WIFI_TX_POWER is set to 20.
2017-01-19 10:58:09 +08:00
Ivan Grokhotkov
12e3992ae2 Merge branch 'bugfix/console_uart_none' into 'master'
Fix compilation if CONSOLE_UART is set to NONE

CONFIG_CONSOLE_UART_BAUDRATE is not defined

See merge request !445
2017-01-19 10:18:33 +08:00
Ivan Grokhotkov
7c155ab647 Merge branch 'bugfix/flash_op_unpinned_task' into 'master'
fixes for issues observed when using spi_flash

This MR fixes three unrelated issues:

- Race condition in spi_flash_enable_interrupts_caches_and_other_cpu
  when operations on unpinned tasks are performed.
  The issue is reported in https://github.com/espressif/esp-idf/pull/258

- esp_intr_noniram_disable doesn’t disable interrupts when compiled in
  release mode. This issue manifested itself with an illegal instruction
  exception when task WDT ISR was called at the time when flash was
  disabled.
  Fixes https://github.com/espressif/esp-idf/issues/263.

- Tick hooks on CPU1 were not called if CPU0 scheduler was disabled for
  significant amount of time (which could happen when doing flash erase).
  The issue manifested itself as “INT WDT timeout on core 1” error.
  Fixes https://github.com/espressif/esp-idf/issues/219.

See merge request !441
2017-01-19 10:14:34 +08:00
Angus Gratton
9a8a82e857 phyinit: Use PHY config to enable, don't need phy_get_romfunc_addr to init 2017-01-19 11:18:44 +11:00
Tian Hao
97e3c0fec4 kconfig: move PHY-related settings into new menu
- PHY options must be shown when either WIFI or BT is enabled.

- Add clarification that TX power option applies to WiFi only.
2017-01-19 00:30:20 +08:00
me-no-dev
865b21d5a1 Fix compilation if CONSOLE_UART is set to NONE
CONFIG_CONSOLE_UART_BAUDRATE is not defined
2017-01-18 15:36:10 +02:00
XiaXiaotian
0564263e5b tw7809: fix station no rewiring softap probability 2017-01-18 20:17:03 +08:00
Ivan Grokhotkov
f7e2e456e4 intr_alloc: mark inline asm operand as earlyclobber
When compiling in release mode, compiler was choosing same register for
oldint and intmask variables, so INTENABLE was never modified.
This effectively broke disabling of non-IRAM interrupts during flash
operations, observed in the existing tests if task watchdog is enabled.
This change adds an extra constraint tells the compiler that output
operand should not be placed into the same register as an input one.
2017-01-18 18:31:06 +08:00