Commit Graph

14899 Commits

Author SHA1 Message Date
Jiang Jiang Jian
cfc4be0f06 Merge branch 'bugfix/confirmed_bugfix_from_baidu_proj' into 'master'
component_bt/bugfix: Confirmed bugfix from Baidu project

See merge request espressif/esp-idf!10450
2020-09-22 11:38:29 +08:00
Jiang Jiang Jian
c2c6c24e35 Merge branch 'bugfix/wifi_spin_lock_allocation_in_PSRAM' into 'master'
wifi: Fix spin lock allocation in PSRAM bug

See merge request espressif/esp-idf!10449
2020-09-22 11:36:54 +08:00
Jiang Jiang Jian
9d7c4dac22 Merge branch 'docs/how_to_improve_WiFi_performance' into 'master'
Docs/how to improve wi fi performance

See merge request espressif/esp-idf!9702
2020-09-22 11:34:08 +08:00
Island
0ba0c3a01d Merge branch 'bugfix/ble_mesh_node_deinit' into 'master'
ble_mesh: stack: Persistent storage misc fixes

See merge request espressif/esp-idf!9467
2020-09-22 10:08:03 +08:00
martin.gano
b599f127b5 add new command to idf 2020-09-21 23:38:52 +02:00
Ivan Grokhotkov
58ab54979c Merge branch 'bugfix/efuse_test_stackoverflow' into 'master'
CI: Increase stack size for efuse unit test

See merge request espressif/esp-idf!10531
2020-09-21 21:58:15 +08:00
Armando
59e350b195 spi: seperate the pointer for the TX and RX DMA 2020-09-21 20:33:56 +08:00
Armando
27a6f2666a spi_master: refactor hal context structures
This commit seperates the hal context into different configuration
structures based on their members' definitions. Through refactoring
spi_master.c, the device related configuration should be passed in and
set each time before a new transaction. The transaction related
configuration now is a local variable in case of the fact that error
occurs without any notice when user forgets to pass new transaction
configuration in (which means the old driver will use the trans_config
that is saved from last transaction).

Besides, via above refactor, this commit fixs a bug which leads to
wrong cs polarity setting.
Closes https://github.com/espressif/esp-idf/pull/5490

Moreover, via above refactor, this commit also fixs a bug about duplex
mode switching when multiple devices are added to the bus.
Closes https://github.com/espressif/esp-idf/issues/4641
2020-09-21 20:32:41 +08:00
lly
e14868ff30 ble_mesh: stack: Persistent storage misc fixes
* Fix the issue that deinit node with "erase_flash"
  set to true, but info is not erased from nvs
* Reuse bt_mesh_cfg_reset() when deinit node
* Optimize Provisioner related erase operations
* No store pending timeout will be used when Node
  is not provisioned OR Provisioner is disabled
  and erase operation is performed
* Change the default timeout for settings operation
  to 0, and rpl store rate to 0
2020-09-21 11:46:52 +00:00
Ivan Grokhotkov
396dea51ba Merge branch 'bugfix/core_dump_regression' into 'master'
bugfix/esp_system: fix core_dump on flash regression by placing esp_system_abort back to IRAM

See merge request espressif/esp-idf!10522
2020-09-21 16:11:22 +08:00
Angus Gratton
033f49f974 Merge branch 'bugfix/cpp_header_rom_secure_boot' into 'master'
Secure Boot: Fixes the cpp macro in esp32 secure boot rom functions.

Closes IDFGH-3998

See merge request espressif/esp-idf!10528
2020-09-21 15:51:03 +08:00
jiangguangming
052f88f1d1 flash_mmap: restore interrupt and cache before err return 2020-09-21 07:37:50 +00:00
jiangguangming
61e341e791 flash_mmap: can mmap after get enough free MMU pages 2020-09-21 07:37:50 +00:00
Mahavir Jain
48e96e8eb8 Merge branch 'feature/esp_cryptoauthlib_sub_update' into 'master'
esp-cryptoauthlib: Update submodule pointer to add a new feature.

See merge request espressif/esp-idf!10526
2020-09-21 13:38:01 +08:00
Angus Gratton
5004812dd6 Merge branch 'bugfix/spiram_reserve_size_pr5373' into 'master'
SPIRAM reserved memory size fixes

Closes IDFGH-3407 and IDFGH-3931

See merge request espressif/esp-idf!9185
2020-09-21 12:27:00 +08:00
Marius Vikhammer
ae0931be06 CI: Increase stack size for efuse unit test
"Batch mode is thread-safe" case would occasionally cause a stackoverflow.
Increased stack size.
2020-09-21 12:23:14 +08:00
Marius Vikhammer
06af651a51 docs: seperate build_docs html and pdf CI jobs
Due to eager_exclude, Sphinx jobs cannot use the doc cache (doctrees).

PDF and HTML building are now seperate CI jobs to avoid this issue.
PDF building will only be ran on deploy branches and when started
with build_docs tag to reduce CI load
2020-09-21 10:48:04 +08:00
Angus Gratton
a381ecca6f Merge branch 'bugfix/cxx_exception_crash_test' into 'master'
Temporarily remove cxx exception frequent intr unit test

See merge request espressif/esp-idf!10426
2020-09-21 10:31:27 +08:00
Michael (XIAO Xufeng)
ea1eb495a5 Merge branch 'bugfix/spi_master_multiple_dev_with_diff_cs_lvl_master' into 'master'
spi_master: correctly set cs polarity

See merge request espressif/esp-idf!10265
2020-09-21 10:17:38 +08:00
Angus Gratton
95177d5f07 esp32s2 spiram: Fix unused variable warnings 2020-09-21 11:43:55 +10:00
Angus Gratton
d1b86720f1 esp32s2: Reduce calls to esp_spiram_get_size() when initializing PSRAM 2020-09-21 11:43:55 +10:00
Angus Gratton
3f034a5005 spiram: Add soc macro for SPIRAM address space size, use it where applicable
Reference https://github.com/espressif/esp-idf/pull/5373
2020-09-21 11:43:55 +10:00
negativekelvin
5eb5bb5f72 Fix reserved psram region
Closes https://github.com/espressif/esp-idf/pull/5373

Closes https://github.com/espressif/esp-idf/issues/5821
2020-09-21 11:39:54 +10:00
Jakob Hasse
6292d359f8 Removed C++ unit test
* Removed cxx exception frequent intr unit test
  It sometimes stalled by too frequent interrupts
  in some configurations, causing CI trouble.
* Opened Jira IDF-2144 for further investiation
2020-09-21 01:32:23 +00:00
Supreet Deshpande
0e940c80d4 Secure Boot: Fixes the cpp macro in esp32 secure boot rom functions.
Closes https://github.com/espressif/esp-idf/issues/5878
2020-09-20 22:50:44 +05:30
Ivan Grokhotkov
5925d21346 Merge branch 'feature/power_consumption_graphs' into 'master'
Power consumption graphs

Closes IDF-208

See merge request espressif/esp-idf!10476
2020-09-20 21:16:29 +08:00
Michael (XIAO Xufeng)
61a7a26fc9 Merge branch 'bugfix/bootloader_WEL_issi_qe' into 'master'
bootloader: fix flash not protected issue when exit

See merge request espressif/esp-idf!7959
2020-09-19 12:48:55 +08:00
Aditya Patwardhan
3988cf854d esp-cryptoauthlib: Update submodule pointer to add a new feature. 2020-09-19 09:48:18 +05:30
Michael (XIAO Xufeng)
3b2e8648eb bootloader: create public bootloader_flash.h header
Move non-public functions into bootloader_flash_priv.h header
2020-09-19 10:52:02 +08:00
Michael (XIAO Xufeng)
fefdee1349 bootloader: fix the WRSR format for ISSI flash chips
1. The 2nd bootloader always call `rom_spiflash_unlock()`, but never help to clear the WEL bit when exit. This may cause system unstability.

   This commit helps to clear WEL when flash configuration is done.

   **RISK:** When the app starts, it didn't have to clear the WEL before it actually write/erase. But now the very first write/erase operation should be done after a WEL clear. Though the risk is little (all the following write/erase also need to clear the WEL), we still have to test this carefully, especially for those functions used by the OTA.

2. The `rom_spiflash_unlock()` function in the patch of ESP32 may (1) trigger the QPI, (2) clear the QE or (3) fail to unlock the ISSI chips.

   Status register bitmap of ISSI chip and GD chip:

| SR | ISSI | GD25LQ32C |
| -- | ---- | --------- |
| 0  | WIP  | WIP       |
| 1  | WEL  | WEL       |
| 2  | BP0  | BP0       |
| 3  | BP1  | BP1       |
| 4  | BP2  | BP2       |
| 5  | BP3  | BP3       |
| 6  | QE   | BP4       |
| 7  | SRWD | SRP0      |
| 8  |      | SRP1      |
| 9  |      | QE        |
| 10 |      | SUS2      |
| 11 |      | LB1       |
| 12 |      | LB2       |
| 13 |      | LB3       |
| 14 |      | CMP       |
| 15 |      | SUS1      |

   QE bit of other chips are at the bit 9 of the status register (i.e. bit 1 of SR2), which should be read by RDSR2 command.

   However, the RDSR2 (35H, Read Status 2) command for chip of other vendors happens to be the QIOEN (Enter QPI mode) command of ISSI chips. When the `rom_spiflash_unlock()` function trys to read SR2, it may trigger the QPI of ISSI chips.

   Moreover, when `rom_spiflash_unlock()` try to clear the BP4 bit in the status register, QE (bit 6) of ISSI chip may be cleared by accident. Or if the ISSI chip doesn't accept WRSR command with argument of two bytes (since it only have status register of one byte), it may fail to clear the other protect bits (BP0~BP3) as expected.

   This commit makes the `rom_spiflash_unlock()` check whether the vendor is issi. if so, `rom_spiflash_unlock()` only send RDSR to read the status register, send WRSR with only 1 byte argument, and also avoid clearing the QE bit (bit 6).

3. `rom_spiflash_unlock()` always send WRSR command to clear protection bits even when there is no protection bit active. And the execution of clearing status registers, which takes about 700us, will also happen even when there's no bits cleared.

   This commit skips the clearing of status register if there is no protection bits active.

Also move the execute_flash_command to be a bootloader API; move
implementation of spi_flash_wrap_set to the bootloader
2020-09-19 10:51:51 +08:00
Felipe Neves
e8a276d641 esp_system: revert the esp_system_abort to the IRAM section 2020-09-18 22:18:30 -03:00
Ivan Grokhotkov
eebc71b16d Merge branch 'feature/ci_submodule_fetch_mirror' into 'master'
ci: download submodules from mirror, if enabled

See merge request espressif/esp-idf!10477
2020-09-18 22:30:49 +08:00
cnlohr
507c08251e esp_netif: Enable use of the ESP-IDF with a non-LWIP (and non-BSD-style) IP stack.
Note: besides the esp-netif component, this commit also disables
net_sockets.c from mbedtls, which is one of the base components and uses BSD API (not specifically lwIP). This might be refactored to use CONFIG_SUPPORT_BSD_API instead of CONFIG_ESP_NETIF_TCPIP_LWIP
in the future.
It also disables smartconfig_ack.c and wifi_init.c from esp_wifi
component for referencing some lwIP config options (smartconfig_ack.c changes might be also
updated to check CONFIG_SUPPORT_BSD_API)

Merges https://github.com/espressif/esp-idf/pull/5856
2020-09-18 15:10:55 +02:00
Ivan Grokhotkov
57a8dbb93d Merge branch 'bugfix/idf_gdb_no_openocd_crash' into 'master'
idf.py: Fixed gdb target to exit cleanly when no openocd watch task

Closes IDF-2157

See merge request espressif/esp-idf!10503
2020-09-18 19:12:38 +08:00
Jakob Hasse
0e118c6070 NVS: put wild functions into namespace 2020-09-18 15:38:40 +08:00
David Cermak
3b3409fb20 idf.py: Fixed gdb target to exit cleanly when no openocd watch task
When idf.py gdb starts, it expects openocd was started in the background
and creates a thread to watch for openocd errors. when gdb target exits,
the debug_ext.py aims to cleanup all threads and processes, but fails
with traceback if openocd-watch thread not available, which could happen
if openocd started separately.
2020-09-18 08:30:21 +02:00
xueyunfei
8feadde2fa ipv6 send multicast data fail when src address is null 2020-09-18 14:24:14 +08:00
Jiang Jiang Jian
65c94dfb4c Merge branch 'bugfix/add_disconn_req_action_when_no_link' into 'master'
component_bt/bugfix: add_disconn_req_action_when_no_link

See merge request espressif/esp-idf!9751
2020-09-18 12:21:50 +08:00
Michael (XIAO Xufeng)
8b1d39bf53 Merge branch 'bugfix/fix_mcpwm_period_calculation_bug' into 'master'
mcpwm_example: fix  period calculation bug in high frequency

See merge request espressif/esp-idf!10152
2020-09-18 02:02:32 +08:00
Ivan Grokhotkov
a62c6b6b05 Merge branch 'bugfix/flash_encryption_example_espsecure_public' into 'master'
examples: fix flash encryption example test (third version)

See merge request espressif/esp-idf!10480
2020-09-18 01:08:55 +08:00
Ivan Grokhotkov
3af24d2f36 Merge branch 'bugfix/fix_wrong_nvs_api_doc' into 'master'
nvs: fix api doc regarding to maximum key length

See merge request espressif/esp-idf!10439
2020-09-18 01:01:45 +08:00
Ivan Grokhotkov
d7f846d1b3 Merge branch 'bugfix/log-error-run-esptool' into 'master'
parttool.py: Add file stream parameter and log stdout and stderr to same stream

Closes IDF-2075

See merge request espressif/esp-idf!10465
2020-09-18 01:00:05 +08:00
Wielebny666
db6fbba73e spi_master: correctly set cs polarity
All devices must be added to the same spi line before use.

Partly solve this problem: https://github.com/espressif/esp-idf/pull/5490
2020-09-17 12:05:57 +00:00
Martin Valik
815d9ec6bd Power consumption graphs were added to ulp and wifi power save examples
Closes IDF-208
2020-09-17 13:20:09 +02:00
martin.gano
da5b582dee add file stream parameter and log stdout and stderr to same stream 2020-09-17 12:54:18 +02:00
Angus Gratton
0fe231d2b3 Merge branch 'feature/pkg_ver_uses_4_bits' into 'master'
efuse/esp32: Expands PKG_VER from 3 bit to 4 bits

Closes IDF-1919

See merge request espressif/esp-idf!9949
2020-09-17 18:21:08 +08:00
Mahavir Jain
d82b9275b5 Merge branch 'bugfix/provisioning_example_warning_with_O2_optimization' into 'master'
provisioning: use memcpy instead of strncpy for copying SSID

Closes IDFGH-3983

See merge request espressif/esp-idf!10467
2020-09-17 17:56:37 +08:00
Michael (XIAO Xufeng)
3c283b490a Merge branch 'feature/async_memcpy' into 'master'
async_mcp: support async memory copy on esp32s2 and esp32s3

See merge request espressif/esp-idf!10242
2020-09-17 16:54:28 +08:00
KonstantinKondrashov
2373f115fc efuse/esp32: Expands PKG_VER from 3 bit to 4 bits
Closes: IDF-1919
2020-09-17 07:44:37 +00:00
Mahavir Jain
6a3d50c952 provisioning: use memcpy instead of strncpy for copying SSID
Per WiFi library requirement, SSID can be non-null terminated string
if its length goes to 32 bytes (maximum). Use of strncpy in this case,
along with compiler optimization level -O2 results in some warnings
for potential use of non-null terminated strings.

Fix here ensures use of memcpy to copy SSID string upto appropriate
desired length. This helps to avoid compiler specific workaround
flags added earlier.

Closes https://github.com/espressif/esp-idf/issues/5866
Closes IDFGH-3983
2020-09-17 12:59:22 +05:30