Commit graph

2098 commits

Author SHA1 Message Date
Liu Zhi Fu ae09a46cb8 Merge branch 'master' of ssh://gitlab.espressif.cn:27227/idf/esp-idf 2017-03-01 13:32:04 +08:00
Ivan Grokhotkov bf7f0bf52c make: look for TEST_COMPONENTS in all component directories
fixes https://github.com/espressif/esp-idf/issues/354
2017-03-01 11:12:29 +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
Ivan Grokhotkov c025dfbfa7 Merge branch 'bugfix/mmap_instr' into 'master'
spi_flash: fix mmap not working for SPI_FLASH_MMAP_INST

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

See merge request !528
2017-02-28 17:14:38 +08:00
Ivan Grokhotkov f3687f7177 spi_flash: fix memory leak when spi_flash_mmap arguments are invalid
Check src_addr and size first, then allocate new_entry.
2017-02-28 15:11:54 +08:00
Wu Jian Gang 8f43567a68 Merge branch 'bugfix/esp_get_random_return_zero' into 'master'
Do not disable clock for generating random number.

1. Do not disable clock for generating random number.
2. And fix the bug that system crashes if call esp_wifi_stop() twice.

See merge request !534
2017-02-28 14:35:22 +08:00
Angus Gratton 2230b2c8bc freertos tests: Enable test_freertos_task_delete 2017-02-28 15:47:15 +11:00
Angus Gratton 8de26e434c freertos: Schedule tasks immediately when they are created on opposite core 2017-02-28 15:47:15 +11:00
Angus Gratton 20212ee823 freertos: Fix cross-core usage of event groups
Fixes & re-enabled broken unit tests
Adds per-event-group spinlock instead of single global lock
2017-02-28 12:06:36 +11:00
Angus Gratton d0f8fb9b93 freertos Kconfig: Thread local storage pointer feature required for WiFi or Ethernet 2017-02-28 10:59:23 +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
Liu Zhi Fu cd83bfb31c Merge branch 'master' of ssh://gitlab.espressif.cn:27227/idf/esp-idf 2017-02-27 17:22:47 +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
Liu Han 03ea45046d lwip: Change max number of open sockets 2017-02-27 14:47:48 +08:00
Ivan Grokhotkov 290c40a4ab Merge branch 'bugfix/sdmmc_fail_no_card' into 'master'
vfs_fat_sdmmc: if card init fails, fail cleanly

This fixes the issue with sdmmc_host not returned to clean state after a failed attempt to mount the card, with no SD card in the slot.

See merge request !527
2017-02-27 10:00:55 +08:00
Angus Gratton 47a5851d45 freertos: Move the "set debug watchpoint as stack overflow check" out of debugging internals
Place it near the other stack overflow kconfig items, instead.
2017-02-27 11:49:46 +11:00
Angus Gratton 3050f06a8d FreeRTOS: Support setting task name max length
Ref: https://esp32.com/viewtopic.php?f=13&t=1297&p=5762
2017-02-27 11:46:16 +11:00
Jiang Jiang Jian 13dfb5568d Merge branch 'bugfix/set_channel_fail_before_enable_sniffer' into 'master'
wifi: fix issue in setting channel API

Update wifi libs to fix issue in setting channel API.

See merge request !529
2017-02-24 22:23:06 +08:00
qiyueixa d9c649d26e wifi: fix issue in setting channel API 2017-02-24 22:08:54 +08:00
Ivan Grokhotkov 75115e1d83 spi_flash: fix mmap not working for SPI_FLASH_MMAP_INST 2017-02-24 21:50:05 +08:00
Ivan Grokhotkov c17e05040a vfs_fat_sdmmc: if card init fails, fail cleanly
This fixes the issue with sdmmc_host not returned to clean state after
a failed attempt to mount the card, with no SD card in the slot.
2017-02-24 21:04:22 +08:00
Jiang Jiang Jian 63e0140ae6 Merge branch 'bugfix/btdm_adv_scan_enable_report' into 'master'
component/bt : add adv/scan start complete event

1. indicate adv/scan start complete success or failed
2. controller do limit of adv/scan concurrence, so add some codes to report adv/scan start failed or not.

See merge request !524
2017-02-24 16:24:22 +08:00
Ivan Grokhotkov 1671879b7a Merge branch 'bugfix/set_channel_fail_before_enable_sniffer' into 'master'
wifi: fix issue in setting channel before sniffer is enabled



See merge request !526
2017-02-24 16:15:39 +08:00
qiyueixa ff81e17504 wifi: fix issue in setting channel before sniffer is enabled 2017-02-24 15:19:31 +08:00
Ivan Grokhotkov 708539c559 Merge branch 'bugfix/btdm_gatts_write_desc_error' into 'master'
component/bt:fixed the write ccc crash bug error

fix the gatt server write ccc lead to the system crash if not initialize the ccc value.

See merge request !515
2017-02-24 15:11:18 +08:00
Angus Gratton fd0edae75a ethernet example: Disable WiFi, enable Ethernet in default config
Ref: https://esp32.com/viewtopic.php?f=2&t=1249
2017-02-24 14:56:29 +11:00
Angus Gratton d9252b3645 wifi event_default_handlers/tcpip_adapter: Support disabling WiFi, keeping Ethernet 2017-02-24 14:46:23 +11:00
Angus Gratton eb1fbaabce lwip: Refactor support for L2 pbuf free notification into each driver
Makes it easier to handle different drivers enabled at compile/link time.
2017-02-24 14:45:17 +11: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 b582697889 component/bt : add adv/scan start complete event
1. indicate adv/scan start complete success or failed
2. controller do limit of adv/scan concurrence, so add some codes to report adv/scan start failed or not.
2017-02-23 17:54:22 +08:00
Jeroen Domburg 7dfb1c2e97 Merge branch 'bugfix/app_tasks_start_on_wrong_cpu' into 'master'
Fix a scheduling bug

Fixes:
- Trivial bug where in some special cases a task could be started on the wrong core (and would run there for max 1 tick)
- More major bug causing a yield to be done with a mux held.

See merge request !523
2017-02-23 11:19:37 +08:00
Ivan Grokhotkov 4af5f572f4 add deep sleep wake up example 2017-02-22 18:40:31 +08:00
Jeroen Domburg c057f067c7 Merge branch 'bugfix/spi_master_length' into 'master'
Fix SPI master transmit length

Tx/Rx length fix from https://github.com/espressif/esp-idf/pull/336

I also added an extra commit in to make use of a define instead of a literal, plus fix a (harmless) off-by-one condition.

See merge request !521
2017-02-22 17:11:00 +08:00
Ivan Grokhotkov e96d653c9e ulp: make sure I_WAKE instruction works with ULP timer disabled
Setting ULP_CP_WAKEUP_FORCE_EN forces ULP wakeup to work even if the
ULP timer has already been disabled.
2017-02-22 17:10:52 +08:00
Jeroen Domburg ce7d0a7015 Fixed a small bug where a task could initially be scheduled on a wrong CPU, and a much bigger bug where a yield was performed with a held mux. 2017-02-22 17:04:51 +08:00
Ivan Grokhotkov 5cab04075e ulp: rename I_SLEEP, redefine I_WAKE, add I_ADC, add tests
This fixes incorrect descriptions of I_END/I_SLEEP instructions and
changes the definition of I_END. New instruction, I_WAKE, is added,
which wakes up the SoC. Macro for ADC instruction is defined, and new
tests are added.
2017-02-22 15:00:36 +08:00
Ivan Grokhotkov 0465528431 ulp: don’t override SENS_SLEEP_CYCLES_S0
SENS_SLEEP_CYCLES_S0 may be set by the application to control ULP
program timer.
2017-02-22 14:41:10 +08:00
Ivan Grokhotkov 0fcc8918dd ulp: add I_WR_REG_BIT convenience macro 2017-02-22 14:40:36 +08:00
Ivan Grokhotkov cdf122baa0 ulp: add I_WR_REG instruction test 2017-02-22 14:40:36 +08:00
Ivan Grokhotkov 7df75c00c7 ulp: fix a bug that ULP may not be restarted correctly 2017-02-22 14:40:36 +08:00
Ivan Grokhotkov d0d2c4cb49 esp32,ulp: add tests for TSENS 2017-02-22 14:40:36 +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
Ivan Grokhotkov 611e510c49 ulp: add I_SLEEP instruction and improve comments 2017-02-22 14:40:36 +08:00
Ivan Grokhotkov 0483548a39 ulp: fix I_{RD,WR}_REG definitions
- I_RD_REG used the wrong union member (.rd_reg) due to a copy-paste
  mistake

- Peripheral register address in bits[7:0] should be given in words,
  not in bytes

Fixes https://github.com/espressif/esp-idf/issues/297
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 d772e1489b Merge branch 'bugfix/bootloader_disable_sar_test_mux' into 'master'
Deep sleep fixes

This change fixes extra 24 uA current consumption in deep sleep mode (https://esp32.com/viewtopic.php?f=2&t=1133).

Recent update to libphy/librtc caused another problem that WiFi related parts of RTC are no longer disabled by RTC sleep functions. This means that if WiFi is not disabled by the application before entering deep sleep, extra ~200uA of current would be consumed. This is fixed, and documentation for esp_deep_sleep and SNTP example are updated to mention that applications should take care of disabling WiFi and BT before going into the deep sleep mode.

See merge request !516
2017-02-22 14:32:32 +08:00