Commit graph

662 commits

Author SHA1 Message Date
Jeroen Domburg
6209f1cb72 Add option for memory barriers everywhere 2017-03-28 11:50:23 +08:00
Jeroen Domburg
b863ed4151 Move debug exception vector to vector_defaults.S 2017-03-28 11:50:22 +08:00
Jeroen Domburg
527aac879d Rework high interrupt code to be able to link to external handlers; add psram test that swarms cpu with interrupts 2017-03-28 11:50:22 +08:00
Jeroen Domburg
5e934ebba0 Add option to enable compiler psram workaround. Needs custom crosstool. 2017-03-28 11:50:22 +08:00
Jeroen Domburg
378216e594 Change default mode to low/high for dualcore 2017-03-28 11:50:22 +08:00
Jeroen Domburg
1937cb4207 Do not mark SPI ram as DMA-capable 2017-03-28 11:50:22 +08:00
Jeroen Domburg
fa6cf92ee1 Fix int level 4 panics to give a correct backtrace. Add cache invalid access interrupt to panic handler reasons and wire it up to panic(). Fix issue where cache was re-enabled for pro cpu and pro cpu continuing execution while cache was still disabled on app cpu. 2017-03-28 11:50:22 +08:00
Jeroen Domburg
bc9b8482fb Do include cache error initialization files 2017-03-28 11:50:22 +08:00
Jeroen Domburg
1c4369d00f Fix intlvl 4 stuff to give a correct backtrace; add cache invalid access to intlvl4 2017-03-28 11:50:22 +08:00
Jeroen Domburg
9f86a00fc3 Fix up tests for stack not in psram on flash, add small testcase 2017-03-28 11:50:22 +08:00
Jeroen Domburg
05237496c2 Get rid of superfluous printf 2017-03-28 11:49:33 +08:00
Jeroen Domburg
15514b804d After rebasing, it was found out that flushing the cache drops the writeback-pending psram cache lines on the ground. We now evict these by reading 64/128K of memory before flushing the cache. Also fixes a snafu in psram cache mode (inverted hi/lo and even/odd selectors) as well as an option to not let the heap allocator touch the psram. 2017-03-28 11:49:33 +08:00
Wangjialin
b8b8a6b21c remove unused codes in psram driver 2017-03-28 11:49:33 +08:00
Wangjialin
3b92cdecf4 update psram driver:
1. fix init error after system restart
2. use MACROs for GPIO definition and psram id.
3. format the code
2017-03-28 11:49:33 +08:00
Jeroen Domburg
117ad017f6 More MR comment fixes 2017-03-28 11:49:33 +08:00
Jeroen Domburg
614b735787 Maybe I should try to compile before commit/push... 2017-03-28 11:49:33 +08:00
Jeroen Domburg
6262253742 Some fixes to MR comments 2017-03-28 11:49:33 +08:00
Jeroen Domburg
34ef71828f Fix warnings for test 2017-03-28 11:49:10 +08:00
Jeroen Domburg
15950f6a66 Do not declare test_spiram when option is disabled 2017-03-28 11:49:10 +08:00
Jeroen Domburg
d5b5a6e234 Fix psram silicon bug test; clean up Kconfig mess, clean out psram unused functions warnings 2017-03-28 11:49:10 +08:00
Jeroen Domburg
b816bbc43f Fix dualcore PSRAM. 2017-03-28 11:48:36 +08:00
Jeroen Domburg
068899c93b Add Doom psram test, fix free_heap_size/minimum_ever_heap_size calls to also understand combinations of caps, add psram support to allocator. At the moment, psram only works for the first core because of some funny business in the MMU of the 2nd core. 2017-03-28 11:48:03 +08:00
Jeroen Domburg
07805e0c08 Add interlan memory capability to heap alloc, add some PSRAM tests 2017-03-28 11:46:11 +08:00
Jeroen Domburg
32e83d257a Psram driver cleanup: remove DMA and test functions, tabs to spaces, add copyright header 2017-03-28 11:46:11 +08:00
Wangjialin
4a2999f729 update psram example files
1. update psram code
2. add missing files
3. add psram example
4. add mmu and psram init
2017-03-28 11:46:11 +08:00
Ivan Grokhotkov
41c6914454 Merge branch 'feature/ulp_toolchain' into 'master'
ULP coprocessor toolchain integration

- build system support for ULP coprocessor toolchain
- documentation for ULP coprocessor instruction set
- documentation for ULP code execution flow, loading programs, exchanging data
- example: counting pulses using ULP


See merge request !394
2017-03-27 13:54:51 +08:00
Dmitry Yakovlev
a6e4e89592 ulp: add build system integration and example 2017-03-27 12:41:00 +08:00
Jiang Jiang Jian
8ee6f8227e Merge branch 'bugfix/reset_mac_cause_bt_cannot_rx_data' into 'master'
Reset WIFI mac when wifi start and update wifi lib

1. reset wifi mac when wifi start

2. roll back rx hung workaround for beacon timeout

3. fix amsdu ap interface wrong issue

4. fix amsdu header parse error

5. fix amsdu flag wrong issue

6. PHY: V350, fix BT rssi bug

7. RTC: V225, fix bt will be not work when wifi is reset

See merge request !606
2017-03-24 17:02:26 +08:00
XiaXiaotian
a30c98c1a2 fix compile bug
1. split some unused rtc functions that calls phy function

2. make check bt idle more safe when reset wifi mac
2017-03-24 16:42:44 +08:00
Ivan Grokhotkov
5cf9ccf6ab Merge branch 'feature/add_auth_type_for_wpa2_enterprise' into 'master'
wpa2: add authenticate type for wpa2 enterprise



See merge request !588
2017-03-24 15:56:21 +08:00
Ivan Grokhotkov
710c853adc Merge branch 'bugfix/spi_flash_lock_period' into 'master'
SPI flash operations lock for shorter periods

Based on bug report here:
https://esp32.com/viewtopic.php?f=13&t=1489&p=6816#p6773

Long SPI flash erase (and possibly write/read) cycles block all tasks on both CPUs for an extended period, and can lead to WiFi dissassociation (and general priority inversion.)

This MR inserts preemption breaks into large operations (all erases, writes every 8KB, reads every 16KB).

Overhead of a single spi_flash_guart_start()/spi_flash_guard_end() cycle measured at approx 67us (assuming no preemption.)

See merge request !600
2017-03-24 15:55:42 +08:00
Angus Gratton
0e31eb458e esp32: Move heap_alloc_caps to IRAM
Rest of malloc() path was already in IRAM
2017-03-24 10:41:45 +08:00
Ivan Grokhotkov
573cc7d36f esp32: make soc header compatible with assembler 2017-03-24 10:11:14 +08:00
Ivan Grokhotkov
6ad0a157e3 driver/rtc: add APIs to enable/disable hold function 2017-03-24 10:11:13 +08:00
Angus Gratton
b9a06e68dd Merge branch 'bugfix/minor_fixes' into 'master'
Minor fixes and PRs cherry-picked from Github



See merge request !602
2017-03-23 17:57:28 +08:00
Ivan Grokhotkov
ecee175962 Merge branch 'bugfix/nvs_init_check_empty_pages' into 'master'
Error handling in NVS initialization

Previously nvs_flash_init worked under an assumption that there should always be at least one free page available. This is true during normal operation, but in some cases (such as when changing application partition table from a non-OTA to an OTA one), NVS partition may get truncated, which will cause empty pages to be lost.

This MR adds error checks for this condition, and updates code which calls `nvs_flash_init` to check for the return code.
For most examples, a simple `ESP_ERROR_CHECK` is added around `nvs_flash_init`. For NVS examples and the OTA example, more robust error handling is added.

This change also removes nvs_flash_init calls from examples which don't use NVS.

See merge request !582
2017-03-23 17:57:15 +08:00
Angus Gratton
0f1109a9a2 Merge branch 'bugfix/idf_monitor' into 'master'
idf_monitor: Small fixes (baud rate, EOL, /dev/tty.X on macOS, Ctrl-T on failure)

* "make monitor" now passed the configured baud rate.
  Closes #436 https://github.com/espressif/esp-idf/issues/436
* Pass toolchain prefix from sdkconfig into monitor tool
* Allow setting EOL in idf_monitor.py, use CRLF by default
* Detect if /dev/tty.X is used on macOS, warn and replace with /dev/cu.X
* If a build fails or gdb exits, ignore Ctrl-T (allowing Ctrl-T Ctrl-A/F to be same key sequence everywhere)
* Add a note about winpty on Windows.
  Ref 02fdf8271d (commitcomment-21369196)
* Fix problems with Console.cancel() not existing in older pyserial
* Print more user-friendly symbols for "start of iram" and "start of flash"

See merge request !594
2017-03-23 17:56:56 +08:00
XiaXiaotian
61de08b0dd tw11087: fix wifi restore exception
1. stop wifi before restore wifi
2017-03-23 17:47:48 +08:00
XiaXiaotian
6181c39f05 Reset WIFI mac when wifi start and update wifi lib
1. reset wifi mac when wifi start

2. roll back rx hung workaround for beacon timeout

3. fix amsdu ap interface wrong issue

4. fix amsdu header parse error

5. fix amsdu flag wrong issue

6. PHY: V350, fix BT rssi bug

7. RTC: V225, fix bt will be not work when wifi is reset
2017-03-23 14:28:27 +08:00
Edmund Huber
0aab67f0aa esp32: esp_wifi.h: Replace a non-working #error statement with a working _Static_assert statement
Merges #440 https://github.com/espressif/esp-idf/pull/440
2017-03-22 15:01:40 +08:00
Angus Gratton
6afea0e81c linker scripts: Add explicit symbols for _iram_start and _flash_cache_start
This is to avoid confusion when idf_monitor prints the first symbol in each section, ie "WindowOverflow4" or similar,
when bootloader prints the section mapping address.

Closes #447 https://github.com/espressif/esp-idf/issues/447
2017-03-21 16:45:13 +08:00
XiaXiaotian
a401169ea8 wpa2: add authenticate type for wpa2 enterprise 2017-03-17 17:28:01 +08:00
Wangjialin
7670e93639 Feature: add ledc low speed channels
1. Add low speed channels for LEDC module.
2. Improve fade object allocate mechanism.
3. Improve ledc example, add 2 low speed channels in example.
4. Remove debug code
5. Improve the register bit field name of slow clock.
2017-03-17 17:26:30 +08:00
Ivan Grokhotkov
94b9898ca7 phy_init: move NVS init into relevant function, check errors
This change also modifies logging statements to print hexadecimal error codes, which are easier to look up.
2017-03-14 22:03:39 +08:00
Liu Zhi Fu
67aabbff8f esp32: update wifi lib for some bugfix/features
1. add options to disable nvs
2. add station keepalive with softap
3. fix beacon rx start time not accurate issue
4. set wifi rx desc/buffer boundary check to internal memory boundary
2017-03-14 10:14:26 +08:00
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
e5f54a9dbd Validate more GPIO ROM functions for non-use of static RAM 2017-03-08 19:04:28 +08:00