Commit Graph

13557 Commits

Author SHA1 Message Date
Ivan Grokhotkov
85bc2d7240 esp_timer: allow querying the timer before esp_timer_init is called 2021-11-15 19:38:09 +08:00
Zim Kalinowski
ebaffab2fb Merge branch 'bugfix/freertos_round_robin_scheduling_retain_skip_v4.4' into 'release/v4.4'
freertos: Implement best effort round robin scheduling (v4.4)

See merge request espressif/esp-idf!15907
2021-11-15 07:47:43 +00:00
Zim Kalinowski
a0f339fead Merge branch 'bugfix/usb_hcd_robustness_v4.4' into 'release/v4.4'
USB Host: Fix how disconnections an EP halts are handled (v4.4)

See merge request espressif/esp-idf!15908
2021-11-15 07:47:37 +00:00
Li Shuai
e75762b02f sleep: deep sleep does not need cpu and wifi/bt mac retention 2021-11-12 19:38:32 +08:00
Li Shuai
0665e0165b light sleep: replace new kconfig option of mac bb power down & phy reduce tx power 2021-11-12 19:38:09 +08:00
Michael (XIAO Xufeng)
df0929009a Merge branch 'bugfix/gpio_interrupt_on_app_cpu_v4.4' into 'release/v4.4'
gpio: Fix the bug that esp32 gpio interrupt cannot be triggered on core 1 (backport v4.4)

See merge request espressif/esp-idf!15902
2021-11-11 17:01:36 +00:00
Jiang Jiang Jian
dd5d452428 Merge branch 'bugfix/power_down_bluetooth_module_when_deinit_v4.4' into 'release/v4.4'
component/bt: Power down bluetooth module when deinit

See merge request espressif/esp-idf!15717
2021-11-11 08:27:51 +00:00
Darian Leung
1af36a5b9d usb: Change API and refactor tests
This commit updates the USB Host Library API in the following wasy:
- usb_host_client_handle_t and usb_device_handle_t made into struct pointers
  to generate compiler warnings about conflicting handle types
- usb_host_client_config_t changed to future proof API for Synchronous Clients
- Added usb_host_lib_unblock()
- Added usb_host_device_addr_list_fill()
- Return of usb_host_device_free_all() updated to indicate whether there
  are still devices yet to be freed.
- Blockg APIs are now marked explicitly
- Fixed a bug in usb_host_transfer_submit_control() when checking the bEndpointAddress
  of a control transfer.

Tests are also refactored to move some common macros into shared headers

Closes https://github.com/espressif/esp-idf/issues/7786
2021-11-11 16:26:56 +08:00
Darian Leung
891c979c64 usb: Add USB Host Library sudden disconnect tests 2021-11-11 16:26:35 +08:00
Darian Leung
0a948594cb usb: Fix USBH handling of disconnections
This commit fixes how the USBH handling of a sudden device disconnection,
more specifically handling of device gone.
- Previously the USBH would only halt, flush, and dequeue the device's
default EP, then send a device gone event to the Host Library layer.
- Now the USBH will also halt and flush all non-default EPs, allowing
all of the URBs to be dequeud.
- Some internal object members are now protected by a mutex instead of
a spinlock.

Closes https://github.com/espressif/esp-idf/issues/7505
2021-11-11 16:26:09 +08:00
Darian Leung
de6bf09f40 usb: Fix how the HCD handles sudden disconnection
This commit fixes how the USB Host HCD handles sudden disconnections.

Bugs:
- HW channels remain active when the port suddenly disconnects, and
previously the channel would be disabled by setting the disabled bit,
then waiting for a disabled interrupt. However, ISOC channels do not
generate the disabled interrupt when the port is invalid, thus leading
to tasks getting indefinitely blocked in hcd_pipe_command().

Fix:
On a sudden disconnection, forcibly treat all channels as halted even
if their HCCHAR.ChEna bit is still set. We do a soft reset after a port
error anyways, so the channels will eventually be reset.

Closes https://github.com/espressif/esp-idf/issues/7505
2021-11-11 16:25:01 +08:00
Darian Leung
a1082dfa59 usb: Fix LL 8/16 bit register field access
This commit addes the 8/16 bit register field access workarounds to
the DWC_OTG peripheral. This workaround was applied to all other
peripherals in commit 874a720286.
2021-11-11 16:24:08 +08:00
Darian Leung
466c42c3c1 freertos: Fix SMP round robin scheduling
The previous SMP freertos round robin would skip over tasks when
time slicing. This commit implements a Best Effort Round Robin
where selected tasks are put to the back of the list, thus
makes the time slicing more fair.

- Documentation has been updated accordingly.
- Tidy up vTaskSwitchContext() to match v10.4.3 more
- Increased esp_ipc task stack size to avoid overflow

Closes https://github.com/espressif/esp-idf/issues/7256
2021-11-11 16:16:11 +08:00
songruojing
762ca128b4 gpio: Fix the bug that esp32 gpio interrupt cannot be triggered on core 1
Introduced in 874a720286

Closes https://github.com/espressif/esp-idf/issues/7594

(cherry picked from commit 7ec38fcc42)
2021-11-11 12:43:09 +08:00
Jiang Jiang Jian
f6db71539e Merge branch 'bugfix/esp32_light_sleep_crash_4.4' into 'release/v4.4'
Fix crash caused by bluetooth high level interrupt (v4.4)

See merge request espressif/esp-idf!15872
2021-11-11 03:38:49 +00:00
baohongde
0c0d0f9b35 components/bt: Fix the issue caused by the power off the bt power domain 2021-11-11 11:33:15 +08:00
Li Shuai
a2790756b0 fix the wifi scan fail issue caused by the power off the wifi power domain 2021-11-11 11:33:04 +08:00
Armando (Dou Yiwen)
bd9d8c314e Merge branch 'bugfix/fix_120m_sdr_flash_config_on_non_s3_bug_v4.4' into 'release/v4.4'
spi_flash: make 120m config only visible on s3 sdr mode (v4.4)

See merge request espressif/esp-idf!15868
2021-11-11 02:47:47 +00:00
Ondrej Kosta
018bc054a5 Merge branch 'bugfix/LAN8720_reset_assertion_v4.4' into 'release/v4.4'
Increased LAN8720 ETH-PHY reset assertion time (v4.4)

See merge request espressif/esp-idf!15825
2021-11-10 20:39:58 +00:00
Darian
d722a37aa6 Merge branch 'refactor/freertos_deprecate_critical_nested_macros_v4.4' into 'release/v4.4'
freertos: Deprecate critical nested macros (v4.4)

See merge request espressif/esp-idf!15613
2021-11-10 16:16:53 +00:00
Xie Wen Xiang
10afcc9f63 Merge branch 'bugfix/fix_ble_prefered_ext_conn_parameter_detection_v4.4' into 'release/v4.4'
component/bt: check the ble ext conn parameter(backport v4.4)

See merge request espressif/esp-idf!15768
2021-11-10 13:01:22 +00:00
Darian Leung
7e725751e4 freertos: Remove critical nested macros
This commit removes the following critical nested macros as follows:

- portENTER_CRITICAL_NESTED()
- portEXIT_CRITICAL_NESTED()

They are replaced with portSET_INTERRUPT_MASK_FROM_ISR() and
portCLEAR_INTERRUPT_MASK_FROM_ISR() which are the proper FreeRTOS interfaces.

Created a portmacro_deprecated.h for each port to contain deprecated API
that were originally from portmacro.h
2021-11-10 18:34:32 +08:00
Jiang Jiang Jian
44d13c648b Merge branch 'bugfix/fix_ota_crash_backport_v4.4' into 'release/v4.4'
spi_flash: fix app crash when OTA because the OTA task's stack is in rtc fast memory(backport v4.4)

See merge request espressif/esp-idf!15852
2021-11-10 08:35:34 +00:00
xiongweichao
44b9e6e055 Fix crash caused by bluetooth high level interrupt 2021-11-10 16:14:52 +08:00
Mahavir Jain
214d2eeba7 Merge branch 'bugfix/manual_secure_boot_v2_multiple_digest_issue_v4.4' into 'release/v4.4'
secure_boot_v2: fix issue in pre-flashed digest (manual) workflow (v4.4)

See merge request espressif/esp-idf!15780
2021-11-10 04:22:55 +00:00
Armando
d5218e84e2 spi_flash: make 120m config only visible on s3 sdr mode 2021-11-10 12:04:49 +08:00
Jan Procházka
683da6b46d fatfs: Implementation of disk_status nad disk_initialize for SD/MMC card
FATFS provides a disk status and disk initialize callback which were not
implemented. Implementation has very low impact on SD/MMC speed and
fixes issues, when trying to open file when SD card was removed from
slot and not deinited.

If disk_status returns STA_NOINIT, it will always continue with
disk_initialize. If that returns 0, it will continue like everything is
working normally. So there has to be the same check as in disk_status.
Return of disk_initialize is always checked like this for STA_NOINIT or
STA_PROTECT so if command fails, we return the STA_NOINIT.

stat = disk_initialize(pdrv);
if (stat & STA_NOINIT) return FR_NOT_READY;
if (stat & STA_PROTECT) return FR_WRITE_PROTECTED;

Closes IDF-4125
2021-11-09 20:17:03 +08:00
Sachin Parekh
2f39639c20 secure_boot: Do not allow key revocation in bootloader 2021-11-09 15:19:47 +05:30
Sachin Parekh
7fe2a4815d secure_boot: Added Kconfig option for aggressive key revoke
Applicable to S2, C3, and S3
2021-11-09 15:19:47 +05:30
jingli
07b1b45ad6 fix: app crash when OTA because the OTA task's stack is in rtc fast memory 2021-11-09 17:10:20 +08:00
Wang Meng Yang
5e4d166323 Merge branch 'bugfix/fix_crash_when_shutdown_bt_v4.4' into 'release/v4.4'
component/bt: fix crash when shutdown bt(backport v4.4)

See merge request espressif/esp-idf!15708
2021-11-09 08:06:24 +00:00
Ivan Grokhotkov
864605785b Merge branch 'feature/rw_lock_cond_var_4.4' into 'release/v4.4'
pthread: reader-writer locks implementation (backport 4.4)

See merge request espressif/esp-idf!15830
2021-11-08 13:31:16 +00:00
Kevin (Lao Kaiyao)
1433f5337f Merge branch 'bugfix/i2s_ws_polarity_in_tdm_v4.4' into 'release/v4.4'
i2s: fix ws signal polarity in tdm mode (v4.4)

See merge request espressif/esp-idf!15820
2021-11-08 09:30:14 +00:00
Wei Tian Hua
397e148049 Merge branch 'doc/make_classic_bt_API_ref_only_for_esp32_4.4' into 'release/v4.4'
Doc/make classic bt api ref only for esp32 [backport v4.4]

See merge request espressif/esp-idf!15727
2021-11-08 09:14:24 +00:00
Mahavir Jain
4ac351247d secure_boot_v2: fix issue in pre-flashed digest (manual) workflow
This commit fixes issue where empty (unprogrammed) digest slot out of
multiple supported (e.g. 3 for ESP32-C3) could cause issue in
workflow enablement process.

Notes:

1. This issue was applicable for chips supporting "secure-boot-v2"
scheme with multiple digests slots
2. This issue was affecting only manual workflow, where digest of
public was pre-flashed in efuse
3. Change in "flash_encrypt.c" is only for additional safety purpose
2021-11-08 12:48:12 +08:00
xiewenxiang
7a6a61feef component/bt: fix crash when shutdown bt(backport v4.4) 2021-11-08 10:55:12 +08:00
Jakob Hasse
b117bcd2a0 feat (pthread): reader-writer locks implementation
* Added implementation based on cond. variables
* Added unit tests

Closes https://github.com/espressif/esp-idf/issues/7411
2021-11-08 10:21:37 +08:00
Ondrej Kosta
43b62a5b62 Copyright message fix for 'Increased LAN8720 ETH-PHY reset assertion time' 2021-11-05 11:39:04 +01:00
Frank Sautter
5f9ae3510a Increased LAN8720 ETH-PHY reset assertion time (IDFGH-6018)
Increase reset assertion time from 100µs (as specified minimum in the datasheet) to 150µs.
Some specimen of the LAN8720 need the reset signal asserted longer than 100µs to initialise properly. Otherwise they are in a zombie state where they are establishing and loosing an Ethernet link once in a seconds interval.
2021-11-05 11:35:35 +01:00
Ondrej Kosta
484d5c8491 esp_eth: KSZ8851SNL, enable Rx multicast in MAC filter
Closes https://github.com/espressif/esp-idf/issues/7750
2021-11-05 11:23:14 +01:00
laokaiyao
f7f9683ef1 i2s: fix ws signal polarity in tdm mode 2021-11-05 11:35:02 +08:00
liulinyan
b298795e37 Merge branch 'bugfix/sig_ble_mesh_errata_e16350_v4.4' into 'release/v4.4'
ble_mesh: stack: Apply the errata E16350 from Bluetooth SIG (v4.4)

See merge request espressif/esp-idf!15815
2021-11-05 03:16:51 +00:00
lly
461ffffd77 ble_mesh: nimble: return error if init host twice 2021-11-04 20:31:57 +08:00
lly
c255c6a6f8 ble_mesh: stack: Apply the errata E16350 from Bluetooth SIG 2021-11-04 20:29:38 +08:00
Island
dc20c1fd41 Merge branch 'bugfix/ble_mesh_update_license_v4.4' into 'release/v4.4'
ble_mesh: stack: Update license of esp specific files (v4.4)

See merge request espressif/esp-idf!15765
2021-11-04 12:12:05 +00:00
Darian
423b6697ac Merge branch 'bugfix/freertos_prvTaskIsTaskSuspended_v4.4' into 'release/v4.4'
freertos: Fix prvTaskIsTaskSuspended check (v4.4)

See merge request espressif/esp-idf!15612
2021-11-04 10:26:54 +00:00
Darian
9fae314f50 Merge branch 'feature/freertos_static_allocation_task_memory_callbacks_v4.4' into 'release/v4.4'
freertos: Add memory hooks for static IDLE and Timer tasks (v4.4)

See merge request espressif/esp-idf!15614
2021-11-03 11:20:10 +00:00
lly
c1df3636b7 ble_mesh: stack: Update license of esp specific files 2021-11-03 14:22:31 +08:00
liulinyan
226f49f37d Merge branch 'bugfix/heartbeat_filter_with_acceptlist_v4.4' into 'release/v4.4'
ble_mesh: stack: Fix heartbeat filter with accept list (v4.4)

See merge request espressif/esp-idf!15675
2021-11-03 06:21:32 +00:00
lly
9e82f7fdcf ble_mesh: stack: Update the license of provisioner_main.c 2021-11-02 20:56:25 +08:00