Commit graph

1529 commits

Author SHA1 Message Date
Tian Hao a513ac4dec add extra check before bluedroid init and disable 2017-03-17 18:15:11 +08:00
Angus Gratton 8ab96b13af 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-17 18:14:17 +08:00
Angus Gratton 50f414f54c spi_flash: Add spi_flash_cache_enabled() test function 2017-03-17 18:13:46 +08:00
Angus Gratton 0dfef8c16c sdmmc: Use slot width as default slot_config width parameter, instead of 4
Ref #361 https://github.com/espressif/esp-idf/pull/361
2017-03-17 18:12:41 +08:00
Derek Gregory 6bb1367fe5 component/bt: fix bug where uuid was not reset in btc_gatts_act_create_attr_tab.
Merges #307 https://github.com/espressif/esp-idf/pull/307
2017-03-17 18:12:41 +08:00
lucashutchinson a286846095 ble: Fix ble_adv data truncation
Fixed issue with ble_adv data being truncated after the 31st octet due to an incorrect length passed in a memcpy.

Merges #389 https://github.com/espressif/esp-idf/pull/389
2017-03-17 18:12:41 +08:00
Angus Gratton 3429241e1a esp_err: add NDEBUG guard, comment about flash cache
Follow-up to 316b040
2017-03-17 18:12:41 +08:00
Neil Kolban 455a7784a9 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-17 18:12:41 +08:00
Anne Jan Brouwer 7d9a20e714 Added missing platform.h to mbedtls ssl.h
There was a missing definition of mbedtls_time_t

See for example:
https://travis-ci.org/SHA2017-badge/Firmware/jobs/202459377

Merges #348 https://github.com/espressif/esp-idf/pull/348
2017-03-17 18:12:41 +08:00
Angus Gratton a6980fce4c lwip: Use strlcpy() instead of memcpy() to copy hostname to static buffer 2017-03-17 18:12:41 +08:00
alarruskain 4bd41d4082 lwip: Fix hostname set in tcpip_adapter_lwip
Hostname for each interface is not correctly stored in "hostinfo" variable.

Merges #350 https://github.com/espressif/esp-idf/pull/350
2017-03-17 18:12:41 +08:00
Daniel Campora 82ef2b9485 sdmmc: Add width field to the slot config.
Therefore if the width is set to 1, you can choose to only
configure the CLK, DAT0 and CMD pins.

Merges #361 https://github.com/espressif/esp-idf/pull/361
2017-03-17 18:12:41 +08:00
Wu Jian Gang 06274ff5a5 Merge branch 'bugfix/fix_mpdu_len_error' into 'master'
esp32: update wifi lib to fix mpdu len error

Fix mpdu len error which impact espressif smartconfig

See merge request !552
2017-03-04 15:03:46 +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
Jiang Jiang Jian 6451c57e52 Merge branch 'bugfix/tw10169_dhcp_release_cause_tcp_abort' into 'master'
Bugfix/tw10169 dhcp release cause tcp abort

Modify the DHCP timer granularity from 1 minutes to 1 second.

See merge request !539
2017-03-02 17:28:11 +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
Ivan Grokhotkov ecbe5a66f2 Merge branch 'bugfix/rng_disabled_wifi_stop_2' into 'master'
esp32: Fix hardware rng after esp_wifi_stop (second implementation)

Ensures hardware RNG remains enabled at all times.

Reworked  version of !534

See merge request !536
2017-03-02 10:51:30 +08:00
wangmengyang 6d061ec903 component/bt: modify the bluetooth read_efuse_mac interface 2017-03-01 21:04:12 +08:00
XiaXiaotian fabe0493c2 mac address: add user set mac address
add menuconfig for user to set mac address of wifi, bt and ethernet.
2017-03-01 20:51:49 +08:00
Liu Zhi Fu 66199b1efe Check DHCP rebind timer before checking dhcp release timer in cause they have the same value.
lwip: modify dhcp timer granularity from 60s to 1s

Current DHCP granularity is 60 seconds, it's not accurate, it can cause DHCP release/rebind/renew timer
timeout at the same time, also it may renew/rebind/release at wrong time, thus cause problem.
2017-03-01 20:50:58 +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
Liu Zhi Fu 3b3c3210a6 lwip: fix bool options default value wrong issue
menuconfig options with bool type should use 'y/n' to use the default value,
instead of '1/0'
2017-03-01 13:37:36 +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
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
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
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
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
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
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
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 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
Ivan Grokhotkov dca0377e19 Merge branch 'bugfix/flash_write_single_core' into 'master'
spi_flash: fix protection issues

This MR fixes the two spi_flash related issues:

- esp_intr_noniram_{disable,enable} not being protected by spi_flash_op_{lock,unlock} in single core mode. This caused a safety assert to be triggered in esp_intr_noniram_disable.

- spi_flash_unlock not being protected by spi_flash_guard_{start,end}. This caused a conflict between SPI0 and SPI1 controllers when accessing SPI flash, manifesting in cache data corruption and IllegalInstruction exceptions, for some flash chips.


See merge request !522
2017-02-22 14:17:40 +08:00
Ivan Grokhotkov cbb71baca9 spi_flash: protect spi_flash_unlock
spi_flash_unlock was missing spi_flash_guard_start, which caused cache
to be enabled during unlock operation, causing hard-to-trace crashes
and cache data corruption.
2017-02-22 12:51:16 +08:00
Angus Gratton c3544dc090 Build system: Fix error if librtc submodule not available to bootloader
Closes #220 https://github.com/espressif/esp-idf/issues/220
2017-02-22 11:59:37 +11:00
Angus Gratton de28d3a655 Merge branch 'feature/partition_table_envvars' into 'master'
partition tables: Expand environment variables in gen_esp32part

Allows parametrizing partition table with (exported) make variables.

Merges PR #301 https://github.com/espressif/esp-idf/pull/301

See merge request !505
2017-02-22 07:22:04 +08:00