Commit graph

319 commits

Author SHA1 Message Date
Jeroen Domburg
dc6c19f560 Merge branch 'feature/tighter_rom_memory_defines' into 'master'
Use more regions reserved for ROM routines/stack we don't use for heap.

This frees up about 28K of RAM.

See merge request !467
2017-03-09 20:25:07 +08:00
Jeroen Domburg
17a4a2527d MR things 2017-03-09 19:59:09 +08:00
Jiang Jiang Jian
cd4e4fb351 Merge branch 'feature/wifi_deinit_2' into 'master'
wifi deinit: update esp_wifi_deinit()

1. move ets_timer_deinit() to wifi_deinit()

2. delete wifi api mutex when wifi deinit

See merge request !563
2017-03-09 15:35:36 +08:00
Jeroen Domburg
3462b53fbc MR suggestions 2017-03-08 19:27:30 +08:00
Jeroen Domburg
0db8b00b8a tight 28k 2017-03-08 19:04:28 +08:00
Ivan Grokhotkov
66c693eebb Merge branch 'feature/deep_sleep_wakeup_from_touch' into 'master'
add wakeup from touch sensor, and deep sleep example

- add new deep sleep wakeup mode
- change documentation to explain incompatibilities between different wakeup mode, add error checks
- add new ULP instructions necessary for ULP wakeup scenario
- fix issues with I_WR_REG, I_SLEEP, I_END instructions
- add deep sleep example, illustrating the use of timer, gpio, touch, and ULP wakeup triggers

See merge request !461
2017-03-08 14:27:58 +08:00
XiaXiaotian
624ad1bd8b wifi deinit: update esp_wifi_deinit()
1. move ets_timer_deinit() to wifi_deinit()

2. delete wifi api mutex when wifi deinit
2017-03-08 11:00:02 +08:00
Jiang Jiang Jian
8b800df720 Merge branch 'feature/btdm_cfg_stack_size' into 'master'
component/bt: optimize stack size of Bluetooth Tasks and make them be configurab…

Bluetooth tasks' stack size are optimized and can be configured by the CONFIG_NEWLIB_NANO_FORMAT option.

See merge request !559
2017-03-07 11:21:07 +08:00
wangmengyang
870389b3ba component/bt: optimize stack size of Bluetooth Tasks and make them be configurable according to the CONFIG_NEWLIB_NANO_FORMAT option 2017-03-06 23:09:42 +08:00
Ivan Grokhotkov
153472d70d Merge branch 'bugfix/soc_io_mux_h' into 'master'
esp32: update io_mux_reg.h to latest version

fixes https://github.com/espressif/esp-idf/issues/349

See merge request !546
2017-03-06 22:36:19 +08:00
Angus Gratton
d6f183fbb9 esp_err: Use separate code path for ESP_ERROR_CHECK assertion
* Minimum code size overhead
* Makes function safe to use when flash cache is disabled

Builds on #339 https://github.com/espressif/esp-idf/pull/339
2017-03-03 15:33:23 +11:00
Angus Gratton
e08cf27b8a esp_err: add NDEBUG guard, comment about flash cache
Follow-up to 316b040
2017-03-03 14:59:15 +11:00
Neil Kolban
e14d65d704 Update to ESP_ERROR_CHECK
See request from ESP_Angus here:
https://esp32.com/viewtopic.php?f=18&t=1179

Merges #339 https://github.com/espressif/esp-idf/pull/339
2017-03-03 14:59:15 +11:00
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
Ivan Grokhotkov
65b7b22c09 esp32: update io_mux_reg.h to latest version
fixes https://github.com/espressif/esp-idf/issues/349
2017-03-02 19:35:28 +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
23f933a78d mac address: add user set mac address
add menuconfig for user to set mac address of wifi, bt and ethernet.
2017-03-01 20:42:46 +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
qiyueixa
ff81e17504 wifi: fix issue in setting channel before sniffer is enabled 2017-02-24 15:19:31 +08:00
Ivan Grokhotkov
dbf60eb922 rtc: fix typo in RTC_CNTL_SLOWCLK_FREQ macro name 2017-02-22 14:40:36 +08:00
Ivan Grokhotkov
a64181f14f deep sleep: add functions to check wakeup cause
This change adds esp_deep_sleep_get_wakeup_cause, which returns the
source which has caused wakeup from deep sleep.

Similar to esp_deep_sleep_get_ext1_wakeup_status, a function is added
to check touch pad wakeup status: esp_deep_sleep_get_touchpad_wakeup_status.
This function returns the touch pad which has caused wakeup.
2017-02-22 14:40:36 +08:00
Ivan Grokhotkov
07ff47f103 deep sleep: clarify compatibility issues between wakeup sources
ULP and touch FSMs in ESP32 revisions 0 and 1 do not operate correctly
if RTC_PERIPH power domain is force powered on (ESP_PD_OPTION_ON).

Both ULP and touch still work, but clock frequency of the ULP may be
incorrect and touch values may be off by considerable amount. As such,
when these wakeup modes are used, RTC_PERIPH power domain has to be set
to ESP_PD_OPTION_AUTO (or, in the current implementation,
ESP_PD_OPTION_OFF — though this will change in the future when _OFF will
actually *force* the power domain to be powered off).

Because EXT0 wakeup source requires RTC_PERIPH to be powered ON, mark
ULP and touch wakeup sources as incompatible with EXT0. Workaround for
this is to use EXT1 wakeup source instead, which offers similar or
better functions without having to keep RTC_PERIPH powered on.
2017-02-22 14:40:36 +08:00
Wangjialin
fb261c0bd5 1. deal with conflicting wakeup triggers
2. modify deep_sleep.rst, add description of touch wakeup.
2017-02-22 14:40:36 +08:00
Wangjialin
cc13b0ea05 deep sleep: allow wakeup from touch sensor interrupt 2017-02-22 14:40:36 +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
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
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
Angus Gratton
68cba2a1fb Bootloader: Support switching to Quad I/O mode during boot process 2017-02-09 08:44:05 +11: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
Wu Jian Gang
f4d5d151aa esp32: add get idf version api 2017-01-17 16:52:42 +08:00
Ivan Grokhotkov
6538252552 Merge branch 'bugfix/panic_reset_hangs' into 'master'
Panic handler: Use same reset path as esp_restart(), disabling hardware

Closes #223 https://github.com/espressif/esp-idf/issues/223

See merge request !417
2017-01-16 10:40:47 +08:00
Angus Gratton
ea19838d3a Build: Handle WiFi & BT enabled/disabled combos gracefully as possible
If using WIFI_INIT_CONFIG_DEFAULT, error message will point out lack
of WiFi. Otherwise linker errors on WiFi symbols should help give a
clue as to what is broken.

Piggy-backs on changes in !420, ref github #230 #237
2017-01-16 13:03:17 +11:00
Neil Kolban
3efbbab2cf wifi: fix typos, rename ESP_ERR_WIFI_NOT_START to ESP_ERR_WIFI_NOT_STARTED 2017-01-16 02:38:31 +08:00
Ivan Grokhotkov
ca9f62ad77 Merge branch 'feature/esp32_core_dump' into 'master'
esp32 core dump to flash

1.  menuconfig option to select where to store core dump: flash, uart or disable
2. Saving of core dump to flash
3. Partition table definitions files with core dump partition
4. Python scripts to support core dump generation from GDB command line

See merge request !341
2017-01-13 11:51:40 +08:00
Angus Gratton
e53d307814 Panic handler: Use same reset path as esp_restart(), disabling hardware
Closes #223 https://github.com/espressif/esp-idf/issues/223
2017-01-13 14:37:36 +11:00
Ivan Grokhotkov
b24ac487cb newlib: use RTC_STORE registers to keep boot time instead of RTC_SLOW_MEM
This allows RTC_SLOW_MEM to be powered down in deep sleep if no other variables are placed into RTC_SLOW_MEM.
2017-01-12 14:43:34 +08:00
Ivan Grokhotkov
9aa0e29079 deep sleep: keep RTC_SLOW_MEM powered on if data is placed into RTC slow memory 2017-01-12 14:15:30 +08:00
Ivan Grokhotkov
e4811216ff deep sleep: fix regression due to moving ets_update_cpu_frequency into IRAM
Deep sleep stub may call ets_update_cpu_frequency, which has been moved from ROM to IRAM.
Restore the ROM version in the linker script, call it ets_update_cpu_frequency_rom, use it in the deep sleep stub.
2017-01-12 14:15:25 +08:00
Alexey Gerenkov
50b3ce616f esp32: Adds documentation and comments to core dump feature files 2017-01-11 20:51:28 +03:00
Alexey Gerenkov
39ddc7b836 esp32: Fixes several issues in core dump feature
1) PS is fixed up to allow GDB backtrace to work properly
2) MR!341 discussion: in core dump module: esp_panicPutXXX was replaced by ets_printf.
3) MR!341 discussion: core dump flash magic number was changed.
4) MR!341 discussion: SPI flash access API was redesigned to allow flexible critical section management.
5) test app for core dump feature was added
6) fixed base64 file reading issues on Windows platform
7) now raw bin core file is deleted upon core loader failure by epscoredump.py
2017-01-11 20:51:28 +03:00