Commit graph

2023 commits

Author SHA1 Message Date
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
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
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 045307ea0f Merge branch 'bugfix/make_config_problems' into 'master'
build system: Fix several make & configuration problems

Collection of quasi-related build system fixes:
* Fix issues with "make menuconfig" running twice when no existing sdkconfig
* Fix issues with menuconfig getting into a bad state if "make -jN" and no existing sdkconfig
* Hopefully fix intermittent issue with build system sometimes not picking up all config, leading to missing BT/WiFi libs at compile/link time.
* Fix issues with path resolution on Windows (including in Eclipse)
* Add new BATCH_BUILD variable for IDEs and automated build environments.

See merge request !485
2017-02-22 10:10:34 +08:00
Angus Gratton f29768c404 Build system: Add new BATCH_BUILD flag to disable interactive parts of the build
Mostly useful for Eclipse (where accidentally running interactive
config hangs the build), but also good for CI and other automated
build systems.
2017-02-22 11:59:37 +11:00
Angus Gratton c0f155f6ff kconfig: Ignore Windows host-compiled executables 2017-02-22 11:59:37 +11:00
Angus Gratton 8dede8f8a4 Eclipse: Process Windows paths correctly using cygpath
Includes splitting the Windows Eclipse setup doc into a separate page,
as it has so many additional steps.

Addresses github #17 and #166
https://github.com/espressif/esp-idf/issues/17
https://github.com/espressif/esp-idf/issues/166
2017-02-22 11:59:37 +11:00
Angus Gratton d28ee9a25e build system: Account for Windows behaviour of make wildcard for some dirs
See github #166
2017-02-22 11:59:37 +11: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 3c90032369 build system: Fix parallel & double menuconfig issues when sdkconfig missing
Fixes misbehaviour of default menuconfig when sdkconfig is missing.

(Either appearing twice, or breaking if make -jN is used.)
2017-02-22 11:58:49 +11:00
Angus Gratton e91d436e45 build system: Probable fix for errors due to bad config bypassing components
See github #311 https://github.com/espressif/esp-idf/issues/311

Should fix weird compiler/linker bugs where config says something is
enabled, but build system says it is disabled.
Particularly noticeable when WiFi/BT libraries fail to
compile/link despite being enabled.

Underlying cause is configuration file regenerating, but component
Makefiles not reevaluating.

Entirely removes the idea that we don't need to generate config for some
targets (like 'clean'). We need valid config for these targets,
otherwise they don't know which files to clean (etc).
2017-02-22 11:58:49 +11:00
Tian Zhong Xing c3d5f8e766 app_update: fix logic error when update ota info 2017-02-22 10:26:04 +11:00
Angus Gratton 080350a745 ota ops: Rewrite esp_ota_get_next_update_partition() to be more predictable, add unit tests 2017-02-22 10:26:04 +11:00
Angus Gratton f687725e97 unit tests: Use a unit test app partition table, configure spi_flash to use data partition 2017-02-22 10:26:04 +11:00
Angus Gratton 4170b8c32e partition iterator: Free iterator when reaching end of linked list 2017-02-22 10:26:04 +11:00
Angus Gratton 902382f622 ota ops: Verify partition argument passed to esp_ota_begin() 2017-02-22 10:26:04 +11:00
Angus Gratton 25f739c183 ota ops: Add new functions esp_ota_get_next_update_partition / esp_ota_get_running_partition
* Update OTA example to use these.
* Refactor esp_ota_begin() to return ESP_ERR_OTA_PARTITION_CONFLICT as documented
2017-02-22 10:24:42 +11:00
Angus Gratton 6a2d152086 spi_flash tests: Refactor mmap tests to be run in any order 2017-02-22 10:22:50 +11:00
Angus Gratton 093dd98101 spi_flash: Add new phys2cache & cache2phys functions to query flash cache mappings 2017-02-22 10:22:50 +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
Ivan Grokhotkov e76c187efb spi_flash: protect esp_intr_noniram_{disable,enable} in 1-core config
MR !441 (7c155ab) has fixed issue with esp_intr_noniram_{disable,enable}
calls not being properly protected by spi_flash_op_{lock,unlock}.
Unit test was added, but the unit test environment tests only dual-core
config. Similar issue was present in the code path for the single-core
config, where esp_intr_noniram_{disable,enable} calls were unprotected.

This change fixes the protection issue and updates the unit test to
run properly in single core config as well.

The issue with running unit tests for single core config will be
addressed in a separate MR.
2017-02-21 21:57:53 +08:00
Jeroen Domburg e35ebbf813 Use THRESH_DMA_TRANS define everywhere, make code match "smaller or equal" description 2017-02-21 18:27:56 +08:00
Lourens Naudé 04f7d96623 Fix SPI read edges in spi_intr
Signed-off-by: Jeroen Domburg <jeroen@espressif.com>
2017-02-21 18:26:03 +08:00
Tian Hao 55693b1168 component/bt : add option to release about 30K from BT if BLE only
1. later BT/BLE will be separated by BT/BLE macro, but this option should use when user make sure that in BLE only mode.
2017-02-21 17:46:59 +08:00
Ivan Grokhotkov 26dec992eb deep sleep: add note about disabling WiFi and BT
This change adds a note to esp_deep_sleep that applications should disable WiFi and BT before going into deep sleep.
SNTP example is also updated.
2017-02-21 17:07:16 +08:00
Ivan Grokhotkov d3fde5188e deep sleep: bring some registers into known state
In case WiFi/BT stack has been enabled but wasn’t disabled, some RTC
bits may be left enabled, causing increased current consumption.
This change returns some of the bits back to their default values.
2017-02-21 17:07:15 +08:00