Commit graph

463 commits

Author SHA1 Message Date
Angus Gratton 3cfe738fcf Merge branch 'bugfix/minor_issues' into 'master'
Bugfixes from Github

Many small fixes for open github issues.

See merge request !334
2016-12-28 13:18:34 +08:00
Angus Gratton 06e03ff52e Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portTICK_PERIOD_MS
Closes github #51 https://github.com/espressif/esp-idf/issues/51
2016-12-28 10:23:13 +11:00
Angus Gratton 1e44f72e98 esp_wifi_init: Update comment about init event_q
Closes github #28 https://github.com/espressif/esp-idf/issues/28
2016-12-28 10:17:56 +11:00
Angus Gratton c1a6d55116 WiFi interface: SSID and password fields should be uint8_t in all cases
Closes github #40 https://github.com/espressif/esp-idf/issues/40
2016-12-28 10:17:56 +11:00
Angus Gratton 4cfbe80b0f Merge branch 'bugfix/bootloader_stack' into 'master'
bootloader: Check if DRAM segments are going to collide with stack



See merge request !330
2016-12-22 12:15:18 +08:00
Angus Gratton bae0149920 Merge branch 'bugfix/minor_fixes' into 'master'
Minor fixes from various sources

- Fix memory debugging code. Noticed by Tuan.
- intr_enable/disable should be in IRAM. Noticed by rojer
- Still old timer code in examples in doxygen comments. Noticed on the forum by jumjum123
- Timer example was broken. Noticed on the forum by jumjum123

See merge request !325
2016-12-21 06:54:33 +08:00
Angus Gratton 198889ad26 bootloader: Check if DRAM segments are going to collide with stack 2016-12-20 16:14:07 +11: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
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
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
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 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
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
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
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
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
Jeroen Domburg 1cb2081d99 Do not disable entire IRAM pool; instead disable only the bit that is used. This gives us 50K of iram at the moment. 2016-12-15 15:03:22 +08:00
Jeroen Domburg 25e7f3a303 Add name to tag type 2016-12-15 15:03:22 +08:00
Deomid Ryabkov d288a3d053 Remove alignment reqs from spi_flash_{read,write} 2016-12-15 10:07:31 +11:00
Angus Gratton 487548e7dd Merge branch 'bugfix/build_system_linker_script_deps' into 'master'
build system: Linker scripts or binary libraries should trigger a re-link

Add binary libraries and linker scripts to the list of dependencies for the ELF file.

Fixes TW7816.


See merge request !307
2016-12-15 05:38:54 +08:00
Jeroen Domburg d5c57d1d10 Put ets_isr_* functions into IRAM. Original fns were in ROM so people may expect them to work when flash cache is out. 2016-12-13 13:24:01 +08:00
Jeroen Domburg 78161a1fe3 Replace non-multicore-aware rom funcs with multicore-aware funcs, ESP_LOG->ESP_EARLY_LOG fix, reserve ints used in wireless libs. Fixes WiFi crashing 2016-12-13 13:24:01 +08:00
Angus Gratton bbe1bceda8 build system: Project ELF should depend on linker scripts, binary libraries
TW#7816
2016-12-12 15:58:53 +11:00
Angus Gratton bab1d49f1f Merge branch 'feature/esptool_flash_encryption' into 'master'
Flash encryption support

Flash encryption support in build system, tooling

To come in future MR:
* On-device key generation on first boot (for production devices), need to finalise testing of bootloader entropy seeding.
* spi_flash_encrypted_write to support non-32-byte block writes (at least optionally.)
* I think a lot of the bootloader_support component can possibly be rolled into "spiflash" and other components, to use a common API.

See merge request !240
2016-12-12 06:50:46 +08:00
Jeroen Domburg bf57594ebe Merge branch 'feature/intr_alloc' into 'master'
Add dynamic interrupt allocation mechanism

This adds:
- Dynamic allocation of interrupts. Pass it the features of the interrupt you want, it'll set you up with an int.
- Shared interrupts. Enables multiple peripheral drivers to use the same interrupt. 
- Marking what interrupts are fully executable from IRAM; if an int isn't marked like that it will get disabled once flash cache gets disabled.

Also:
- Modifies driver to be in line with these changes

See merge request !254
2016-12-09 14:00:39 +08:00
Angus Gratton 9fd7908bbe Merge branch 'bugfix/spiflash_erase_block' into 'master'
SPI flash: Block erase size 64KB not 32KB

Reverts changes made in 9f9d92b2df

See merge request !298
2016-12-09 13:19:09 +08:00
Ivan Grokhotkov cf311d81ee Merge branch 'feature/newlib_full_format' into 'master'
newlib: add "full" formatting support

This change adds support for 64-bit formats and C99 features to newlib printf/scanf functions. This support is enabled by default in menuconfig, but can be switched off to reduce code size.

Also adds missing functions such as fmod and fmodf.

- Fixes https://github.com/espressif/esp-idf/issues/52
- Fixes https://github.com/espressif/esp-idf/issues/83


See merge request !274
2016-12-09 12:04:29 +08:00
Angus Gratton 8ba75a1e9f SPI flash: Block erase size 64KB not 32KB
Reverts changes made in 9f9d92b2df
2016-12-09 14:18:58 +11:00
Angus Gratton f807d16310 Merge branch 'feature/backtrace_dumps' into 'master'
Feature/backtrace dumps

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

(Plus reformatting of panic.c, as it hadn't been formatted to our code style yet.)

See merge request !290
2016-12-08 13:27:33 +08:00
Jeroen Domburg cb9ef19d3b Also add intr_alloc magic to rtc code 2016-12-08 12:57:57 +08:00
Jeroen Domburg 2c34ab3374 Mark some interrupts that are now allocated dynamically as free, add int handle param documentation, add local ints test 2016-12-08 12:39:33 +08:00
Jeroen Domburg 9dc908d105 Add test for local interrupts, fix int disable code 2016-12-08 12:39:33 +08:00
Jeroen Domburg ae8c37e0b6 Add disabling/enabling of shared interrupt, add testcase for interrupts 2016-12-08 12:39:33 +08:00
Jeroen Domburg 32fa94935d Changes according to merge request 2016-12-08 12:39:33 +08:00
Jeroen Domburg 655fd2986a Add interrupt allocation scheme / interrupt sharing. Also modifies drivers and examples. Also allows interrupts
to be marked specifically as having a handler that's all in IRAM.
2016-12-08 12:39:33 +08:00
Ivan Grokhotkov 221dc13535 newlib: add "full" formatting support, add missing functions
- add two versions of libc: libc.a and libc_nano.a. First one has full C99 formatting support, second one uses “nano” formatting functions available in ROM.
- fix linker error for fmod, fmodf, atof, atoff
- update tests
2016-12-08 11:04:54 +08:00
Ivan Grokhotkov e3eff5deb9 cpu_start: tabs->spaces 2016-12-08 10:20:12 +08:00
Angus Gratton b98405f9d9 esp32: ReformatReformat panic.c (remove tabs, etc) 2016-12-07 13:25:56 -08:00
Deomid Ryabkov 20fd57f147 Add backtrace to exception output.
On Xtensa windowed ABI backtrace is easy to do, and it's immensely
useful for debugging, so - do it by default.
We try to be careful and not deref bogus pointers while walking the
frames.

Example output (from debugging espressif/esp-idf#133):

Backtrace: 0x1:0x3ffc51e0 0x400e9dfa:0x3ffc5210 0x400e9ebc:0x3ffc5230 0x400ec487:0x3ffc5260

With just addr2line utility from binutils, this already pinpoints the
location of the crash.
2016-12-07 19:58:06 +00:00
Ivan Grokhotkov 13d802262a cpu_start: disable boot watchdog only after starting the main task
Boot watchdogs were disabled very early in startup code. It was possible to introduce an infinite loop anywhere in the many functions called from startup code, and this would not be detected by interrupt watchdog and task watchdog. This change postpones disabling of boot watchdogs to the point when the scheduler is running. Also replaces register expressed using integer address with a name.
2016-12-08 01:42:37 +08:00