Commit graph

6887 commits

Author SHA1 Message Date
Ivan Grokhotkov
ba08d1ae25 Merge branch 'feature/phy_init_data_update' into 'master'
phy init data update

This changes 54M target power from 16 dBm to 15 dBm, and bumps init_data version from 0 to 1.

See merge request !322
2016-12-20 10:26:16 +08:00
Ivan Grokhotkov
41ce99db32 Merge branch 'feature/ulp' into 'master'
ULP: add new instructions, fix bugs, add tests

This adds peripheral register read and write instructions, an instruction to wake the SoC from deep sleep, and some tests.

Also fixes two bugs: ANDI instruction definition, and running the ULP when in deep sleep mode.

See merge request !317
2016-12-20 10:25:55 +08:00
Jeroen Domburg
4c86aba160 Merge branch 'bugfix/exception_handling' into 'master'
Fix exception handler to jump to correct vector instead of crashing to the double exception vector.

One-character fix... basically, this caused the exception handler to crash into the double-exception handler instead of nicy panic'ing.

See merge request !323
2016-12-20 09:22:41 +08:00
Angus Gratton
7ba6be782e Merge branch 'feature/secure_boot_remote_sign' into 'master'
Secure boot: Option for app & partition table signing to happen outside build system

Allows for a remote signing server, private signing key does not need to be on the build system.

See merge request !320
2016-12-20 07:04:31 +08:00
Angus Gratton
59e0f63d37 Build system: Add make erase_flash target 2016-12-20 10:00:04 +11:00
Angus Gratton
d031530196 Merge branch 'feature/dhcpserver_null_gw' into 'master'
Allow gw to be null

Github Pull Request 163: https://github.com/espressif/esp-idf/pull/163

Allow interfaces to be configured without a default gateway, for
local-only communication.

In case of the AP interface, if gw is not set, do not offer it.

See merge request !312
2016-12-20 06:14:44 +08:00
Wangjialin
6a8a9a0272 bugfix: ring buffer, fix api xRingbufferReceiveUpToFromISR 2016-12-20 01:13:03 +08:00
Deomid Ryabkov
1597f7a035 Add IRAM_ATTR to esp_intr_{enable,disable}
So it's safe to invoke from ISR

Signed-off-by: Jeroen Domburg <jeroen@espressif.com>
2016-12-19 18:49:28 +08:00
Jeroen Domburg
99849ca2cc Fix timer example; it had too little stack resulting in a stack overflow 2016-12-19 18:48:08 +08:00
Jeroen Domburg
93e72649dc Fix memory debugging code 2016-12-19 18:48:08 +08:00
Jeroen Domburg
4854dcf0eb Get rid of old interrupt example code 2016-12-19 18:48:08 +08:00
Tian Hao
65fe6ab320 component/bt : modify demo for new api
1. modify GATT Client demo
2. modify GATT Server demo
3. fix a register notify bug
2016-12-19 17:15:41 +08:00
Tian Hao
c01dedcb06 component/bt : change api for V2.0
1. change all gatt cb function to 3 args and function type. add gattc_if/gatts_if as second argument
2. delete gatt_if of "gatt cb param"
3. separate conn_id and gatt_if from conn_id
4. change the demo code as the gatt changed
2016-12-19 17:15:41 +08:00
Jeroen Domburg
bb584c4333 Fix exception handler to jump to correct vector instead of crashing to the double exception vector. 2016-12-19 16:01:21 +08:00
Ivan Grokhotkov
4853df9c83 phy init data update
This changes 54M target power from 16 dBm to 15 dBm, and bumps init_data version from 0 to 1.
2016-12-19 14:23:39 +08:00
Wang Jia Lin
1ed584f896 Merge branch 'driver_merge_tmp/merge_sigmadelta' into 'master'
driver: sigma-delta

1. add sigma-delta code and example.
2. add gpio output signal in io matrix.

See merge request !241
2016-12-19 12:29:32 +08:00
Angus Gratton
d6fafd00db Secure boot: Option for app & partition table signing to happen outside build system 2016-12-19 13:12:05 +11:00
Wangjialin
b00b75db7e driver: sigma-delta
1. add sigma-delta code and example.
2. add gpio output signal in io matrix.

Squashed commits:
[a25e7d4] minor changes for doc
[6a03a1e] minor changes on comments and doc.
[97dd9e4] Add doc.
update index.rst
change example index
2016-12-18 17:20:17 +08:00
Deomid Ryabkov
2c165aba36 uart_intr_config should return ESP_OK on success 2016-12-16 22:27:45 +00:00
Ivan Grokhotkov
b62f8b42d4 ulp: document peripherals accessible using RD_REG and WR_REG 2016-12-16 20:32:34 +08:00
Ivan Grokhotkov
7a527896dc ulp: use timer to start ULP, fix I_ANDI bug, add tests
Starting the ULP using SENS_SAR_START_FORCE_REG doesn’t disable clock gating of RTC fast clock.
When SoC goes into deep sleep mode, RTC fast clock gets gated, so ULP can no longer run.
Instead, it has to be started using the timer (RTC_CNTL_ULP_CP_SLP_TIMER_EN bit).
When ULP is enabled by the timer, clock also gets enabled.
2016-12-16 20:25:38 +08:00
Ivan Grokhotkov
7b02eae9e6 ulp: add RD_REG, WR_REG, END instruction 2016-12-16 20:01:15 +08:00
Tian Zhong Xing
461aab3e75 bootloader: fix error pointer to ota select info 2016-12-16 18:47:25 +08:00
Ivan Grokhotkov
576052e5c2 Merge branch 'feature/extend_deep_sleep_apis' into 'master'
extend deep sleep APIs

This adds the following APIs to enable various wakeup sources:
- esp_deep_sleep_enable_timer_wakeup
- esp_deep_sleep_enable_ulp_wakeup
- esp_deep_sleep_enable_ext0_wakeup
- esp_deep_sleep_enable_ext1_wakeup

And an API to start deep sleep:
- esp_deep_sleep_start

Add an API to control which peripherals are kept enabled in deep sleep mode:
- esp_err_t esp_deep_sleep_pd_config

Also rolled an update of rtc_io header comments into this MR, as I had to add `slpie`, `slpsel`, and `hold` fields into `rtc_gpio_desc_t` struct.

Deep sleep unit tests don’t do anything useful in CI context because we don’t have a way to check reset behavior (time till reset, reason for reset) in CI environment, yet. Also for external wakeup we would need to control some ESP32 pins from the test environment.

Currently there is one known issue:
- RTC Fast memory may be isolated from the bus after deep sleep reset. We work around this by setting FORCE_NONISO flag in RTC power control register. This is non-optimal and we will keep looking for the reason why isolation gets enabled.

See merge request !297
2016-12-16 16:17:37 +08:00
Ivan Grokhotkov
126d164283 docs: fix some warnings 2016-12-16 14:31:29 +08:00
Ivan Grokhotkov
628bad1dbf deep sleep: add documentation 2016-12-16 14:31:29 +08:00
Ivan Grokhotkov
370f4b8556 deep sleep: set pin configuration right before entering deep sleep
This change allows setting pin configuration for EXT1 wakeup depending on the state of RTC_PERIPH power domain:
- if peripherals are enabled (due to another wakeup mode, or due to esp_deep_sleep_pd_config call), we can keep internal pullups/pulldowns enabled
- if peripherals are disabled, pullups and pulldowns need to be disabled as well

Also add comments about the purpose of registers being configured.
2016-12-16 14:30:27 +08:00
Ivan Grokhotkov
609d852834 deep sleep: power down RTC peripherals in EXT1 sleep 2016-12-16 14:30:27 +08:00
Ivan Grokhotkov
616d1d32f1 ulp: add missing component.mk for tests 2016-12-16 14:30:27 +08:00
Ivan Grokhotkov
83184bd52b deep sleep: RTC fast memory may be disconnected after deep sleep wakeup
This adds a workaround for a bug that following deep sleep wakeup, ISO (bus isolation) signal may be set for RTC fast memory.
We set FORCE_NOISO bit in RTC_CNTL_PWC_REG until we find out what is causing ISO signal to be set.
2016-12-16 14:30:27 +08:00
Ivan Grokhotkov
35115885c5 deep sleep: add API to control power down 2016-12-16 14:30:27 +08:00
Ivan Grokhotkov
88ddf5aefa deep sleep: rename header file 2016-12-16 14:30:27 +08:00
Ivan Grokhotkov
eac80b0651 deep sleep: add option to delay CPU startup
When ESP32 wakes up from deep sleep, flash is accessed an approximately 900us after power on.
Some flash chips need more time to become ready. This change adds a menuconfig option to add
some delay to the default deep sleep wake stub.

Fixes https://github.com/espressif/esp-idf/issues/117
2016-12-16 14:30:27 +08:00
Ivan Grokhotkov
3b854fe46a deep sleep: implement wake up using ULP, EXT0, EXT1 sources
This adds the following APIs to enable various wakeup sources:
- esp_deep_sleep_enable_timer_wakeup
- esp_deep_sleep_enable_ulp_wakeup
- esp_deep_sleep_enable_ext0_wakeup
- esp_deep_sleep_enable_ext1_wakeup

And an API to start deep sleep:
- esp_deep_sleep_start
2016-12-16 14:30:27 +08:00
Ivan Grokhotkov
71daf49e39 driver/rtc_io: improve header comments
Fix descriptions of return values, fix typos, use upper case for abbreviations.
2016-12-16 14:30:27 +08:00
Angus Gratton
d246836cfc Merge branch 'feature/spiflash_unaligned_readwrite' into 'master'
Remove alignment reqs from spi_flash_{read,write}

Github pull request https://github.com/espressif/esp-idf/pull/155

See merge request !311
2016-12-16 13:28:12 +08:00
Angus Gratton
9d8e110202 Build system: Deal with the case where IDF_PATH contains ~
See github issue https://github.com/espressif/esp-idf/issues/118

(This is easier to work around in the build system than to document.)
2016-12-16 11:30:37 +11:00
Wu Jian Gang
87d0eb0fdb Merge branch 'feature/tw8657_refractor_to_sniffer' into 'master'
refactor to sniffer

1. WiFi send the whole packet to smartconfig
2. Fixed some modem sleep bugs


See merge request !306
2016-12-15 19:03:44 +08:00
Liu Zhi Fu
3984d96acb esp32: refactor to sniffer
1. TW8657, WIFI send the whole packet to smartconfig;
2. modify API annotation of smartconfig and sniffer;
3. export smartconfig APIs to programming guide;
2016-12-15 18:20:00 +08:00
Wu Jian Gang
847092e483 Merge branch 'bugfix/tw9240_fix_lwip_dual_core_issue' into 'master'
lwip: fix lwip dual core issue

Call xSemaphoreGiveFromISR instead xSemaphoreGive when the calling context is in critical section.

See merge request !314
2016-12-15 17:33:28 +08:00
Xia Xiaotian
eec743d04c esp32: update wifi lib, fix some modem sleep bugs
1. tw7426: fix the bug that config ap crashes(7bb90c19)
2. tw9149: fix memory leak in modem sleep(1f450cb8)
3. tw9157: fix dtim change log in modem sleep(1f450cb8)
4. update smartconfig.a
2016-12-15 17:18:40 +08:00
Ivan Grokhotkov
9d5f4e877e Merge branch 'bugfix/heap_alloc_no_iram' into 'master'
Restore ability to alloc IRAM, and more.

- Fix mem regions so allocating IRAM works again
- Optimize allocator slightly, uses 4 less bytes per malloc now
- Allow querying free heap memory space per memory type


See merge request !301
2016-12-15 16:28:29 +08:00
Jiang Jiang Jian
70d39aa105 Merge branch 'bugfix/btdm_bluedroid' into 'master'
Bugfix/btdm bluedroid

Cleanup all the warnings。
Fix GATT CLIENT cannot receive notfiy/indicate from GATT SERVER bug.

Originally, bluetooth have its own master branch(feature/btdm_bluedroid), all the bluetooth sub branch will merge to feature/btdm_bluedroid firstly. If feature/btdm_bluedroid is ready, it will request merge to master. But as Ivan/JG/Jack's requires, all the bluetooth bugfix or feature will request merge to master ASAP.
This MR contains "cleanup warning " and "some bug fix", after, every merge request only contain one thing.

See merge request !286
2016-12-15 16:10:21 +08:00
Jeroen Domburg
dc9646bc53 Merge branch 'bugfix/uart_examples_intr' into 'master'
Update uart examples in uart.h to new interrupt allocation scheme

Some of the examples in the UART header haven't been adjusted to the new interrupt scheme; this fixes that. Also runs dos2unix on the drivers tree; a fair few drivers used DOS-style line ends.

See merge request !313
2016-12-15 15:15:32 +08:00
Liu Zhi Fu
55726385a4 add more comments and call portYIELD when necessary 2016-12-15 15:06:00 +08:00
Jeroen Domburg
712f53176d Make internal function static 2016-12-15 15:03:22 +08:00
Jeroen Domburg
6f0a494cae Add testcase, fix executable memory allocated in shared dram/iram region 2016-12-15 15:03:22 +08:00
Jeroen Domburg
1e117dc3d3 Fix small things noticed in MR, add documentation 2016-12-15 15:03:22 +08:00
Jeroen Domburg
293ad4cd36 Add xPortGetFreeHeapSizeCaps and xPortGetMinimumEverFreeHeapSizeCaps plus everything it entails. Allows querying the available memory for various capabilities. Also: xPortGetFreeHeapSize and xPortGetMinimumEverFreeHeapSize now return the expected value. Bonus: the linked list used in the allocator is now 4 bytes smaller, which should save some memory. 2016-12-15 15:03:22 +08:00
Jeroen Domburg
3f3cf397f7 Tabs -> spaces 2016-12-15 15:03:22 +08:00