Compare commits

...

979 Commits

Author SHA1 Message Date
e088c3766b versions: Update version to 5.1.1 2023-08-21 14:24:40 +05:50
8d2dbd461f Merge branch 'bugfix/eapol_txdone_cb_issue_v5.1' into 'release/v5.1'
Fix EAPOL Key TxDone callback implementation (Backport v5.1)

See merge request espressif/esp-idf!25381
2023-08-18 14:36:25 +08:00
5d78511eac Merge branch 'bugfix/temperature_get_value_negative_v5.11' into 'release/v5.1'
bugfix(temperature_sensor): Fix issue that get the value is negative (backport v5.1)

See merge request espressif/esp-idf!25251
2023-08-17 15:24:29 +08:00
cd2172935d Merge branch 'bugfix/fix_esp32h2_wakeup_pll_enable_access_flash' into 'release/v5.1'
fix(esp_hw_support): fix esp32h2 wakeup process access flash cause stuck on v5.1

See merge request espressif/esp-idf!25379
2023-08-17 11:53:19 +08:00
77b74ab091 Merge branch 'bugfix/spi_bus_unify_defualt_mosi_level_v5.1' into 'release/v5.1'
spi: unify default mosi level on all targets (v5.1)

See merge request espressif/esp-idf!25014
2023-08-17 10:13:05 +08:00
45288496fb bugfix(temperature_sensor): Fix issue that get the value is negative 2023-08-17 10:06:22 +08:00
feecbad7db fix(wifi): Fix EAPOL Key TxDone callback implementation
Fix issues arising due to not distinguishing between M2 and M4
TxDone during 4-way handshake. Also fix EAPOL frame rate to lowest
possible rate.
2023-08-16 19:26:22 +05:30
d5396e1d84 fix(esp_hw_support): fix esp32h2 wakeup process access flash cause crash 2023-08-16 20:44:16 +08:00
461db723f1 Merge branch 'bugfix/fix_disassociation_callback_miss_free_key_lead_memory_leak_issue_v5.1' into 'release/v5.1'
fix(wifi): fix disassociation callback miss free key issue(Backport v5.1)

See merge request espressif/esp-idf!25360
2023-08-16 19:18:28 +08:00
98c39e28c8 fix(wifi): fix disassociation callback miss free key issue 2023-08-15 18:01:43 +08:00
25876e8f49 Merge branch 'bluedroid/memory_full_v5.1' into 'release/v5.1'
fix (Bluedroid) : Fix the memory corruption issue(v5.1)

See merge request espressif/esp-idf!25181
2023-08-14 10:40:50 +08:00
5d49509969 Fix the mem corruption 2023-08-11 18:22:58 +00:00
3fd0eff833 Merge branch 'fix/tools_idf_tools_tests_keep_constraints_v5.1' into 'release/v5.1'
fix(tools): idf_tools.py test improvements (v5.1)

See merge request espressif/esp-idf!25328
2023-08-11 19:44:53 +08:00
8f91dfed12 fix(tools): Increase timeout in idf_tools.py Python tests 2023-08-11 09:25:52 +02:00
951f3300ed fix(tools): Keep the original Python environment when idf_tools.py tests are run 2023-08-11 09:25:52 +02:00
dced82b949 fix(tools): idf_tools.py tests should keep the original constraint file 2023-08-11 09:25:52 +02:00
68ac16c010 Merge branch 'version_check_fix_dev_5.1' into 'release/v5.1'
fix(tools): check_python_version accept dev releases as requirement (v5.1)

See merge request espressif/esp-idf!25186
2023-08-11 15:16:57 +08:00
0be661f8bf fix(tools): check_python_version accept dev releases as requirement 2023-08-04 14:06:35 +02:00
e5199390a3 Merge branch 'bugfix/manage_i2c_clock_with_modem_clock_driver_v5.1' into 'release/v5.1'
fix(esp_hw_support): manage i2c_ana_mst clock witch modem clock driver (backport v5.1)

See merge request espressif/esp-idf!25164
2023-08-04 17:39:14 +08:00
94d129df76 fix(light_sleep): save vddsdio_config before lightsleep 2023-08-04 12:04:51 +08:00
aaf04f514f fix(esp_hw_support): manage i2c_ana_mst clock witch modem clock driver 2023-08-04 12:04:40 +08:00
6ec52679c3 Merge branch 'bugfix/action_tx_sleep_fix_v5.1' into 'release/v5.1'
Trigger null data frame TX before going offchannel.(v5.1)

See merge request espressif/esp-idf!25095
2023-08-04 08:36:16 +08:00
2c196590d3 Merge branch 'bugfix/vtasksteptick_assert_failed_issue_v5.1' into 'release/v5.1'
backport v5.1:  fix the issue of esp32c6 enable light sleep, vTaskStepTick assert failed caused by wifi baseband sleep retention linked list

See merge request espressif/esp-idf!25147
2023-08-04 02:37:01 +08:00
96934613fb fix(wifi): Fix error propagation while initiating FTM 2023-08-03 19:55:55 +08:00
c97181ad5e fix(esp_wifi): Fix some OWE issues
1. Allow flow of traffic after 4 way handshake is completed
2. Fix beacon timeout issue in transition mode
2023-08-03 19:55:15 +08:00
602d021263 Merge branch 'ble_mesh/esp32c6_BLEQABR23-266v5.1' into 'release/v5.1'
ble mesh: stack: return error when scanning failed to be enabled(v5.1)

See merge request espressif/esp-idf!24776
2023-08-03 11:15:42 +08:00
d6c18ad4c5 ble mesh: stack: return error when scanning failed to be enabled(v5.1) 2023-08-03 11:15:41 +08:00
a56ea11f91 Merge branch 'bugfix/fix_gpio_driver_calloc_v5.1' into 'release/v5.1'
fix(gpio): fix potential crash when processing gpio isr (v5.1)

See merge request espressif/esp-idf!24901
2023-08-03 11:13:47 +08:00
761af9869f fix(esp_wifi): fix no mac retention at wifi start 2023-08-03 10:54:31 +08:00
d73f61ebc9 fix(wifi): Prevent PMF config overwritten by tx_cb 2023-08-03 10:54:31 +08:00
bba48079a2 Fix(esp_wifi):revert send wake up and sleep null between scaning 2023-08-03 10:54:31 +08:00
6eb872f7d2 fix(wifi): fix some wifi bugs
1. fix the RX error when softAP and ESP-NOW both encrypted
2.Trigger null data frame TX before offchan channel switch.
2023-08-03 10:54:05 +08:00
827d863865 fix(wifi/phy): fix the issue of vTaskStepTick assert failed caused by wifi baseband retention linked list 2023-08-02 19:18:22 +08:00
afcf3e261b Merge branch 'bugfix/fix_cache_data_mem_corrupt_after_sleep_v5.1' into 'release/v5.1'
fix(lightsleep): Suspend cache before goto sleep to avoid cache load wrong data (backport v5.1)

See merge request espressif/esp-idf!25087
2023-08-02 11:21:33 +08:00
01c6fc6511 Merge branch 'bugfix/minor_enterprise_fixes_v5.1' into 'release/v5.1'
Drop Eapol msg if EAP success is not processed (Backport v5.1)

See merge request espressif/esp-idf!25065
2023-08-02 10:48:56 +08:00
4cb955461f Merge branch 'backport/openthread_feature_to_v51' into 'release/v5.1'
Openthread: backport some features

See merge request espressif/esp-idf!25113
2023-08-02 10:47:32 +08:00
adcc697082 Merge branch 'bugfix/neighbour_report_crash_v51' into 'release/v5.1'
Fix crash in RRM neighbour report requests.(v5.1)

See merge request espressif/esp-idf!25114
2023-08-02 10:13:40 +08:00
ffaef9971a Merge branch 'docs/update_bluetooth_power_save_readme_v5.1' into 'release/v5.1'
Docs: update bluetooth power save readme(v5.1)

See merge request espressif/esp-idf!24843
2023-08-02 10:10:38 +08:00
727f7cbb3a Merge branch 'bugfix/sync_master_esp32c6_and_esp32h2_uart_ll_inline_attr' into 'release/v5.1'
fix(hal): sync esp32c6 and esp32h2 uart ll inline attr from master  to v5.1

See merge request espressif/esp-idf!24961
2023-08-01 16:18:16 +08:00
0ba37a2b85 fix(rrm) : Fix crash in RRM neighbour report requests.
Fix crash in sending new RRM neighbour report requests by removing
the call to neighbour report request timeout callback in case of
already ongoing neighbour report request timer.
2023-08-01 13:12:00 +05:30
12f1c165e3 feat(thread): update openthread lib 2023-08-01 14:59:07 +08:00
31212f284a feat(openthread): enable openthread border agent id support 2023-08-01 14:58:57 +08:00
c2681f00aa fix(openthread): Use the existing dataset for autostart 2023-08-01 14:58:35 +08:00
4fc329fc10 Merge branch 'bugfix/mbedtls_sha_test_fail_when_run_twice_v5.1' into 'release/v5.1'
fix(mbedtls): sha test will fail when run twice (backport v5.1)

See merge request espressif/esp-idf!24827
2023-08-01 10:57:25 +08:00
a4d64dab30 Merge branch 'backport/fix_ieee802154_state' into 'release/v5.1'
ieee802154: fix ieee802154 sleep state (backport v5.1)

See merge request espressif/esp-idf!24841
2023-08-01 10:55:51 +08:00
2f9bb7937a Merge branch 'bugfix/remove__warning_for_rc_fast_calibration_h2_v5.1' into 'release/v5.1'
remove(clk): remove warning log if RC_FAST clock calibration is needed on esp32h2 (v5.1)

See merge request espressif/esp-idf!25075
2023-08-01 10:53:46 +08:00
fbfdd97343 Merge branch 'bugfix/esp32h2_revision_config_prompt_v5.1' into 'release/v5.1'
fix(esp32h2): correct typo in chip revision prompt (v5.1)

See merge request espressif/esp-idf!25024
2023-08-01 10:53:26 +08:00
5dfbd1eb8d Merge branch 'bugfix/malloc_free_removal_v5.1' into 'release/v5.1'
change(esp_wifi): Remove direct call of malloc() and free() (v5.1)

See merge request espressif/esp-idf!24932
2023-08-01 10:53:10 +08:00
58a01eb10b fix(hal): sync esp32c6 & esp32h2 uart_ll inline attr from master 2023-08-01 02:32:55 +00:00
c5703cff8d fix(lightsleep): fix access pu_cfg after sleep wake wakeup which is linked to flash 2023-07-31 21:41:56 +08:00
dab45c243a Merge branch 'bugfix/handle_conn_type_and_array_reset_v5.1' into 'release/v5.1'
fix(nimble): Update connection type in reattempt connection code (v5.1)

See merge request espressif/esp-idf!24915
2023-07-31 20:31:00 +08:00
1acc14bf72 fix(lightsleep): suspend cache before goto sleep to avoid cache load wrong data after spi io isolation 2023-07-31 14:52:03 +08:00
bb845e1841 cache: refactor cache_utils into cache_hal instade 2023-07-31 14:52:03 +08:00
45eb0b6271 cache: fix cache suspended/resumed twice on S3 2023-07-31 14:52:03 +08:00
56eef9151f fix(nimble): Update connection type in reattempt connection code
Added change to set connection type correctly and clear array when it is
    full in reattempt connection flow
2023-07-31 09:30:45 +05:30
59672cee17 remove(clk): remove warning log if RC_FAST clock calibration is needed on esp32h2 2023-07-31 10:48:55 +08:00
d83fe16c93 Merge branch 'bugfix/revert_26mhz_esp32c2_bad_apb_clock_fix' into 'release/v5.1'
Revert "fix(soc): fix wrong freq definition for 26Mhz version esp32c2 soc" (v5.1)

See merge request espressif/esp-idf!24983
2023-07-31 10:26:58 +08:00
d026b92c75 Merge branch 'bugfix/fix_c6_wrong_pwdet_register_v5.1' into 'release/v5.1'
pwdet: fix pwdet wrong base address on c6 h2 (v5.1)

See merge request espressif/esp-idf!25025
2023-07-31 10:22:57 +08:00
b98bcd75aa Merge branch 'bugfix/backport_wifi_fixes_v5.1' into 'release/v5.1'
Backport some wifi fixes to v5.1

See merge request espressif/esp-idf!24948
2023-07-31 10:22:14 +08:00
a28ef8df5b Merge branch 'bugfix/cache_writeback_bug_v5.1' into 'release/v5.1'
esp_rom: patch Cache_WriteBack_Addr (backport v5.1)

See merge request espressif/esp-idf!24941
2023-07-31 10:17:10 +08:00
9fa9621a8f Merge branch 'bugfix/enable_i2c_master_clock_in_bbpll_configure_v5.1' into 'release/v5.1'
fix(rtc_clk): fix i2c master clock missing in bbpll configure (backport v5.1)

See merge request espressif/esp-idf!24852
2023-07-31 10:16:20 +08:00
a0d882c25e fix(esp32h2): correct typo in chip revision prompt 2023-07-28 13:45:28 +00:00
c612f36786 fix(esp_wifi): Drop Eapol msg if EAP success is not processed 2023-07-28 15:11:44 +05:30
4cf31c3194 Merge branch 'feature/services_health_therm_v5.1' into 'release/v5.1'
NimBLE: Added health thermometer profile (v5.1)

See merge request espressif/esp-idf!24830
2023-07-28 15:37:35 +08:00
6fb014d535 Merge branch 'feature/add_ble_multi_conn_example_with_vs_hci_5.1' into 'release/v5.1'
feat(ble): Added ble examples for multiple connections

See merge request espressif/esp-idf!24814
2023-07-28 15:35:54 +08:00
5e60fb9924 docs(bt/example): Updated bluetooth power save readme 2023-07-27 07:54:36 +00:00
ce1a619252 docs(sleep_modes): Updated Wi-Fi/Bluetooth and Sleep Modes in docs 2023-07-27 07:54:36 +00:00
c7654d7c6b Merge branch 'ci/fix_failures_in_esp_http_client_example_v5.1' into 'release/v5.1'
CI: fix esp_http_client example failures in CI. Timeout was observed in the... (v5.1)

See merge request espressif/esp-idf!24949
2023-07-27 12:42:10 +08:00
fcb3ae32cb fix(pwdet): fix pwdet wrong base address on c6 h2 2023-07-27 12:30:44 +08:00
125014d242 fix(gpio): fix potential crash when processing gpio isr
If CONFIG_SPIRAM_USE_MALLOC is enabled, and cache is disabled when GPIO ISR is triggered,
it would lead to Guru Meditation Error due to "Cache disabled but cached memory region accessed".

Closes https://github.com/espressif/esp-idf/issues/11876
2023-07-26 12:42:11 +00:00
7a30edc412 fix(all): unify default mosi level to low on all targets 2023-07-26 20:34:25 +08:00
79b1379662 Merge branch 'bugfix/ble_issues_bugfix_v5.1' into 'release/v5.1'
ble: bugfix for esp32c6 and esp32h2

See merge request espressif/esp-idf!24952
2023-07-26 18:14:28 +08:00
5f6f20ea30 fix(esp_pm): fix bad apb_max_freq for 26mhz esp32c2 2023-07-25 13:54:24 +08:00
e0e4642ff8 Revert "fix(esp_pm): Constrains the minimum frequency of APB_MAX when the modem is working"
This reverts commit 9158cba846.
2023-07-25 13:51:37 +08:00
c64231564a Revert "fix(soc): fix wrong freq definition for 26Mhz version esp32c2 soc"
This reverts commit d2fb32ed70.
2023-07-25 13:51:32 +08:00
c624b0a45e esp_rom_printf 2023-07-24 21:45:11 +08:00
99c0715962 ble update for doc: bugfix for esp32c6 and esp32h2 2023-07-24 10:59:19 +08:00
020eba74c6 change(esp_wifi): Remove direct call of malloc() and free() 2023-07-22 07:13:53 +00:00
14819cb409 ble update: bugfix for esp32c6 and esp32h2 2023-07-21 20:25:01 +08:00
de15b6f819 fix(mbedtls): sha test will fail when run twice 2023-07-21 12:06:26 +00:00
b8bbd90ad4 fix(ieee802154): fix ieee802154 sleep state 2023-07-21 11:03:23 +00:00
9df77e015a fix(rtc_clk): fix i2c master clock missing in bbpll configure 2023-07-21 11:01:56 +00:00
2aaa5579f0 fix(ci): update HTTP client example tests runner assignment
HTTP client example tests now connect with locally hosted httpbin service
for more stable results across multiple runs
2023-07-21 15:21:41 +05:30
3298a8a483 CI: fix esp_http_client example failures in CI. Timeout was observed in the logs while performing HTTP requests. Changing the endpoint when testing in CI 2023-07-21 15:20:09 +05:30
dbe7c4a78d fix(esp_wifi): Backport some wifi fixes
1. Fix memory leak caused by assoc IE and retry timer
2. Discard commit frame received at confirmed state in SAE
3. Ignore immediate assoc req received from the station while we are
processing the older one. Fix regression caused by 4cb4faa9
2023-07-21 15:06:09 +05:30
aff298be18 fix(cache): no longer use freeze in esp_cache_msync
Writeback and invalidation don't need cache to be frozen first
2023-07-21 17:19:11 +08:00
3b8853b3c0 NimBLE: Added health thermometer profile 2023-07-21 05:36:32 +00:00
3187b8b326 Merge branch 'ci/fix_build_examples_v5.1' into 'release/v5.1'
CI: fix build examples import future

See merge request espressif/esp-idf!24864
2023-07-21 12:40:11 +08:00
38d54b4b62 fix(esp32s3): patch Cache_WriteBack_Addr api
Need to ensure that the cacheline being written back will not be
accessed during the write back process.
2023-07-21 11:44:56 +08:00
c4377e8dcc ci(esp_prov): remove import future usage 2023-07-19 14:03:12 +08:00
b530d768e6 Merge branch 'fix/esp_aes_return_values_v5.1' into 'release/v5.1'
fix(mbedtls): fix return values of esp-aes APIs (v5.1)

See merge request espressif/esp-idf!24804
2023-07-15 12:24:25 +08:00
d84e6c3dda Merge branch 'bugfix/fix_esp32c2_wifi_works_on_too_low_apb_clk_v5.1' into 'release/v5.1'
fix(esp_pm): fix esp32c2 modem works on too low apb clk (backport v5.1)

See merge request espressif/esp-idf!24811
2023-07-15 12:18:09 +08:00
077cb8d150 Merge branch 'feature/usb_host_interface_claim_debug_info_v5.1' into 'release/v5.1'
USB Host: better debugging information during usb_host_interface_claim() (backport v5.1)

See merge request espressif/esp-idf!23456
2023-07-15 08:37:32 +08:00
b21005487d Merge branch 'bugfix/fix_sleep_cache_spi_safe_issues_backport_v5.1' into 'release/v5.1'
Power Management: fix cache spi flash related issues in sleep process (backport v5.1)

See merge request espressif/esp-idf!24812
2023-07-15 08:36:46 +08:00
d2fb32ed70 fix(soc): fix wrong freq definition for 26Mhz version esp32c2 soc 2023-07-15 01:57:07 +08:00
9158cba846 fix(esp_pm): Constrains the minimum frequency of APB_MAX when the modem is working 2023-07-15 01:56:55 +08:00
16d849b95e fix(esp_pm): fix flash access after light sleep wakeup 2023-07-15 01:41:03 +08:00
34dccf840e refactor(mbedtls): refactored the return values check in some esp-aes APIs 2023-07-14 20:51:47 +05:30
77f6f72b83 Merge branch 'fix/mbedtls_internal_shaX_process_api_port_v5.1' into 'release/v5.1'
fix(mbedtls): Fix the port for mbedtls_internal_shaX_process api (v5.1)

See merge request espressif/esp-idf!24809
2023-07-14 22:53:13 +08:00
f447ee35b8 Merge branch 'pkg_res_deprecation_5.1' into 'release/v5.1'
fix(tools/python_dep_check): replace deprecated pkg_resources with importlib (backport v5.1)

See merge request espressif/esp-idf!24817
2023-07-14 22:44:05 +08:00
77429e3ef7 fix(tools/python_dep_check): replace deprecated pkg_resources with importlib
Closes https://github.com/espressif/esp-idf/issues/11712
2023-07-14 14:16:10 +02:00
2d1544b863 feat(ble): Added ble examples for multiple connections 2023-07-14 19:01:11 +08:00
82fde1e823 Merge branch 'backport_v5.1' into 'release/v5.1'
fix(bt): Fix the issue of not printing the Bluetooth MAC address for ESP32(backport v5.1)

See merge request espressif/esp-idf!24780
2023-07-14 18:17:32 +08:00
ec35c2ab60 fix(esp_pm): put vddsdio configure api always in iram if pd_flash is enabled
- Put vddsdio configure api always in iram if pd_flash is enabled to ensure access flash at flash unavailable time
2023-07-14 17:48:27 +08:00
f69ea24d15 fix(esp_pm): wait spi bus idle before hold CS pin
- Wait for spi bus idle before holding CS pin to prevent hold selected state during sleep
2023-07-14 17:48:20 +08:00
bba66a1566 Merge branch 'fix/esp_ptr_check_sign_compare_v5.1' into 'release/v5.1'
fix(esp_hw_support): Fix different signed comparison in `esp_ptr_in_drom` (v5.1)

See merge request espressif/esp-idf!24798
2023-07-14 17:27:54 +08:00
4f37aeb747 Merge branch 'update/ble_mesh_debug_log_level_update_v5.1' into 'release/v5.1'
update(ble_mesh: stack): Update provisioning bearer check debug log to INFO level (v5.1)

See merge request espressif/esp-idf!24769
2023-07-14 16:56:19 +08:00
895d86621b fix(mbedtls): Fixed the transmission of return values of the esp-aes APIs
- Earlier, some intermediate return values were not stored and returned,
thus incorrect return values used to get transmitted to the upper layer of APIs.

- Also, zeroised the output buffer in case of error condition.
2023-07-14 14:20:47 +05:30
8692da51a0 fix(mbedtls): Fix the port for the mbedtls_internal_shaX_process API
- Also added the fix to update intermediate SHA state in the mbedtls_shaX_update API
2023-07-14 14:20:20 +05:30
e9a3a3eeea Merge branch 'bugfix/fix_some_wifi_bugs_24063_to_v5.1' into 'release/v5.1'
fix(wifi): Backport some wifi bugs 24063 to v5.1(Backport v5.1)

See merge request espressif/esp-idf!24794
2023-07-14 16:41:49 +08:00
fa95b46a0d Merge branch 'bugfix/fix_miss_annotate_ld_function_issue_v5.1' into 'release/v5.1'
fix(wifi): missed annotate ld function from txop fix(Backport v5.1)

See merge request espressif/esp-idf!24800
2023-07-14 16:41:04 +08:00
da8b9ad59d Merge branch 'bugfix/esp32c6_eco1_ble_lpclk_main_xtal_v5.1' into 'release/v5.1'
backport v5.1:  support 40 MHz XTAL as BLE low power clock source of esp32c6 eco1

See merge request espressif/esp-idf!24789
2023-07-14 16:34:09 +08:00
1296991b2f Merge branch 'backport/fix_br_issues_of_cert' into 'release/v5.1'
OpenThread: fix issues found in certification(backport v5.1)

See merge request espressif/esp-idf!24079
2023-07-14 15:01:07 +08:00
727a8cdb9e fix(wifi): missed annotate ld function from txop fix 2023-07-14 14:04:14 +08:00
8abdb33072 fix(esp_hw_support): Fix different signed comparison in esp_ptr_in_drom
- Closes https://github.com/espressif/esp-idf/issues/11653
- Closes https://github.com/espressif/esp-idf/issues/11865
2023-07-14 10:52:19 +05:30
fabe338a7a Merge branch 'backport/enrich_ieee802154_assert_info' into 'release/v5.1'
ieee802154: add debug feature for driver (Backport v5.1)

See merge request espressif/esp-idf!24793
2023-07-14 13:17:32 +08:00
7ae116e3b2 Merge branch 'backport/backport_ci_for_zigbee' into 'release/v5.1'
feat(zigbee): Update Zigbee examples based on latest library (Backport v5.1)

See merge request espressif/esp-idf!24792
2023-07-14 12:02:38 +08:00
7148d826eb Merge branch 'bugfix/wifi_bcn_timeout_m_f_probe_req_l0_v5.1' into 'release/v5.1'
backport v5.1: fix bcn_timeout and disconnect with error code 201, m f probe req l=0 issue

See merge request espressif/esp-idf!24781
2023-07-14 11:35:31 +08:00
5ec30e6fc2 ble : remove extra retention cnt upon deinit temporarily 2023-07-14 11:07:56 +08:00
6c62d13550 ble: support eco1 BLE light sleep 2023-07-14 11:07:49 +08:00
ee3452d410 light sleep: enable system clock in PMU HP sleep state when selecting a 40 MHz XTAL as low power clock source of ble 2023-07-14 11:07:41 +08:00
78683c7c33 modem clock: provide a protected wifipwr clock enable/disable interface to fix the bug of selecting xtal as the low power clock source for ble 2023-07-14 11:07:34 +08:00
a98db6dbd3 modem clock: gatable clock interface which can gate or ungate modem clock domain 2023-07-14 11:07:27 +08:00
6a5d4e40d2 Wi-Fi/power save: fix the some mac issues of wifi power save
Some APs are configured to hide the SSID, the length field of the SSID element
in the Beacon frame is set to 0. This can cause incorrect parsing of the Beacon
by the Wi-Fi MAC hardware.

Some APs send two beacon frames with different BSSID in a TBTT cycle. After
correctly parsing the beacon of the associated AP, it continue to receive the
other beacon frame, which will cause the MAC to remain in a wait RX/TXING
state, blocking the Wi-Fi go to sleep.
2023-07-14 10:51:47 +08:00
395ad3edc0 feat(wifi): itwt support itwt wake duration unit 2023-07-14 10:51:26 +08:00
cb6946cf00 feat(zigbee): Update zigbee examples based on latest library 2023-07-14 10:28:43 +08:00
e6ddff69da fix(ci): remove the check of a inexistent host 2023-07-14 10:16:04 +08:00
6585c521b3 feat(openthread): openthread upstream update 2023-07-14 10:15:59 +08:00
cb29bfa6b4 openthread: forbid otPlatUdp to connect to address 0.0.0.0 and port 0 2023-07-14 09:54:52 +08:00
dd0afffde3 openthread cli: set dua feature optional 2023-07-14 09:54:52 +08:00
77c60765ca openthread rcp: set link metrics feature optional 2023-07-14 09:54:52 +08:00
320f8ebe7d Merge branch 'fix/mpi_incorrect_assert_v5.1' into 'release/v5.1'
fix(mbedtls): Fix incorrect assert for H/W MPI operations (v5.1)

See merge request espressif/esp-idf!24784
2023-07-14 09:49:01 +08:00
7d6a86062b Merge branch 'bugfix/multiple_btm_rrm_task_v51' into 'release/v5.1'
Fix race conditions in btm task deletion(v5.1)

See merge request espressif/esp-idf!24764
2023-07-14 08:10:39 +08:00
bf4e212950 Merge branch 'feature/improve_pd_vddsido_help_doc_v5.1' into 'release/v5.1'
Power Management: improve ESP_SLEEP_PSRAM/FLASH_LEAKAGE_WORKAROUND help doc (backport v5.1)

See merge request espressif/esp-idf!24758
2023-07-14 06:38:02 +08:00
d7604b580a Merge branch 'bugfix/fix_some_wifi_bugs_230713_v5.1' into 'release/v5.1'
Wifi: Backport some wifi bugs 230713 to v5.1(Backport v5.1)

See merge request espressif/esp-idf!24753
2023-07-14 03:33:03 +08:00
77876e5bea ieee802154: add debug feature for driver 2023-07-14 03:13:04 +08:00
d0a2424151 Merge branch 'bugfix/sae_crypto_optimization_esp32_v5.1' into 'release/v5.1'
esp_wifi: Optimize sae crypto operations for esp32 (v5.1)

See merge request espressif/esp-idf!24760
2023-07-14 00:12:21 +08:00
aa5b7e0100 Merge branch 'bugfix/fix_some_bluedroid_bugs_v5.1' into 'release/v5.1'
Fixed some bluedroid bugs( backport v5.1)

See merge request espressif/esp-idf!24748
2023-07-14 00:11:43 +08:00
f195d48764 Merge branch 'bugfix/fix_s3_adc1_wrong_clk_div_v5.1' into 'release/v5.1'
adc: fix adc oneshot mode clk div issue on esp32, esp32s2 and esp32s3 (v5.1)

See merge request espressif/esp-idf!24743
2023-07-13 21:40:54 +08:00
8e25eb1e08 fix(mbedtls): Fix incorrect assert for H/W MPI operations
- Closes https://github.com/espressif/esp-idf/issues/11850
2023-07-13 16:24:44 +05:30
aba746cdc2 Merge branch 'refactor/s_adc_tsen_enabled_logic_v5.1' into 'release/v5.1'
refactor(adc): maintain s_adc_tsen_enabled in adc driver (v5.1)

See merge request espressif/esp-idf!24629
2023-07-13 18:49:01 +08:00
b188085ce8 usb_host: better debugging information during hcd_pipe_alloc() when usb_host_interface_claim() is being fulfiled. 2023-07-13 12:42:00 +02:00
9021fab579 Merge branch 'feature/use_esp_rom_delay_us_to_test_the_accuracy_of_gptimer_v5.1' into 'release/v5.1'
refactor(driver/gptimer): replace vTaskDelay with esp_rom_delay_us in test_apps(v5.1)

See merge request espressif/esp-idf!24724
2023-07-13 17:38:40 +08:00
d8db9235ff Merge branch 'backport/update_docs_for_openthread' into 'release/v5.1'
docs(openthread): update openthread README for H2 and C6 (Backport v5.1)

See merge request espressif/esp-idf!24750
2023-07-13 17:10:36 +08:00
ae5f8dc139 Merge branch 'bugfix/fix_sometimes_sta_can_not_get_ip_from_softap_issue_v5.1' into 'release/v5.1'
lower the dhcp discover and request retry backoff time (Backport v5.1)

See merge request espressif/esp-idf!24742
2023-07-13 17:09:04 +08:00
958ae62197 power save: fix bcn_timeout and disconnect with error code 201, m f probe req l=0 issue 2023-07-13 17:02:50 +08:00
2b1269d4fb fix(bt): Fix the issue of not printing the Bluetooth MAC address for ESP32
- Add a log statement to print the Bluetooth MAC address
2023-07-13 16:43:37 +08:00
124cce0de3 fix(bt): Fix ble advertising data length 0 error
- Fixed an issue where the BLE advertisement length of 0 was causing an error
2023-07-13 16:43:37 +08:00
78e641a4b0 Merge branch 'backport/bugfix_openthread_sleep_esp32s3_build' into 'release/v5.1'
fix(openthread): call sleep api only in native radio (Backport v5.1)

See merge request espressif/esp-idf!24754
2023-07-13 16:38:36 +08:00
04b0929d94 Merge branch 'bugfix/fix_idf_monitor_parsing_pc_with_wrong_rom_out_v5.1' into 'release/v5.1'
bugfix: fix idf passing wrong chip revision to idf_monitor  (backport v5.1)

See merge request espressif/esp-idf!24756
2023-07-13 16:35:53 +08:00
f718d26d31 update(ble_mesh: stack): Update provisioning bearer check debug log to INFO level 2023-07-13 14:38:23 +08:00
cfa70abe0e Merge branch 'bugfix/fix_adc_cali_workround_wrong_range_v5.1' into 'release/v5.1'
fix(regi2c): wrong ADC_CALI_PD_WORKAROUND on c6, h2 (v5.1)

See merge request espressif/esp-idf!24747
2023-07-13 14:17:27 +08:00
adc2bf1e93 Merge branch 'bugfix/fix_adc_continuous_driver_conv_frame_issue_v5.1' into 'release/v5.1'
adc: fix adc continuous driver conv_frame_size not bigger than 4092 issue / pr 11500, use circular dma descriptors in adc continuous mode (v5.1)

See merge request espressif/esp-idf!24739
2023-07-13 14:16:15 +08:00
d938559efb Fix(esp_wifi): Fix race conditions in btm task deletion 2023-07-13 10:13:57 +05:30
02aa8e1a89 esp_wifi: Optimize sae crypto operations for esp32 2023-07-13 09:47:09 +05:30
34b4936a7d fix(bt/bluedroid): Fix memory leak of gattc cache upon disconnection 2023-07-13 12:14:16 +08:00
62bd3973f6 bluedroid: fixed gatt tcb free when disconnecting 2023-07-13 12:13:47 +08:00
d4bb163e32 lower the dhcp discover and request retry backoff time 2023-07-13 11:49:12 +08:00
649541e6e3 refactor(driver/gptimer): replace vTaskDelay
with esp_rom_delay_us in test_apps

This commit replaces vTaskDelay with esp_rom_delay_us in the gptimer
driver. The former function can introduce millisecond jitter due to
OS task switching, while the latter has less jitter because of the
polling delay. Therefore this commit reduces the delta values for
various timer tests.

Changes made in this commit include:
- Replacing vTaskDelay with esp_rom_delay_us
- Adjusting delta values for various timer tests
2023-07-13 11:29:39 +08:00
3fc984690f change(Kconfig): improve ESP_SLEEP_PSRAM/FLASH_LEAKAGE_WORKAROUND help doc
Closes https://github.com/espressif/esp-idf/issues/11558
2023-07-13 11:02:44 +08:00
73e380cc3a fix: fix idf passing wrong chip revision to idf_monitor 2023-07-13 10:46:32 +08:00
7c4cd75fe7 feat(external coex): add set tx line flag api 2023-07-13 10:37:53 +08:00
2f56bd8aac external coex: rename coex gpio struct field names 2023-07-13 10:37:53 +08:00
5cd0b6216a external coex: add slave mode support 2023-07-13 10:37:53 +08:00
2c70cda9b6 external_coex: add extern coex wire 4 2023-07-13 10:37:53 +08:00
ef805e64a2 iperf: apply txline 2023-07-13 10:37:53 +08:00
00ef8391af external coex: add txline, apply coex schm and half tx, apply lowest pti 2023-07-13 10:37:53 +08:00
19d8bdbd10 fix(wifi): Add bugfixes and improvements
1. Update wifi security mode
2. Add check for memory allocation in tx buffers
3. Fix association refused temporarily comeback time set to zero issue
2023-07-13 10:37:53 +08:00
8f7829d94e doc: remove WEP as security mode
Signed-off-by: zhangyanjiao <zhangyanjiao@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/10015
2023-07-13 10:37:53 +08:00
1f0982c0fc spelling correction in documentation
Signed-off-by: zhangyanjiao <zhangyanjiao@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/9721
2023-07-13 10:37:53 +08:00
dc46fe5343 fix(esp_wifi): Enable FTM for ESP32C2, fix other FTM issues
Enable FTM for ESP32C2 and update wifi libs with below fixes -

1. Bugfixes in Initiator and Responder mode
2. Fix wrong RTT value in first FTM procedure without connection
3. Update FTM calibration values for ESP32S2, S3, C3 and C2
4. Update distance estimation logic
5. Add some useful command parameters in FTM example
6. Fix bug when number of FTM measurement frames received is more
   than (number_of_brusts * FTMs per brust).

Co-authored-by: Sarvesh Bodakhe <sarvesh.bodakhe@espressif.com>
2023-07-13 10:37:53 +08:00
a2d8225c9d feat(wifi): Add API to get RSSI info after station connects to AP
- Add esp_wifi_sta_get_rssi() function to retrieve RSSI info after station connects to AP
2023-07-13 10:37:53 +08:00
5492f382f9 fix(openthread): call sleep api only in native radio 2023-07-13 10:29:08 +08:00
a300e79589 Merge branch 'backport/openthread_light_sleep' into 'release/v5.1'
Backportv5.1/openthread light sleep

See merge request espressif/esp-idf!24736
2023-07-13 10:20:38 +08:00
9745b7fab0 Merge branch 'bugfix/update_esp_rom_include_v5.1' into 'release/v5.1'
fix(esp_rom): remove unsupported rom headers (backport v5.1)

See merge request espressif/esp-idf!24735
2023-07-13 09:46:42 +08:00
e2e5894bc2 Merge branch 'bugfix/fix_exception_in_wifi_prov_v5.1' into 'release/v5.1'
Nimble: Increase the number of semaphore count for allocation (v5.1)

See merge request espressif/esp-idf!24469
2023-07-13 08:31:53 +08:00
bcd5eea0ea Merge branch 'bugfix/btm_scan_done_crash_v51' into 'release/v5.1'
wpa_supplicant : Fix occasional crash during btm roam.

See merge request espressif/esp-idf!24731
2023-07-13 03:00:30 +08:00
5ed5b83f70 Merge branch 'bufix/update_esp_phy_h_comments_5.1' into 'release/v5.1'
esp_phy:update comments in esp_phy_init.h_5.1

See merge request espressif/esp-idf!24704
2023-07-12 22:36:21 +08:00
7a455c15f7 Merge branch 'bugfix/fix_crash_issue_cause_by_proto_cmd_v5.1' into 'release/v5.1'
fix proto cmd crash problem in iperf example (backport v5.1)

See merge request espressif/esp-idf!24727
2023-07-12 21:36:58 +08:00
30c5638ce6 docs(openthread): update openthread README for H2 and C6 2023-07-12 20:51:58 +08:00
73f16d0af2 Merge branch 'fix/mqtt_esp32h2_examples_v5.1' into 'release/v5.1'
protocols/examples: Disable Wifi connection if not supported (v5.1)

See merge request espressif/esp-idf!24249
2023-07-12 19:00:18 +08:00
cab8159187 Nimble: Increase the number of semaphore count to allow more semaphore
allocation
2023-07-12 15:31:46 +05:30
51cef99b71 Merge branch 'itwt/rename_connect_handler_v5.1' into 'release/v5.1'
Update itwt.c (backport v5.1)

See merge request espressif/esp-idf!24730
2023-07-12 17:29:21 +08:00
6acc155516 fix(regi2c): wrong ADC_CALI_PD_WORKAROUND on c6, h2 2023-07-12 17:28:01 +08:00
d21e332281 fix(adc): fixed esp32, esp32s2,esp32s3 adc oneshot mode clk div issue 2023-07-12 17:10:58 +08:00
e27b44e661 Merge branch 'bugfix/handle_signed_power_level_pcl_v5.1' into 'release/v5.1'
fix(nimble): Fix data type of power level and delta to handle negative values (v5.1)

See merge request espressif/esp-idf!24712
2023-07-12 16:54:23 +08:00
074850e87c wifi: Fix typos and formatting issues with wifi.rst
- Used code-blocks for correct highlighting
- Use inline literals for macros
- Fixed some typos
2023-07-12 16:44:17 +08:00
d8ee45ce08 adc: port gh pr to current adc continuous mode driver
DMA EOF may happens per multiple dma descriptors, instead of only one.

Closes https://github.com/espressif/esp-idf/pull/11500
2023-07-12 16:41:24 +08:00
5da5e1801b Fix #10804 by running continuous ADC DMA in endless loop instead of restarting after each run (descriptor chain) to avoid losing samples. Use descriptor error callback for GDMA to check for DMA buffer overrun.
Signed-off-by: Armando <douyiwen@espressif.com>
2023-07-12 16:41:19 +08:00
f76f3dc83f adc: fix adc continuous driver conv_frame_size not bigger than 4092 issue
Closes https://github.com/espressif/esp-idf/issues/11385
2023-07-12 16:41:11 +08:00
dd9bcef9ea refactor(adc): maintain s_adc_tsen_enabled in adc driver 2023-07-12 16:35:51 +08:00
e1a4d33575 Wifi: Fixed typo in wifi.rst
Closes https://github.com/espressif/esp-idf/pull/11640

[darian@espressif.com: Updated commit message]
Signed-off-by: Darian Leung <darian@espressif.com>
2023-07-12 16:23:34 +08:00
6c4c0c0c78 fix(esp_rom): remove unsupported rom headers 2023-07-12 01:06:04 -07:00
cadf80e875 Merge branch 'bugfix/fpu_registers_overwritten_v5.1' into 'release/v5.1'
Xtensa: fix a bug that altered CPU registers in FPU exception handlers (backport v5.1)

See merge request espressif/esp-idf!24607
2023-07-12 14:53:21 +08:00
7f722715b9 fix(openthread): Fixed light sleep lock issue 2023-07-12 14:38:36 +08:00
68910618fc openthread: disable HW AES (IDF-7704) 2023-07-12 14:38:18 +08:00
eb04ccaf0b openthread: change readme about specific target to 802.15.4 Soc 2023-07-12 14:38:08 +08:00
b422504d10 ieee802154: exclude sleep file when do not define CONFIG_FREERTOS_USE_TICKLESS_IDLE 2023-07-12 14:37:53 +08:00
55d30cdf2a openthread sleepy device: remove HW acceleration in sdkconfig 2023-07-12 14:37:40 +08:00
6b1e3924af ieee802154: update radio state in test 2023-07-12 14:37:29 +08:00
043893a49f ieee802154: change light sleep config in ieee802154 2023-07-12 14:37:18 +08:00
aee329de2b ieee802154: change BLE_BB/ieee802154_BB 2023-07-12 14:36:55 +08:00
2ac7558da2 openthread: add openthread autostart for sleep device 2023-07-12 14:36:41 +08:00
b4d951fa6a ieee802154: add sleep state 2023-07-12 14:36:21 +08:00
4f537d3b98 ieee802154: support light sleep 2023-07-12 14:32:28 +08:00
65bf500d29 Merge branch 'backport/openthread_feature' into 'release/v5.1'
Backport some Openthread related MR to 5.1(Backport5.1)

See merge request espressif/esp-idf!24285
2023-07-12 14:25:22 +08:00
cc1526c570 protocols/examples: Disable Wifi connection if not supported
- Disable Kconfig option for Wifi if not supported by the SoC
- Enable building mqtt examples when target is set to esp32h2
2023-07-12 06:19:20 +00:00
9fb1b59054 Merge branch 'bringup/esp32h2_light_sleep_for_rebase_backport_v5.1' into 'release/v5.1'
esp32h2: support light_sleep(backport v5.1)

See merge request espressif/esp-idf!24697
2023-07-12 13:39:49 +08:00
3095888aaf fix(wpa_supplicant) : Fix occasional crash during btm roam.
Fix crash due to premature deallocation of neighbour report elements
by scan_done. Post event to btm_rrm_t task to handle scan_done serially
rather than when btm_rrm_t task is processing btm request rx frame.
2023-07-12 10:39:05 +05:30
0c7e2a9d14 Merge branch 'bugfix/bod_intr__v5.1' into 'release/v5.1'
brownout: Disable the hardware BOD when BOD interrupt is enabled(backportv5.1)

See merge request espressif/esp-idf!24692
2023-07-12 11:17:58 +08:00
a0e8f5aa03 Merge branch 'contrib/github_pr_10811_5.1' into 'release/v5.1'
i2c: introduce chip specific cmd register number(backport v5.1)

See merge request espressif/esp-idf!24694
2023-07-12 11:15:03 +08:00
168c47f896 Update itwt.c
Change name from `connect_handler` to `start_handler`
2023-07-12 10:50:55 +08:00
26046c054e Merge branch 'contrib/github_pr_11810_v5.1' into 'release/v5.1'
ledc.c: Fix frequency calculation. (GitHub PR) (v5.1)

See merge request espressif/esp-idf!24696
2023-07-12 10:46:36 +08:00
a09b89b36d fix proto cmd crash problem in iperf example 2023-07-12 10:44:12 +08:00
196fc559b4 Merge branch 'feature/ble_mesh_example_support_duplicate_scan_v5.1' into 'release/v5.1'
Feature/ble mesh example support duplicate scan(v5.1)

See merge request espressif/esp-idf!24700
2023-07-12 10:38:05 +08:00
7d11517a68 Merge branch 'asyncio_error_v5.1' into 'release/v5.1'
fix(tools/hints): add guide to fix error with unsupported asyncio (v5.1)

See merge request espressif/esp-idf!24701
2023-07-12 10:34:23 +08:00
966312e54f Merge branch 'backport/ieee802154_feature' into 'release/v5.1'
Backport some IEEE802154 related MR to 5.1(Backport 5.1)

See merge request espressif/esp-idf!24678
2023-07-12 07:23:43 +08:00
788f1def16 Merge branch 'bugfix/esp_netif_recieve_returns_v5.1' into 'release/v5.1'
esp_netif: Report error if esp_netif_receive() fails (v5.1)

See merge request espressif/esp-idf!24655
2023-07-12 04:07:17 +08:00
6b2209c41d Merge branch 'backport/phy_track_pll_to_v51' into 'release/v5.1'
Backport: phy track pll logic refactor to V5.1(Backport v5.1)

See merge request espressif/esp-idf!24689
2023-07-12 00:13:50 +08:00
7f69e29bff Merge branch 'docs/h2_timer_docs_v5.1' into 'release/v5.1'
docs: updated misc docs with H2 specific information. (v5.1)

See merge request espressif/esp-idf!24136
2023-07-11 23:44:35 +08:00
fa8f99249c fix (nimble): Fix data type of power level and delta to handle negative values 2023-07-11 17:18:09 +05:30
ba54ce8657 esp_phy:update comments in esp_phy_init.h 2023-07-11 17:37:13 +08:00
174c38ba5c Merge branch 'bugfix/fix-esp-even-compile-error-v5.1' into 'release/v5.1'
esp_event: fix build error related to format (v5.1)

See merge request espressif/esp-idf!24664
2023-07-11 17:08:38 +08:00
819da74d9f Merge branch 'bugfix/improve-git-describe-handling-v5.1' into 'release/v5.1'
build system: more accurate error information for git_describe (v5.1)

See merge request espressif/esp-idf!24665
2023-07-11 17:07:40 +08:00
8e2de1b594 Merge branch 'ble_dev/esp32c6_support_power_save_example_5.1' into 'release/v5.1'
ble: support esp32c6 power save example

See merge request espressif/esp-idf!24386
2023-07-11 16:55:22 +08:00
3fc633e326 fix(tools/hints): add guide to fix error with unsupported asyncio
Closes https://github.com/espressif/esp-idf/issues/11732
2023-07-11 10:53:29 +02:00
7db5541c9f Merge branch 'docs/add_Chinese_translation_for_api-guides/tools/idf-py_backport_v5.1' into 'release/v5.1'
docs: add CN translation for api-guides/tools/idf-py.rst (backport v5.1)

See merge request espressif/esp-idf!24190
2023-07-11 16:34:23 +08:00
6f253e2d37 docs: add CN translation for api-guides/tools/idf-py.rst (backport v5.1) 2023-07-11 16:34:23 +08:00
7e3463768f Merge branch 'bugfix/saving-esp-idf-env-as-utf8-v5.1' into 'release/v5.1'
build system: fix init.bat crash in windows when folder contains unicode characters (v5.1)

See merge request espressif/esp-idf!24666
2023-07-11 16:00:15 +08:00
3603611af1 freertos: add a unit test for FPU context switch 2023-07-11 15:55:40 +08:00
f002aeae3d Xtensa: fix a bug that altered CPU registers in FPU exception handlers
* Fixes https://github.com/espressif/esp-idf/issues/11690
2023-07-11 15:55:35 +08:00
573755a8d2 feat(ble_mesh: stack: esp32c6/h2): update Kconfig file to support duplicate scan. 2023-07-11 15:54:48 +08:00
e5e25c89e7 feat(ble_mesh: example: esp32c6/h2): update config file to support duplicate scan. 2023-07-11 15:54:41 +08:00
1d158ddd10 fix(ledc): fix frequency calculation
ledc.c: Fix frequency calculation.
Round int instead of truncate.

Merges https://github.com/espressif/esp-idf/pull/11810
2023-07-11 15:22:34 +08:00
af5a2fe4fd bugfix: update pm trace io num for esp32h2 2023-07-11 15:06:01 +08:00
28cdaa58bb docs: updated misc docs with H2 specific information. 2023-07-11 07:05:53 +00:00
efc9761ff0 Merge branch 'fix/heap-test-h2_v5.1' into 'release/v5.1'
heap: remove exclusion of esp32h2 as a target for heap pytest (v5.1)

See merge request espressif/esp-idf!24567
2023-07-11 15:05:07 +08:00
ee299b2d53 bugfix: set FORCE_INLINE_ATTR for resume_uart 2023-07-11 15:04:19 +08:00
c2b8a1d95c i2c: introduce chip specific cmd register number
Merges https://github.com/espressif/esp-idf/pull/10811
2023-07-11 14:55:46 +08:00
d191b0c540 Power Management: fix hp xtal wait bug for esp32h2 and esp32c6 2023-07-11 14:53:43 +08:00
60a3e5053e Power Management: support pu xtal in light sleep for esp32h2 2023-07-11 14:53:15 +08:00
7599d07c3f bugfix: remove the workaround implemented in MR 22773 about the lp_timer 2023-07-11 14:53:02 +08:00
6e15f589cc Power Management: move lp_timer_hal.c to upper hal layer for esp32h2 and esp32c6 2023-07-11 14:52:46 +08:00
8aaa256aa9 Power Management: support RC32K or Crystal32K powered down 2023-07-11 14:52:35 +08:00
c15c8664ca codeclean: fix prefix to LP_AON and add LP_AON_STORE8_REG 2023-07-11 14:52:24 +08:00
f44e8a8a8f brownout: Disable the hardware BOD when BOD interrupt is enabled 2023-07-11 14:32:40 +08:00
bdc49fbff4 ieee802154: update test code 2023-07-11 14:28:54 +08:00
91d17e0073 ieee802154: support ieee802154 test 2023-07-11 14:28:54 +08:00
c80ee99c6a ieee802154: add a patch for ieee802154 test 2023-07-11 14:28:54 +08:00
bba902cc46 ieee802154: add CONFIG_IEEE802154_TEST for supporting ieee802154 test 2023-07-11 14:28:54 +08:00
e88adc3401 IEEE802154: match C6 max txpower value with datasheet 2023-07-11 14:28:54 +08:00
b135270e68 ieee802154: add modem reset and fix ieee802154 test app reg command error 2023-07-11 14:28:54 +08:00
181ed29c3a feat(openthread): Add event post for thread role changed and integrate all the thread state change callbacks 2023-07-11 14:27:05 +08:00
bcd99bb58d fix(openthread): fix ot settings out of range issue 2023-07-11 14:21:19 +08:00
a125e8f7ed Merge branch 'feature/services_proximity_v5.1' into 'release/v5.1'
NimBLE : Added proximity sensor as a service (v5.1)

See merge request espressif/esp-idf!24649
2023-07-11 14:04:31 +08:00
2c9a2a76f7 example: bringup light sleep example for esp32h2 2023-07-11 13:58:08 +08:00
2abfeb19c8 Power Management: change the IO hold interface for esp32c6 2023-07-11 12:04:20 +08:00
8ef8459c0d Power Management: update pmu init and sleep parameter 2023-07-11 12:04:09 +08:00
3b40ce4d9b Power Management: fix REGDMA clock issue when wake up form light sleep 2023-07-11 12:03:59 +08:00
e5e0a0918a Power Management: support MODEM domain powered down in light sleep for esp32h2 2023-07-11 12:03:46 +08:00
c39a0cc0b5 Power Management: fix REGDMA power issue when TOP domain powered down during light sleep for esp32h2 2023-07-11 12:03:36 +08:00
113366820b Power Management: support TOP domain powered down in light sleep for esp32h2 2023-07-11 12:03:25 +08:00
24486dd069 Power Management: support PAU REGDMA feature for esp32h2 2023-07-11 12:03:13 +08:00
c12d7f5463 Power Management: support CPU powered down in light sleep for esp32h2 2023-07-11 12:03:02 +08:00
356fa3ab4b Power Management: support DFS and PMU feature for esp32h2 2023-07-11 12:02:39 +08:00
62b20b5518 Merge branch 'bugfix/esp_event_err_docs_v5.1' into 'release/v5.1'
fix(core-system/esp event): Fixed missing error return  documentation for... (v5.1)

See merge request espressif/esp-idf!24573
2023-07-11 11:46:43 +08:00
2bee46a354 esp_phy: phy track pll logic refactor 2023-07-11 10:50:29 +08:00
244be856b2 openthread: enable HW AES in ot_cli example 2023-07-11 10:39:34 +08:00
72cc92578d Openthread: fix dead lock related to ot and lwip 2023-07-11 10:39:34 +08:00
26c0a23598 openthread: change partition table to nvs flash 2023-07-11 10:39:34 +08:00
d4dd3dfa2b openthread: introduce the auto start API 2023-07-11 10:39:34 +08:00
f3924e5aa8 openthread: add source address selection hook 2023-07-11 10:39:34 +08:00
bcb9e6b5eb lwip: add a hook for ip6 source address selection 2023-07-11 10:39:34 +08:00
e9a8456279 Merge branch 'fix/mbedtls_ecdsa_veriy_restartable_v5.1' into 'release/v5.1'
mbedtls: update submodule (v5.1)

See merge request espressif/esp-idf!24636
2023-07-11 10:18:27 +08:00
87426b8fbd Merge branch 'fix/esp32s3_sysview_trace_corrupt_v5.1' into 'release/v5.1'
fix(app_trace): Fix apptrace data corruption on ESP32-S3 (v5.1)

See merge request espressif/esp-idf!24680
2023-07-11 08:37:55 +08:00
37ff7a92bf Merge branch 'bugfix/wps_deauth_sent_before_eap_failure_v5.1' into 'release/v5.1'
Fix for sending deauth before Eap-Failure in WPS (v5.1)

See merge request espressif/esp-idf!24368
2023-07-11 06:43:27 +08:00
18a8f86ecb Merge branch 'bugfix/lwip_dhcps_hook_types_v5.1' into 'release/v5.1'
lwip: Fix incorrect invocation of the hook `LWIP_HOOK_DHCPS_POST_APPEND_OPTS` (v5.1)

See merge request espressif/esp-idf!24658
2023-07-11 03:31:31 +08:00
1dbbd97749 ble: support esp32c6 power save example 2023-07-10 18:08:37 +00:00
0cf0757224 Merge branch 'bugfix/ulp_fsm_ci_v5.1' into 'release/v5.1'
ulp-system/ulp-fsm: clean up test cases (v5.1)

See merge request espressif/esp-idf!24070
2023-07-11 01:46:39 +08:00
6cd4e61149 Merge branch 'bigfix/examples_ping_console_v5.1' into 'release/v5.1'
examples: Fix icmp-echo to auto connect to Ethernet/WiFi if selected (v5.1)

See merge request espressif/esp-idf!24654
2023-07-11 01:45:54 +08:00
cf517e3e39 Merge branch 'bugfix/tempsensor_wifi_conflict_v5.1' into 'release/v5.1'
temperature_sensor: Fix issue that have conflict with phy / Fix phy pwdet and tsens power cannot be set twice issue (v5.1)

See merge request espressif/esp-idf!24064
2023-07-11 01:38:04 +08:00
bdbb717be9 mbedtls: update submodule to include:
fix: mbedtls_ecdsa_can_do was not being defined when ECDSA_SIGN_ALT is defined but ECDSA_VERIFY_ALT is not defined causing mbedtls_ecdsa_verify_restartable to always fail.
feature: initial version of the sbom.yml file
2023-07-10 14:11:51 +00:00
a09a503073 Merge branch 'bugfix/nan_sd_dp_fixes_v5.1' into 'release/v5.1'
NAN Service discovery and datapath bugfixes (Backport v5.1)

See merge request espressif/esp-idf!24383
2023-07-10 21:44:49 +08:00
24011f1e6c Merge branch 'fix/update_doc_for_spi_slave_hd_protocol_v5.1' into 'release/v5.1'
fix(all): update documentaion for spi slave hd protocols (v5.1)

See merge request espressif/esp-idf!24635
2023-07-10 19:39:45 +08:00
3eacf08267 fix(app_trace): Fix apptrace data corruption on ESP32-S3
Close https://github.com/espressif/esp-idf/issues/10604
diff --git a/components/soc/esp32s3/include/soc/tracemem_config.h b/components/soc/esp32s3/include/soc/tracemem_config.h
index 55c9b907dd..75fd87419b 100644
--- a/components/soc/esp32s3/include/soc/tracemem_config.h
+++ b/components/soc/esp32s3/include/soc/tracemem_config.h
@@ -10,7 +10,7 @@ extern "C" {
 #endif

 #define TRACEMEM_MUX_BLK0_NUM                   22
-#define TRACEMEM_MUX_BLK1_NUM                   23
+#define TRACEMEM_MUX_BLK1_NUM                   26

 #if (TRACEMEM_MUX_BLK0_NUM < 6) || (TRACEMEM_MUX_BLK0_NUM > 29)
 #error Invalid TRAX block 0 num!
2023-07-10 13:06:02 +03:00
e21fc0dc50 Merge branch 'feature/update_ble_libs_5.1' into 'release/v5.1'
ble: Added APIs for QA test

See merge request espressif/esp-idf!24651
2023-07-10 17:21:51 +08:00
e68d4a7177 Merge branch 'feature/update_ble_duplicte_vs_hci_lib_fix_5_1' into 'release/v5.1'
Feature/update ble duplicte vs hci lib fix 5 1

See merge request espressif/esp-idf!24638
2023-07-10 15:09:18 +08:00
fed2e21594 Merge branch 'feature/usb/host/hid_example_update_v5.1' into 'release/v5.1'
USB Host (HID): HID Host example update (backport v5.1)

See merge request espressif/esp-idf!24532
2023-07-10 13:31:53 +08:00
7bce53cc0d build system: fix init.bat crash in windows when folder contains unicode characters 2023-07-10 11:33:01 +08:00
d636754e70 build system: more accurate error information for git_describe
Closes https://github.com/espressif/esp-idf/issues/9071

See merge request espressif/esp-idf!23891
2023-07-10 11:31:32 +08:00
e29e39f9d6 esp_event: fix build error related to format
Closes https://github.com/espressif/esp-idf/issues/11428

See merge request !23833
2023-07-10 11:28:03 +08:00
0954babbd6 temperature_sensor: make as a weak link 2023-07-10 11:16:09 +08:00
a33541f036 phy: fix phy pwdet and tsens power cannot be set twice issue
Closes https://github.com/espressif/esp-idf/issues/11627
2023-07-10 11:16:09 +08:00
e493a99da2 temperature_sensor: Apply new-shared interface in temperature sensor driver 2023-07-10 11:16:09 +08:00
acc6d99572 temperature_sensor: Add new interface and reference counts so that phy and driver can use together 2023-07-10 11:16:09 +08:00
4a1c291389 fix(all): update documentaion for spi slave hd protocols 2023-07-10 03:00:45 +00:00
3b7dc69e90 Merge branch 'feature/sync_libphy_v5.1' into 'release/v5.1'
sync libphy to v5.1

See merge request espressif/esp-idf!24588
2023-07-10 10:38:41 +08:00
bd985deee6 Merge branch 'doc/add_timing_diagram_for_bt_l2cap_server_and_client_v5.1' into 'release/v5.1'
docs(examples/bluetooth): Add the sequence diagram for L2CAP connection and the discription for the diagram (backport v5.1)

See merge request espressif/esp-idf!24661
2023-07-10 10:30:27 +08:00
0930b5ca1e Merge branch 'bugfix/fix_spi_flash_api_concurrency_issue_v5.1' into 'release/v5.1'
spi_flash: fix concurrency issue when concurrently calling esp_flash apis (v5.1)

See merge request espressif/esp-idf!24508
2023-07-10 10:24:51 +08:00
c558904661 Merge branch 'bugfix/handle_correct_return_value_v5.1' into 'release/v5.1'
Nimble: Corrected conditional check during connection to handle failure case (v5.1)

See merge request espressif/esp-idf!24644
2023-07-10 10:24:18 +08:00
28860655af Merge branch 'bugfix/update_esp_rom_layout_v5.1' into 'release/v5.1'
esp_rom: fix rom layout issues (backport v5.1)

See merge request espressif/esp-idf!24639
2023-07-10 10:23:16 +08:00
33aff4c5a0 Fix for sending deauth before Eap-Failure in WPS 2023-07-10 02:20:51 +00:00
59f91c5f37 Merge branch 'bugfix/fix_deepsleep_wakestub_example_ci_failure_v5.1' into 'release/v5.1'
ci: fix deepsleep wakestub example ci failure (backort v5.1)

See merge request espressif/esp-idf!24465
2023-07-10 10:19:40 +08:00
625ebbf829 docs(examples/bluetooth): Add the sequence diagram of L2CAP connection and the discription for the sequence diagram
1: add the sequence diagram for the bluetooth example projects,bt_l2cap_server and bt_l2cap_client, which implenment the L2CAP connection.
2: add the discription for the sequence diagram.
2023-07-08 12:38:42 +08:00
575a433c98 Fix incorrect invocation of the hook LWIP_HOOK_DHCPS_POST_APPEND_OPTS
Fix https://github.com/espressif/esp-idf/issues/11373
2023-07-07 14:14:02 +02:00
cf4c39a225 esp_netif: Make esp_netif_receive() return value configurable 2023-07-07 13:56:13 +02:00
39b8218750 esp_netif: Report error if esp_netif_receive() fails
Closes https://github.com/espressif/esp-idf/issues/10770
2023-07-07 13:56:13 +02:00
7865676159 examples: Fix icmp-echo to auto connect to Ethernet/WiFi if selected
Closes https://github.com/espressif/esp-idf/issues/10655
2023-07-07 13:53:47 +02:00
a7b62bbcaf Merge branch 'bufix/fix_assert_while_stack_deinit_v5.1' into 'release/v5.1'
NimBLE :  Fix assert due to controller event while stack deinit (v5.1)

See merge request espressif/esp-idf!24620
2023-07-07 19:41:52 +08:00
027e6ecab9 ble: Added APIs for QA test 2023-07-07 19:40:48 +08:00
5c11366e01 Merge branch 'feature/support_adc_calibration_on_c6_v5.1' into 'release/v5.1'
adc_cali: supported adc calibration on esp32c6 (v5.1)

See merge request espressif/esp-idf!23936
2023-07-07 18:29:11 +08:00
18ffa02b72 esp_wifi : Fix collection of issues during sta scan and roam.
1) Fix issue during split scan to allow for data tx.
2) Fix issue when parsing wpa_ie to set correct authmode when AP
   supports both WPA_EAP and WPA_EAP_SHA256 authmode.
   Closes https://github.com/espressif/esp-idf/issues/11202
3) Fix an occasional crash during sta roam.
4) Add home_channel_dwell_time to wifi_scan_config_t. This allows
   configuration of the time spent between scanning consecutive
   channels for tx.
2023-07-07 18:11:38 +08:00
43604dffbe esp_wifi: fix ret when setting channel at wifi not started, fix timer callback 2023-07-07 18:09:29 +08:00
6cb39b4485 Merge branch 'bugfix/concurrency_while_eloop_register_v5.1' into 'release/v5.1'
esp_wifi: Bugfix concurrency observed while doing eloop register (v5.1)

See merge request espressif/esp-idf!24570
2023-07-07 18:00:49 +08:00
8592f19a95 esp_phy: fix rtc_printf and libbtbb version print 2023-07-07 17:39:25 +08:00
044baf90e5 sync libphy to v5.1 2023-07-07 17:38:01 +08:00
66f384cad0 Merge branch 'bugfix/added_chip_based_cca_config_v5.1' into 'release/v5.1'
ble: fix cca for esp32c2

See merge request espressif/esp-idf!24426
2023-07-07 17:31:00 +08:00
893967f596 feat (NimBLE): Add proximity sensor as a service 2023-07-07 14:59:22 +05:30
64ba835d05 Merge branch 'feat/improve_wifi_rx_in_high_interference_v5.1' into 'release/v5.1'
esp_phy: update esp32c2 phy lib to fix some issues(v5.1)

See merge request espressif/esp-idf!24163
2023-07-07 17:19:27 +08:00
a787b927c7 Nimble: Corrected conditional check during connection to handle failure case 2023-07-07 14:33:44 +05:30
a8c9665ae2 Merge branch 'ble_dev/support_esp32h2_modem_clock_selection_5.1' into 'release/v5.1'
ble: support esp32h2 modem clock selection

See merge request espressif/esp-idf!24388
2023-07-07 16:57:22 +08:00
68654bfd5f Merge branch 'feature/add_support_pcl_vsc_v5.1' into 'release/v5.1'
fix(Nimble): Add VSC / VSE handling code and structure for PCL Set RSSI (v5.1)

See merge request espressif/esp-idf!24608
2023-07-07 16:27:26 +08:00
fc7d4488bf esp_rom: fix rom layout issues 2023-07-07 01:02:07 -07:00
730d8e18d8 fix(ble): Fix duplicate var length issue 2023-07-07 14:29:21 +08:00
1398605873 fix(ci): Fix declaration isn't a prototype issue 2023-07-07 14:29:21 +08:00
0359d0df5d feat(ble): Update ble lib to 6f9ef119 2023-07-07 14:29:21 +08:00
eea7df273c change(ble): Enable pdu type trig in duplicate in default mode as before 2023-07-07 14:29:21 +08:00
a5f127ec88 feat(ble): Add duplicate refersh function support for esp32h2 2023-07-07 14:29:21 +08:00
2b195191b3 feat(ble): Add support to scan period refresh duplicate cache list 2023-07-07 14:29:21 +08:00
a357fd17c2 feat(ble): Add duplicate filter feature enable on ble for h2. 2023-07-07 14:29:21 +08:00
6dc7d9b63f feat(ble): Add duplicate filter feature enable on ble for c6. 2023-07-07 14:29:21 +08:00
a7f00f503a spi_flash: rename spi_flash_os_func_app: spi_start, spi_end
spi_start -> s_acquire_spi_bus_lock
spi_end -> s_release_spi_bus_lock
2023-07-07 10:13:28 +08:00
f142415475 spiflash: added esp_flash API concurrency pressure test 2023-07-07 10:13:28 +08:00
faa8c2bc8f spi_flash: fix concurrency issue when calling esp_flash apis under xip_psram or auto_suspen 2023-07-07 10:13:28 +08:00
d2e8dccd40 spiflash: fix not calling on_spi_acquired when CONFIG_SPI_FLASH_SHARE_SPI1_BUS issue 2023-07-07 10:13:28 +08:00
7c6ab05f50 feat(nimble): Add support for PCL Set RSSI VSC and example code for its usage
This commit adds support for sending Vendor Specific HCI commands and handling Vendor Specific HCI
Events in the Nimble stack. It also includes the necessary configuration options and APIs to handle
these commands and events.

The following changes were made:
- Added configuration option to enable support for VSC and VSE
- Added API to send Vendor Specific HCI commands
- Added example code for using the Set RSSI VSC for Power Control

This commit also includes some minor code improvements and bug fixes
2023-07-06 19:54:19 +05:30
022ce314c3 Nimble: Add APIs to handle vs HCI commands and events 2023-07-06 19:54:19 +05:30
bb3bd09b93 esp_phy: update esp32c2 phy lib to fix some issues
1. improve Wi-Fi rx 11b pkts for AC-DC power supply modules.
2. fix Wi-Fi disconnect in low temperature.
3. fix RTC_SW_CPU_RST occur in Wi-Fi start and stop process.
2023-07-06 17:09:09 +08:00
f1b9af72fd Merge branch 'bugfix/sync_reporting_files_v5.1' into 'release/v5.1'
NimBLE : Sync common porting and nimble submodule files (v5.1)

See merge request espressif/esp-idf!24277
2023-07-06 15:05:54 +08:00
d25df894fa Merge branch 'bugfix/host_flw_ctrl_v5.1' into 'release/v5.1'
NimBLE: Fixed mismatch of number of completed packtes in host flow control (v5.1)

See merge request espressif/esp-idf!23854
2023-07-06 14:33:06 +08:00
7b70e2eb34 ble: fix cca for esp32c2 2023-07-06 14:05:43 +08:00
fe05003a8f fix(nimble): Fix assert due to controller event while stack deinit 2023-07-06 10:30:36 +05:30
57312e6e3e adc_calib: support calibration v2 on esp32c6 2023-07-06 10:36:29 +08:00
5e3488396a Merge branch 'bugfix/fix_some_bt_controller_bug_v5.1' into 'release/v5.1'
component_bt:Fixed some bluetooth bugs(v5.1)

See merge request espressif/esp-idf!24579
2023-07-06 00:54:40 +08:00
16ff61b36e Merge branch 'ble_dev/support_ble_light_sleep_using_extra_link_5.1' into 'release/v5.1'
Ble dev/support ble light sleep using extra link 5.1

See merge request espressif/esp-idf!24192
2023-07-05 20:32:56 +08:00
71a5663786 Merge branch 'bugfix/hfp_packet_type_err_v5.1' into 'release/v5.1'
Revised (e)SCO configuration parameter sets (v5.1)

See merge request espressif/esp-idf!24346
2023-07-05 20:05:59 +08:00
d682fbeb07 Merge branch 'bugfix/alarm_not_free_when_a2dp_deinit_v5.1' into 'release/v5.1'
bugfix/Fixed the issue of alarm leak (v5.1)

See merge request espressif/esp-idf!24351
2023-07-05 19:53:09 +08:00
425b660583 Merge branch 'feature/update_avrcp_v1.5_v5.1' into 'release/v5.1'
change(bt/Bluedroid): Update AVRCP version to 1.5 (v5.1)

See merge request espressif/esp-idf!24582
2023-07-05 19:52:09 +08:00
4474b0ac8c Merge branch 'bugfix/resume_ext_scan_pti_in_time_v5.1' into 'release/v5.1'
bt: fix the issue that BLE scan uses high priority incorrectly and causes Wi-Fi unable to work normally on ESP32-C3 and ESP32-S3(backport v5.1)

See merge request espressif/esp-idf!24403
2023-07-05 19:49:05 +08:00
51ed7ef9f1 Merge branch 'bugfix/fix_hang_during_sleep_process_v5.1' into 'release/v5.1'
Power Management: fix hang on pd_top sleep process (backport v5.1)

See merge request espressif/esp-idf!24459
2023-07-05 19:48:19 +08:00
60163c3b0f Merge branch 'bugfix/memory_cleanup_optimization_v5.1' into 'release/v5.1'
Nimble: Fixes for memory leak / optimization (v5.1)

See merge request espressif/esp-idf!24139
2023-07-05 19:42:58 +08:00
97b0cb9d14 Merge branch 'contrib/github_pr_11337_v5.1' into 'release/v5.1'
w5500: mac: poll VERSIONR to ensure the chip is initialised (GitHub PR) (v5.1)

See merge request espressif/esp-idf!24551
2023-07-05 19:34:10 +08:00
87b960121a Merge branch 'contrib/github_pr_10987_v5.1' into 'release/v5.1'
Allow to config the maximum number of VFS entries. (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23871
2023-07-05 19:32:32 +08:00
40f93bcc41 Merge branch 'ci/tcp_transport_test_app_v5.1' into 'release/v5.1'
ci: Migrate unit test for tcp_transport to unit test app (v5.1)

See merge request espressif/esp-idf!24248
2023-07-05 19:30:44 +08:00
aa434942c1 Merge branch 'backport/fix_multipan_api_error_and_coex_delay_reg' into 'release/v5.1'
ieee802154: fix multipan api error and update coex_arb_delay reg(Backport v5.1)

See merge request espressif/esp-idf!24399
2023-07-05 19:30:07 +08:00
9658469de2 Merge branch 'backport/modification_when_154_stop_tx_rx_ack' into 'release/v5.1'
Fix OpenThread/IEEE802.15.4 bugs found in test(backport v5.1)

See merge request espressif/esp-idf!24060
2023-07-05 19:28:43 +08:00
b8cfb56c43 Merge branch 'bugfix/tx_only_link_up_v5.1' into 'release/v5.1'
Ethernet minor fixes (v5.1)

See merge request espressif/esp-idf!23968
2023-07-05 19:25:46 +08:00
46396d7c16 Merge branch 'bugfix/usb_serial_jtag_select_poll_crash_v5.1' into 'release/v5.1'
vfs: select sanity NULL check (v5.1)

See merge request espressif/esp-idf!23946
2023-07-05 19:25:25 +08:00
5d05aa9942 fix(esp_wifi): NAN Service discovery and datapath bugfixes
1. Increase timeout value for NDP Accepted/Rejected events
2. Update publisher ID incase publisher restarts(service)
3. Ignore service discovery frames with invalid/inactive service ID
4. Update NAN documentation
2023-07-05 14:33:56 +05:30
f3e2681766 Merge branch 'contrib/github_pr_11743_v5.1' into 'release/v5.1'
docs(jtag): Update chip revisions to follow ESP32-C3 errata (GitHub PR) (v5.1)

See merge request espressif/esp-idf!24589
2023-07-05 15:26:26 +08:00
1e7d3425e5 bt-coexist: fix the issue for BLE scan in using whitelist that scan PTI keeps high and not resumes after reception of ADV_EXT_IND but no AUX_ADV_IND followed on ESP32-C3 and ESP32-S3, which causes Wi-Fi unable to work normally 2023-07-05 12:54:59 +08:00
6f673e95c9 adc_oneshot: move power acquire back to adc_oneshot_new_unit
Revert and fix of d197c59eaa in !23575

adc_cali: fix the condition of ocode calibration
2023-07-05 12:48:11 +08:00
e90a2d50c4 adc_cali: supported channel compensation of adc calibration on esp32c6 2023-07-05 12:48:11 +08:00
0b7485db02 efuse(c6): Adds adc calib efuses 2023-07-05 12:48:11 +08:00
6336a9e2b5 adc_cali: supported adc calibration on esp32c6 2023-07-05 12:48:11 +08:00
a41f5387c1 NimBLE : Sync porting files 2023-07-05 10:02:58 +05:30
a2a674a107 NimBLE: Fixed mismatch of number of completed packtes in host flow control 2023-07-05 10:01:46 +05:30
e0b98b75e7 Merge branch 'docs/add_provisioning_CN_trans_backport_v5.1' into 'release/v5.1'
Docs: add CN translation for api-reference/provisioning/provisioning.rst (backport v5.1)

See merge request espressif/esp-idf!24486
2023-07-05 12:29:45 +08:00
deca1e79ba Docs: add CN translation for api-reference/provisioning/provisioning.rst (backport v5.1) 2023-07-05 12:29:45 +08:00
bcde9d944e Merge branch 'docs/add_Chinese_translation_for_linux-host-requirements.rst_and_external-ram-esp32-notes.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for linux-host-requirements.rst and external-ram-esp32-notes.rst (backport v5.1)

See merge request espressif/esp-idf!24491
2023-07-05 12:29:08 +08:00
4e2acf1af7 docs: provide CN translation for linux-host-requirements.rst and external-ram-esp32-notes.rst (backport v5.1) 2023-07-05 12:29:08 +08:00
2cffd23655 Merge branch 'bugfix/pmu_wait_xtal_stable_time_issue' into 'release/v5.1'
fix PMU wait xtal stable time issue for esp32c6

See merge request espressif/esp-idf!24259
2023-07-05 12:27:26 +08:00
7c696fcb71 Merge branch 'bugfix/rtc_clk_int_rc32k_miss_calib_cycles_config_v5.1' into 'release/v5.1'
backport v5.1: fix the issue of missing configuration for calibration cycles of the internal 32 kHz RC

See merge request espressif/esp-idf!24584
2023-07-05 12:27:08 +08:00
9d47a58750 Merge branch 'bugfix/macro_changes_in_nimble-1.5_v5.1' into 'release/v5.1'
NimBLE : Update macro name changes in nimble-1.5 (v5.1)

See merge request espressif/esp-idf!23745
2023-07-05 12:24:52 +08:00
8051cb704c Merge branch 'bugfix/fix_bootloader_wrong_spi_freq_print_v5.1' into 'release/v5.1'
bugfix: fix esp32c6 bootloader print wrong spi speed mode (backport v5.1)

See merge request espressif/esp-idf!24460
2023-07-05 12:24:16 +08:00
bd0343c9c3 Merge branch 'bugfix/fix_config_option_v5.1' into 'release/v5.1'
Nimble: Fixed setting macro values based on selected configuration (v5.1)

See merge request espressif/esp-idf!24137
2023-07-05 12:16:36 +08:00
bcef59f33c Merge branch 'bugfix/mbedtls_dyanmic_buffer_with_dhm_build_v5.1' into 'release/v5.1'
fix(mbedtls): Build issue in dynamic buffer feature (v5.1)

See merge request espressif/esp-idf!24537
2023-07-05 12:04:00 +08:00
051965af52 Merge branch 'bugfix/fix_pcl_enh_rsp_v5.1' into 'release/v5.1'
Nimble: Removed the extra status field in the enh read transmit power level (v5.1)

See merge request espressif/esp-idf!23883
2023-07-05 12:00:25 +08:00
4b761af41b Merge branch 'docs/walkthrough_for_multi_adv_examples_v5.1' into 'release/v5.1'
Nimble: Added Example Walkthrough tutorial for Multi Adv example (v5.1)

See merge request espressif/esp-idf!24509
2023-07-05 11:58:46 +08:00
4ea182eaa2 Merge branch 'docs/add_a_note_about_RMT_preipheral_in_the_programming_guide_v5.1' into 'release/v5.1'
rmt: add a note about binding channels to the same GPIO (v5.1)

See merge request espressif/esp-idf!24566
2023-07-05 10:08:33 +08:00
b875331c31 Merge branch 'bugfix/remove_python_examples_ttfw_v5.1' into 'release/v5.1'
Nimble:Removed files referring to old TTFW framework (v5.1)

See merge request espressif/esp-idf!23497
2023-07-05 10:08:03 +08:00
c6bc222d54 Merge branch 'feature/walkthrough_for_htp_examples_v5.1' into 'release/v5.1'
Nimble: Added Example Walkthrough tutorial for HTP example in nimble (v5.1)

See merge request espressif/esp-idf!24534
2023-07-05 10:07:37 +08:00
c66e4a8a50 Merge branch 'bugfix/ringbuf_static_object_size_v5.1' into 'release/v5.1'
Ringbuf: Fix ordering of StaticRingbuffer_t (v5.1)

See merge request espressif/esp-idf!24593
2023-07-05 09:45:02 +08:00
163f0721dd feat(usb): update HID Host example 2023-07-05 00:52:13 +00:00
09808b7fb4 Merge branch 'doc/updata_adc_migration_guide_v5.1' into 'release/v5.1'
migration_guide: update adc calibration api part (v5.1)

See merge request espressif/esp-idf!24257
2023-07-05 08:49:26 +08:00
8cb70f0d12 ringbuf: Fix ordering of StaticRingbuffer_t
When building on linux/host compilers (e.g., GCC), the compiler may add padding
depending on the size and order of the member types.

This commit fixes the ordering or the StaticRingbuffer_t such that it matches
the internal Ringbuffer_t. The "_Static_assert" is always enabled for all
compilers.

Closes https://github.com/espressif/esp-idf/issues/11726
2023-07-04 21:30:43 +01:00
c81bc8c819 Merge branch 'bugfix/aes_dma_align_issue_v5.1' into 'release/v5.1'
aes: fix DMA descriptor calculation for the alignment case (v5.1)

See merge request espressif/esp-idf!24093
2023-07-04 19:57:10 +08:00
8f0d41d02b docs(jtag): Update CN translation of 'api-guides/jtag-debugging/index.rst' 2023-07-04 19:29:24 +08:00
1737366af7 docs(jtag): Update chip revisions to follow ESP32-C3 errata (GitHub PR) 2023-07-04 19:29:24 +08:00
7b6af86814 docs(rmt): add a note about binding channels to the same GPIO
Added a note about RX Channel and TX Channel initialization order when
bound RX and TX to the same gpio.

Closes https://github.com/espressif/esp-idf/issues/11768
2023-07-04 19:26:33 +08:00
3ded61323d Nimble: Added Example Walkthrough tutorial for Multi Adv example 2023-07-04 15:55:04 +05:30
3345092a44 Nimble: Added Example Walkthrough tutorial for HTP example in nimble 2023-07-04 15:54:34 +05:30
40bf1ed65e Merge branch 'bugfix/add_event_cb_for_pcl_v5.1' into 'release/v5.1'
Nimble: Add support to send power control event in registered callback (v5.1)

See merge request espressif/esp-idf!23583
2023-07-04 18:18:59 +08:00
1ed419e23c Nimble: Removed the extra status field in the enh read transmit power level 2023-07-04 15:48:38 +05:30
4e1ec90525 Nimble: Fixed setting macro values based on selected configuration 2023-07-04 15:48:16 +05:30
73639cf0b4 Nimble: Fixes for memory leak / optimization 2023-07-04 15:45:22 +05:30
d39b4d849e Merge branch 'docs/add_Chinese_translation_for_api-reference/peripherals/rmt.rst_backport_v5.1' into 'release/v5.1'
docs: provide CN translation for api-reference/peripherals/rmt.rst (backport v5.1)

See merge request espressif/esp-idf!24540
2023-07-04 18:12:46 +08:00
9216bdc078 Power Management: fix PMU wait xtal stable time issue 2023-07-04 16:22:00 +08:00
94a10372cc feature: skip console uart flush and sleep when estimated uart flush time exceeds the sleep duration to avoid rtos tick jump failed 2023-07-04 16:14:20 +08:00
963fac95d7 fix(rtc_clk): fix the issue of missing configuration for calibration cycles of the internal 32 kHz RC 2023-07-04 16:06:37 +08:00
015555c6fb change(bt/Bluedroid): Update AVRCP version to 1.5 2023-07-04 15:52:29 +08:00
6e9dabe659 bt: Fixed some bluetooth bugs
1. Fixed LC_AFH_UPDATE_IND  has not benn processed causing memory exhaustion
2. Fixed no free elt in prog push
3. Fixed disconnect due to sniff with error Dsniff
4. Fixed the problem that the host continued to send ACL data to the controller after disconnection, which caused the connection to fail again
2023-07-04 15:03:10 +08:00
4bf8f8895c Update bt-lib for esp32
- Fixed memory leak when setting adv data
2023-07-04 15:03:05 +08:00
50904e9353 components/bt: Fix crash due to NULL point 2023-07-04 14:55:04 +08:00
b5cab579fe fix(core-system/esp event): Fixed missing error return documentation for esp_event_loop_create_default
ESP_ERR_INVALID_STATE was not listed as a possible return error code.

Closes https://github.com/espressif/esp-idf/issues/11745
2023-07-04 13:41:51 +08:00
0e1bcddd70 Merge branch 'bugfix/throughput_watchdog_on_c6_v5.1' into 'release/v5.1'
Nimble: Fix watchdog timer issue in throughput app (v5.1)

See merge request espressif/esp-idf!24266
2023-07-04 13:35:12 +08:00
d9426fc255 Merge branch 'contrib/github_pr_11652_v5.1' into 'release/v5.1'
Fix ULP FSM register macros with addr[9:0] > 0xFF (GitHub PR) (v5.1)

See merge request espressif/esp-idf!24268
2023-07-04 13:27:52 +08:00
29f52acbfe Merge branch 'bugfix/increase_pm_dump_time_field_length_v5.1' into 'release/v5.1'
Power Management: increase pm_dump time field width (backport v5.1)

See merge request espressif/esp-idf!24450
2023-07-04 12:16:38 +08:00
b0717c6852 Merge branch 'feature/enable_sleep_reject_for_deep_sleep_v5.1' into 'release/v5.1'
sleep: enable sleep reject when entering deepsleep (backport v5.1)

See merge request espressif/esp-idf!24440
2023-07-04 12:16:11 +08:00
159e80246b Merge branch 'feature/add_modem_module_rst_api_v5.1' into 'release/v5.1'
modem_clock: add modem module mac reset api (backport v5.1)

See merge request espressif/esp-idf!24441
2023-07-04 12:15:33 +08:00
11d34b143f Merge branch 'bugfix/sdp_32_and_128_bit_UUID_v5.1' into 'release/v5.1'
bt:Fixed SDP not being able to configure 32-bit and 128-bit UUID(v5.1)

See merge request espressif/esp-idf!24442
2023-07-04 12:15:01 +08:00
09f2ab841f Merge branch 'docs/update_esp_hid_host_v5.1' into 'release/v5.1'
[docs] fix documents for Bluetooth HID Host API reference (backport v5.1)

See merge request espressif/esp-idf!24389
2023-07-04 12:14:22 +08:00
c020194656 Revised (e)SCO configuration parameter sets 2023-07-04 04:12:35 +00:00
4ce9023cd4 Fixed the issue of alarm leak in hf-ag 2023-07-04 04:12:24 +00:00
ced0a5747b Fixed the issue of alarm leak in A2DP 2023-07-04 04:12:24 +00:00
38e2a6fce6 esp_wifi: Bugfix concurrency observed while doing eloop register 2023-07-04 09:42:18 +05:30
56bb50b85e Merge branch 'bugfix/fix_some_ble_bugs_v5.1' into 'release/v5.1'
FIxed some BLE bugs (backport v5.1)

See merge request espressif/esp-idf!24275
2023-07-04 12:11:35 +08:00
207e589917 Merge branch 'bugfix/support_esp32c6_sleep_retention_extra_link_v5.1' into 'release/v5.1'
backport v5.1: support extra linked list retention for BLE and 15.4

See merge request espressif/esp-idf!24220
2023-07-04 12:11:04 +08:00
54360507f3 Merge branch 'bugfix/malloc_free_removal_v5.1' into 'release/v5.1'
Backport some wifi fixes (backport v5.1)

See merge request espressif/esp-idf!24264
2023-07-04 12:10:21 +08:00
f93f08bcd2 Merge branch 'bugfix/fix_wps_with_sae_enabled_ap_v5.1' into 'release/v5.1'
esp_wifi: Fix WPS issue for WPA3+WPA2 mode (v5.1)

See merge request espressif/esp-idf!24152
2023-07-04 12:09:50 +08:00
30a67ed72c btbb: support register retention in esp32c6 2023-07-04 12:09:22 +08:00
e72359fc66 ble:added esp32c6 light sleep support 2023-07-04 12:09:22 +08:00
b2b0940516 Merge branch 'bugfix/fix_Cache_Count_Flash_bug_v5.1' into 'release/v5.1'
cache: patch some rom cache api, rename those apis in ld (backport v5.1)

See merge request espressif/esp-idf!24289
2023-07-04 12:07:25 +08:00
27a5a6fcae Merge branch 'bugfix/fix_esp32s3_psram_access_failed_in_dfs_v5.1' into 'release/v5.1'
esp_pm: fix esp32s3 psram access failed when dfs is enabled (backport v5.1)

See merge request espressif/esp-idf!24202
2023-07-04 12:06:42 +08:00
4647045388 Merge branch 'bugfix/support_esp326_xtal_xpd_v5.1' into 'release/v5.1'
esp32c6: support xtal xpd (backport v5.1)

See merge request espressif/esp-idf!24253
2023-07-04 12:04:51 +08:00
d4bfed373e Merge branch 'rebase/add_ble_version_support_for_c6_eco1' into 'release/v5.1'
ble:add version num support for esp32c6 chip v5.1

See merge request espressif/esp-idf!23610
2023-07-04 12:03:36 +08:00
8181da4fee heap: remove exclusion of esp32h2 as a target for no/light/comprehensive_poisoning tests 2023-07-04 11:08:59 +08:00
e70c174643 Merge branch 'contrib/github_pr_11405_v5.1' into 'release/v5.1'
Fix initialization macros for twai_timing_config_t not setting .clk_src and .brp (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23983
2023-07-04 11:04:22 +08:00
0e4c071519 Merge branch 'bugfix/fix_i2s_ll_cpp_compilation_failure_v5.1' into 'release/v5.1'
i2s: fixed i2s_ll compiling failure under C++ environment (v5.1)

See merge request espressif/esp-idf!24401
2023-07-04 11:03:35 +08:00
934bdca370 Merge branch 'feature/add_log_when_mspi_timing_tuning_is_enabled_v5.1' into 'release/v5.1'
mspi: added timing tuning start, and success log (v5.1)

See merge request espressif/esp-idf!24053
2023-07-04 11:02:20 +08:00
ee91a42a33 ulp-system/ulp-fsm: clean up test cases 2023-07-04 02:59:15 +00:00
0f0b77b192 Merge branch 'refactor/pump_up_dependency_version_of_es8311_example_v5.1' into 'release/v5.1'
feati(example): bump up dependency version of examples (v5.1)

See merge request espressif/esp-idf!24554
2023-07-04 10:34:18 +08:00
1bf26b2def Merge branch 'bugfix/incorrect_time_after_ota_v5.1' into 'release/v5.1'
esp_hw_support: Fix invalid system time if s_esp_rtc_time_us & s_rtc_last_ticks were moved around (v5.1)

See merge request espressif/esp-idf!24408
2023-07-03 20:37:40 +08:00
0a3fc51ae0 Merge branch 'feature/esp_ipc_isr_fix_v5.1' into 'release/v5.1'
esp_system: Fix a race-condition in esp_ipc_isr (in QEMU env) (v5.1)

See merge request espressif/esp-idf!23991
2023-07-03 20:35:33 +08:00
7d72773d88 Merge branch 'bugfix/systick_loop_v5.1' into 'release/v5.1'
freertos: Fix Systick stuck when systimer was not reset (v5.1)

See merge request espressif/esp-idf!24321
2023-07-03 20:34:58 +08:00
bac32e9c43 feat(example): bump up version of es8311 lvgl in the example 2023-07-03 16:33:42 +08:00
3d181f5346 ble:add version num support for esp32c6 chip 2023-07-03 16:16:06 +08:00
f963c7c009 Merge branch 'bugfix/vfs_uart_outof_bounds_read_v5.1' into 'release/v5.1'
vfs_uart: fix out-of-bounds read (v5.1)

See merge request espressif/esp-idf!24312
2023-07-03 16:13:06 +08:00
4f0f317d54 Merge branch 'bugfix/mcpwm_legacy_typo_v5.1' into 'release/v5.1'
mcpwm: fix typo in backward compatible macro name (v5.1)

See merge request espressif/esp-idf!24227
2023-07-03 16:11:20 +08:00
098e559d46 w5500: rework version check to avoid a false alarm on fault detection
See: https://github.com/espressif/esp-idf/issues/11331
2023-07-03 06:51:15 +00:00
cacb45d450 Merge branch 'bugfix/coverity_scan_fix_driver_v5.1' into 'release/v5.1'
ADC: Fixed potential multiply overflow in the calibration code (v5.1)

See merge request espressif/esp-idf!24091
2023-07-03 13:40:22 +08:00
a17bdbd3ef Merge branch 'bugfix/rgb_pixel_copy_bpp8_v5.1' into 'release/v5.1'
rgb_lcd: Support LCD rotation for LCD whose pixel size is one byte (v5.1)

See merge request espressif/esp-idf!24208
2023-07-03 13:40:07 +08:00
fb0cc7189a NimBLE : Update macro name changes in nimble-1.5 2023-07-03 04:58:43 +00:00
81b03f6d32 Nimble: Add support to send power control event in registered callback 2023-07-03 09:52:59 +05:30
4a27fde8e4 Merge branch 'docs/trans_wifi_provisioning_backport_v5.1' into 'release/v5.1'
Docs: add CN translation for api-reference/provisioning/wifi_provisioning.rst (backport v5.1)

See merge request espressif/esp-idf!24479
2023-07-03 12:18:35 +08:00
1e3f330130 Docs: add CN translation for api-reference/provisioning/wifi_provisioning.rst (backport v5.1) 2023-07-03 12:18:34 +08:00
ec8268d863 fix(mbedtls): Build issue in dynamic buffer feature
Fix build issue in mbedTLS dynamic buffer feature with
`CONFIG_MBEDTLS_DHM_C` enabled case.

Closes https://github.com/espressif/esp-idf/issues/11770
2023-07-03 04:01:19 +00:00
ebb5fb9e88 ble:support esp32h2 power save example 2023-07-03 11:45:16 +08:00
1eb43094c5 phy: update phy enable/disable for h2 light sleep 2023-07-03 11:45:16 +08:00
06c6281add ble: support esp32h2 modem clock selection 2023-07-03 11:45:16 +08:00
c44624c056 Merge branch 'feature/esp_rom_update_cpu_freq_v5.1' into 'release/v5.1'
bootloader_support: add missing esp_rom_sys.h to bootloader_flash.c bootloader build (v5.1)

See merge request espressif/esp-idf!24014
2023-07-03 11:38:38 +08:00
cd4845e431 Merge branch 'bugfix/fixed_ble_create_sync_fail_v5.1' into 'release/v5.1'
Bugfix/fixed ble create sync fail v5.1

See merge request espressif/esp-idf!24305
2023-07-03 10:59:49 +08:00
952998aacd Merge branch 'bugfix/spi_master_assert_failure_v5.1' into 'release/v5.1'
spi_master: fix the assertion on a NULL desired_dev (v5.1)

See merge request espressif/esp-idf!24004
2023-07-03 10:50:28 +08:00
32928e630d Merge branch 'bugfix/led_strip_potential_buffer_overwrite_v5.1' into 'release/v5.1'
example: fix led strip memory overwrite before trans done (v5.1)

See merge request espressif/esp-idf!23938
2023-07-03 10:49:24 +08:00
657586e6ba docs: provide CN translation for api-reference/peripherals/rmt.rst 2023-07-03 10:34:00 +08:00
423931c2fa Merge branch 'bugfix/linux_heap_realloc_v5.1' into 'release/v5.1'
core-system/linux-target: fixed heap_caps_realloc not correctly allocating the... (v5.1)

See merge request espressif/esp-idf!23976
2023-07-03 10:31:40 +08:00
61524a2675 Merge branch 'bugfix/esp32c2_slave_report_address_error_v5.1' into 'release/v5.1'
Bugfix/esp32c2 slave report address error v5.1

See merge request espressif/esp-idf!23923
2023-07-03 10:31:20 +08:00
8c5e1c1d49 Merge branch 'docs/fix_typo_in_api-reference_system_ota_v5.1' into 'release/v5.1'
fix a typo in api-reference/system/ota (v5.1)

See merge request espressif/esp-idf!24444
2023-07-03 09:27:20 +08:00
a4bf7dd65c Merge branch 'docs/update_installation_prerequisites_for_ubuntu_debian_v5.1' into 'release/v5.1'
docs: update installation prerequisites for Ubuntu and Debian system (v5.1)

See merge request espressif/esp-idf!24451
2023-07-03 09:27:07 +08:00
cc74be8dbb Merge branch 'docs/update_code_how_to_configure_multiple_antennas_of_wifi_v5.1' into 'release/v5.1'
docs: update code of how to configure multiple antennas of wifi (v5.1)

See merge request espressif/esp-idf!24456
2023-07-03 09:26:50 +08:00
679ac08d77 Merge branch 'docs/fix_typo_in_api_guides_usb_otg_console_v5.1' into 'release/v5.1'
docs: fix a typo in api-guides/usb-otg-console (v5.1)

See merge request espressif/esp-idf!24453
2023-07-03 09:26:37 +08:00
d7986f9b22 Merge branch 'docs/update_interrupt_number_esp32h2_v5.1' into 'release/v5.1'
docs: update the number of interrupts for esp32h2 (v5.1)

See merge request espressif/esp-idf!24458
2023-07-03 09:26:17 +08:00
f34139e379 Merge branch 'support/esp_coredump_logs_config_v5.1' into 'release/v5.1'
Optionally disable logs in espcoredump component (v5.1)

See merge request espressif/esp-idf!24482
2023-07-02 22:04:59 +08:00
0bf93134f4 Merge branch 'feature/anti_dpa_configuration_c6_h2_v5.1' into 'release/v5.1'
esp32c6/esp32h2: crypto: add support for DPA protection configuration (v5.1)

See merge request espressif/esp-idf!24128
2023-06-30 23:50:44 +08:00
86eb7862ec Merge branch 'bugfix/fix_memory_leak_in_ws_server_example_v5.1' into 'release/v5.1'
example: Fix memory leak in ws_echo_server when httpd_queue_work failed (backport v5.1)

See merge request espressif/esp-idf!23955
2023-06-30 23:49:30 +08:00
d93007b44a Merge branch 'fix/xts_aes_register_prefix_discrepancy_c6_h2_v5.1' into 'release/v5.1'
fix: xts aes register prefix discrepancy for ESP32H2 and ESP32C6 (v5.1)

See merge request espressif/esp-idf!24263
2023-06-30 23:48:57 +08:00
9bf3bfe85c Merge branch 'bugfix/add_esp32h2_chip_id_v5.1' into 'release/v5.1'
Add ESP32-H2 chip id in `esp_chip_id_t` enum in esp_app_format.h header file (v5.1)

See merge request espressif/esp-idf!24111
2023-06-30 23:48:28 +08:00
633d072d05 Merge branch 'bugfix/expose_clear_all_wl_api_v5.1' into 'release/v5.1'
fix(Nimble): Expose API to clear all addresses in whitelist out of stack (v5.1)

See merge request espressif/esp-idf!24307
2023-06-30 22:10:04 +08:00
5d35a45a53 Merge branch 'feature/extend_proj_desc_json_v5.1' into 'release/v5.1'
extend information in project_description.json (v5.1)

See merge request espressif/esp-idf!24125
2023-06-30 21:17:05 +08:00
d4652daec6 Merge branch 'fix/idf_tools_certificate_v5.1' into 'release/v5.1'
Tools: Update the certificate of idf_tools.py (v5.1)

See merge request espressif/esp-idf!23928
2023-06-30 21:16:32 +08:00
df7ab11865 Merge branch 'fix/hints-print-control-characters_v5.1' into 'release/v5.1'
tools: fix control characters print if hints enabled (v5.1)

See merge request espressif/esp-idf!23889
2023-06-30 21:15:48 +08:00
c8ea97984f Merge branch 'bugfix/removed_working_directory_error_v5.1' into 'release/v5.1'
Tools bugfix: Removed working directory when using idf.py (v5.1)

See merge request espressif/esp-idf!24150
2023-06-30 21:06:34 +08:00
b48beba60f Merge branch 'feature/tools_add_ulp_linux_i686_toolchain_v5.1' into 'release/v5.1'
tools: add ULP toolchain for linux-i686 platform (v5.1)

See merge request espressif/esp-idf!24194
2023-06-30 21:05:29 +08:00
9ceed8a0c9 Merge branch 'feature/submodules_sbom_v5.1' into 'release/v5.1'
tools: add sbom information for submodules (v5.1)

See merge request espressif/esp-idf!24240
2023-06-30 21:05:02 +08:00
7985943ec2 Merge branch 'bugfix/bump_check_copyright_v5.1' into 'release/v5.1'
tools: bump check-copyright in .pre-commit-config.yaml (v5.1)

See merge request espressif/esp-idf!24341
2023-06-30 21:04:09 +08:00
e0fff7b2cc Merge branch 'fix/pyparsing_3.1.0_compatibility_v5.1' into 'release/v5.1'
fix: Compatibility with pyparsing>=3.1.0 (backport v5.1)

See merge request espressif/esp-idf!24369
2023-06-30 21:03:50 +08:00
d4efb0e369 Merge branch 'docs/fix_error_in_esp32-s2-devkitc-1_pin_layout_diagram_v5.1' into 'release/v5.1'
Docs/Fix error in esp32-s2-devkitc-1 pin layout diagram (v5.1)

See merge request espressif/esp-idf!24122
2023-06-30 20:10:12 +08:00
152055933d Merge branch 'docs/update_cn_for_api-conventions_backport_v5.1' into 'release/v5.1'
Docs: Translate api-conventions.rst (backport v5.1)

See merge request espressif/esp-idf!24121
2023-06-30 20:08:14 +08:00
7687c5200c Added description to disable coredump logs to ram_usage.rst
Signed-off-by: Vikram <vikram.dattu@espressif.com>
2023-06-29 11:50:48 +05:30
207ac93d43 Optionally disable logs in espcoredump component
Early log strings used by this component are placed in DRAM.
Disabling these logs saves ~5KB of internal memory

Signed-off-by: Vikram <vikram.dattu@espressif.com>
2023-06-29 11:50:48 +05:30
3381782661 ci: increase timeout threshold to solve deepsleep wakestub example ci failure 2023-06-28 18:15:57 +08:00
cbce221e88 Merge branch 'bugfix/mac_ext_order_for_c6_h2_v5.1' into 'release/v5.1'
efuse: Fix byte order in MAC_EXT (for C6 and H2) (v5.1)

See merge request espressif/esp-idf!23990
2023-06-28 17:33:53 +08:00
88289c3fda bugfix: fix bootloader print wrong spi speed mode 2023-06-28 16:12:09 +08:00
13e546fa20 docs: update the number of interrupts for esp32h2 2023-06-28 15:07:46 +08:00
09d8803687 docs: update code of how to configure multiple antennas of wifi 2023-06-28 14:43:37 +08:00
c820d8181c docs: fix a typo in api-guides/usb-otg-console 2023-06-28 14:40:44 +08:00
790b6a2ad8 docs: update installation prerequisites for Ubuntu and Debian system 2023-06-28 14:38:41 +08:00
171544ded4 bugfix: increase pm_dump time field width
Closes https://github.com/espressif/esp-idf/issues/11704
2023-06-28 14:37:27 +08:00
58ee786bfd fix a typo in api-reference/system/ota 2023-06-28 14:25:01 +08:00
0b7e61b95a btc_sdp: add_raw_sdp: fix 32 and 128-bit uuid configuration
Added proper conversion of 4 and 16-byte UUIDs values to binary streams.
UUIDs now set with SDP_AddAttribute() instead of
SDP_AddServiceClassIdList().
2023-06-28 14:11:34 +08:00
afc889e934 esp_wifi: implement wifi_reset_mac_wrapper 2023-06-28 14:01:43 +08:00
2e5a194f62 esp_hw_support: add modem module mac reset api 2023-06-28 14:01:29 +08:00
981701755d ci: fix failed ci test jobs 2023-06-28 13:55:26 +08:00
1c12743d44 sleep: enable sleep reject when entering deep sleep and return err if sleep request is rejected 2023-06-28 13:55:16 +08:00
bb6d154f11 freertos: Fix Systick stuck when systimer was not reset
Relates to OTA update for C3/S3 chips from IDF version 4.3 to v5.0 and above
2023-06-26 12:21:28 +00:00
6d0d2366f7 esp_hw_support: Fix invalid system time if s_esp_rtc_time_us & s_rtc_last_ticks were moved around
The commit fixes the case:
If variables in RTC RAM have been moved around by the linker,
they will be filled with garbage data. Any reset other than OTA would work fine
because the variables would still be initialized from the initial bootup.

So now system time will be valid even after OTA.

Closes https://github.com/espressif/esp-idf/issues/9448
2023-06-26 18:12:30 +08:00
13e74d5573 i2s: fixed i2s_ll compiling failure under C++ evironment
Closes: https://github.com/espressif/esp-idf/issues/11625
2023-06-26 15:42:36 +08:00
b615fd7f8f touch_element: fix unintended integer division 2023-06-26 07:07:52 +00:00
0e68d6fb29 usbh: fix invalid assert on desc_status 2023-06-26 07:07:52 +00:00
641a07950d vfs_uart: fix out-of-bounds read
when open uart device "/2" on chips only have 2 UART peripherals
2023-06-26 07:07:52 +00:00
fc49f10bb4 ieee802154: fix multipan api error and update coex_arb_delay reg 2023-06-26 10:57:17 +08:00
8ed82f11ae fix: Compatibility with pyparsing>=3.1.0 2023-06-25 19:59:13 +02:00
zwl
503de45dd8 ble: Fixed the issue of occasional failure to create sync on ESP32-H2 2023-06-25 21:46:41 +08:00
zwl
5d00fd4d60 ble: Fixed the issue of occasional failure to create sync on ESP32-C6 2023-06-25 21:46:13 +08:00
5fa5f7b2fe component/docs: enable generation of API-reference documents for Bluetooth HID host 2023-06-25 15:37:41 +08:00
e5899f6a70 resolve the conflicts 2023-06-25 15:37:41 +08:00
3a9762ce57 Nimble: Removed files referring to old TTFW framework 2023-06-25 11:43:30 +05:30
a2daceb791 Nimble: Expose API to clear all addresses in whitelist out of stack 2023-06-25 10:13:39 +05:30
c570f67461 Merge branch 'ci/fix_extra_backslash' into 'release/v5.1'
build_template_app: Remove extra backslash

See merge request espressif/esp-idf!24374
2023-06-23 19:39:05 +08:00
2fb799c52e build_template_app: Remove extra backslash 2023-06-23 15:01:53 +05:30
79e12a1840 Merge branch 'ci/ignore_pkg_resources_deprecation_warning_v5.1' into 'release/v5.1'
ci: ignore pkg_resources deprecation warning (v5.1)

See merge request espressif/esp-idf!24339
2023-06-21 15:37:40 +08:00
fbbc548e7f tools: bump check-copyright in .pre-commit-config.yaml
Newer check-copyright version 1.0.2 contains fixes for copyrights
with single year and also the proposed date update is applied only
if number of changed lines is greater or equal to a limit. The default
limit is 5 and can be changed with the --lines-changed option if needed.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-21 07:06:01 +02:00
3cad4ca937 ci: ignore pkg_resources deprecation warning 2023-06-21 07:27:15 +08:00
4ba10243f4 cache: patch some rom cache api, rename those apis in ld
1. Cache_Count_Flash_Pages, fix this api return enexpected + 1
2. Cache_Suspend_I/DCache, add wait cache idle after suspend cache
3. Cache_Freeze_I/DCache_Enable, add wait cache idle after freeze
2023-06-19 10:53:51 +08:00
f0860ac590 ci: add access psram with DFS unity test 2023-06-19 10:21:46 +08:00
96a1de0af8 bugfix: use avaliable gpio for esp32s3 pm_trace 2023-06-19 10:21:46 +08:00
ad1605a464 bugfix: fix esp32s3 psram access failed when dfs is enabled 2023-06-19 10:21:42 +08:00
b4dcd3bf21 Update bt-lib for esp32
1 Fixed disconnection delay on peripheral when slave latency is not zero
2 Fixed LLCP info init for central and peripheral
3 Fixed sent cmd status evt twice when process disconnect cmd
2023-06-16 11:06:12 +08:00
db68d45702 Update bt lib for ESP32-C3 and ESP32-S3
- Fixed crash when controller initialization fails due to insufficient memory
2023-06-16 11:05:49 +08:00
3758e37024 bluedroid: fixed default extended connection params 2023-06-16 11:02:17 +08:00
4001888e69 esp_hid: fixed ble hid battery level setting 2023-06-16 11:01:40 +08:00
0602ed3b4c esp_wifi: Remove direct call of malloc() and free() 2023-06-15 22:38:48 +05:30
b20922c6d5 esp_wifi: fix some txop issues 2023-06-15 22:38:44 +05:30
e707ad166d fix ULP FSM reg ops with addr > 0xFF 2023-06-15 14:00:45 +02:00
dbb6fddcbc Introduced delay to avoid watchdog timer in throughput app 2023-06-15 15:15:25 +05:30
96767058df esp32c6: xts-aes register preefix discrepency 2023-06-15 13:53:35 +05:30
2fb7d32cd3 esp32h2: xts-aes register prefix discrepency 2023-06-15 13:53:35 +05:30
3edc3e9b48 migration_guide: update adc calibration api part 2023-06-15 11:46:31 +08:00
896b382015 mcpwm: fix typo in backward compatible macro name 2023-06-15 10:58:15 +08:00
8aa7e85e31 sleep: Fix domain power down status cannot get updated accordingly with the allowance of retention in runtime 2023-06-15 10:26:59 +08:00
f0b6e8f37e feature: support xtal_xpd pmu parameters 2023-06-15 10:22:33 +08:00
e1f2e656e2 ci: Migrate unit test for tcp_transport to unit test app 2023-06-14 16:01:00 +02:00
18969310e2 tools: do not disable pytest-embedded
As pointed out by Fu Hanxi, the pytest_build_system job is currently
using --parallel-index and --parallel-count, which are provided by
pytest-embedded, so we should not disable it. Moreover to properly
disable pytest-embedded we should use "no:pytest_embedded". Meaning
this probably was not working as indented anyway.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-14 12:42:50 +02:00
dbff74bee4 tools: add sbom information for submodules
This adds SBOM information for submodules, which are not managed
by Espressif. Meaning there is no fork for them in the espressif
namespace. Other submodules should add sbom.yml manifest file to
the root of their git repository.

The SBOM information for submodules is stored in the .gitmodules file.
Each SBOM related variable has the "sbom-" prefix and the following
variables may be used:

sbom-version:
   submodule version

sbom-cpe:
   CPE record if available in NVD. This will be used by the SBOM
   tool to check for possible submodule vulnerabilities. The
   version in the CPE can be replaced with the "{}" placeholder,
   which will be replaced by the "sbom-version" value from above.

sbom-supplier:
   Person or organization who is providing the submodule.
   It has to start with "Person:" or "Organization:" prefix
   as required by the SPDX-2.2 standard.

sbom-url:
   URL to the project if exists, e.g. github.

sbom-description:
   Project description.

sbom-hash:
   Submodule SHA as recorded in the git-tree. This field is used by
   CI to check that the submodule checkout hash and info in .gitmodules
   are in sync. IOW if submodule is updated and it has SBOM info in
   .gitmodules, the .gitmodules has to be updated too. The test is
   part of this commit. The checkout has of the submodule can be found
   by using "git submodule status".

Example for micro-ecc submodule
---8<---
[submodule "components/bootloader/subproject/components/micro-ecc/micro-ecc"]
	path = components/bootloader/subproject/components/micro-ecc/micro-ecc
	url = ../../kmackay/micro-ecc.git
	sbom-version = 1.0
	sbom-cpe = cpe:2.3🅰️micro-ecc_project:micro-ecc:{}:*:*:*:*:*:*:*
	sbom-supplier = Person: Ken MacKay
	sbom-url = https://github.com/kmackay/micro-ecc
	sbom-description = A small and fast ECDH and ECDSA implementation for 8-bit, 32-bit, and 64-bit processors
	sbom-hash = d037ec89546fad14b5c4d5456c2e23a71e554966
---8<---

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-14 12:38:12 +02:00
ec51060d45 pau: fix logic error in extra link retention 2023-06-13 21:06:29 +08:00
ccd4ff2945 sleep retention: implement the extra linked list retention for modules with retention clock bugs 2023-06-13 21:05:36 +08:00
ef4c0a7753 sleep retention: fix crash issue caused by destroying the module after the module node creation fails 2023-06-13 21:04:38 +08:00
8b18591982 rgb_lcd: support pixel copy for 8bpp
Closes https://github.com/espressif/esp-idf/issues/11581
2023-06-13 18:21:21 +08:00
e44a6888ea mac_addr(C6 and H2): Fix byte order of MAC_EXT and change format of IEEE802154 MAC
The changes only related to C6 and H2 chips where CONFIG_SOC_IEEE802154_SUPPORTED=y.
For this case these APIs return 8 bytes
    esp_efuse_mac_get_default() -> 8 bytes
    esp_efuse_mac_get_custom() -> 8 bytes
    esp_read_mac(..., ESP_MAC_IEEE802154) -> 8 bytes
The rest cases len is 6 bytes
2023-06-13 16:56:13 +08:00
ee7554c1c4 esp_system: Fix a race-condition in esp_ipc_isr (in QEMU env)
The race condition is very unlikely on real hardware but can be observed with
qemu under heavy load.
Also add missing `memw` instructions which are generated by the C compiler but
absent in the assembly code.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Signed-off-by: KonstantinKondrashov <konstantin@espressif.com>

Merges https://github.com/espressif/esp-idf/pull/11447
Closes https://github.com/espressif/esp-idf/issues/11433
2023-06-13 08:10:00 +00:00
9538dc203d tools: add ULP toolchain for linux-i686 platform
Closes https://github.com/espressif/esp-idf/issues/11561
2023-06-13 12:50:04 +07:00
3d7f7c32e3 adc: fix out of bound read
when SOC_ADC_PERIPH_NUM==1, the adc_unit should only be assigned with 0
2023-06-12 15:19:17 +08:00
778a045e66 mspi: added timing tuning start, and success log 2023-06-12 11:49:05 +08:00
7c2743f379 esp_wifi: Fix WPS issue for WPA3+WPA2 mode 2023-06-09 18:22:59 +05:30
8a9f12eaa4 Tools bugfix: Removed working directory when using idf.py
Added check for existence of current working directory when using idf.py

Closes https://github.com/espressif/esp-idf/issues/11476
2023-06-09 14:24:29 +02:00
1764a0bd28 crypto: add support for DPA protection configuration in C6/H2
- Technical details covered in section "15.3.2 Anti-DPA Attack Security
Control" chapter of the ESP32-C6 TRM
- Default configuration sets the security level low for the DPA
protection
- This change applies to all the crypto peripherals where the clock
frequency is dynamically adjusted to create randomness in the power
consumption trajectory
- This configuration helps to make the SCA attacks difficult on the
crypto peripherals
2023-06-08 20:37:03 +05:30
03162bb276 tools: extend information in project_description.json
This extends information provided in the project_description.json file.
Newly added information can be used in the SBOM generating tool and
also to improve hints regarding the the component dependency issues.

Added fields

version:
   This adds versioning to the project_description.json file,
   so it's easy to identify if it contains the required information.

project_version:
   Can be used as a version for the resulting binary e.g. `hello_world.bin`.

idf_path:
   This one is probably not necessary, but it allows tools to run even without
   esp-idf environment exported(e.g. export.sh).

c_compiler:
   The `CMAKE_C_COMPILER` value with full path to the compiler binary. This can
   be used to get information about toolchain, which was used to build the project.

common_component_reqs:
   List of common components as presented in cmake's __COMPONENT_REQUIRES_COMMON
   and set in tools/cmake/build.cmake:__build_init().

build_component_info:
   Detailed information about components used during build. It's a
   dictionary with the component name as a key and each component has
   a dictionary with detailed information. Following is an example for
   the efuse component.

   "efuse": {
       "alias": "idf::efuse",
       "target": "___idf_efuse",
       "prefix": "idf",
       "dir": "/home/fhrbata/work/esp-idf/components/efuse",
       "type": "LIBRARY",
       "lib": "__idf_efuse",
       "reqs": [],
       "priv_reqs": [ "bootloader_support", "soc", "spi_flash" ],
       "managed_reqs": [],
       "managed_priv_reqs": [],
       "file": "/home/fhrbata/work/blink/build/esp-idf/efuse/libefuse.a",
       "sources": [ "/home/fhrbata/work/esp-idf/components/efuse/esp32s3/esp_efuse_table.c", ... ],
       "include_dirs": [ "include", "esp32s3/include" ]
   }

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-08 14:29:53 +02:00
0f781c718c tools: fix make_json_list to return empty json list for empty cmake list
Currently make_json_list() returns '[ "" ]' for empty cmake list. Fix this
so empty json list is returned instead.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-06-08 14:29:53 +02:00
ae86d26f7e openthread: fix assert when parsing security key failed 2023-06-08 17:15:16 +08:00
7cb730a6e8 fix_error_in_esp32-s2-devkitc-1_pin_layout_diagram 2023-06-08 16:51:09 +08:00
66c3265a26 Docs: Translate api-conventions.rst 2023-06-08 16:32:26 +08:00
4866e7c6d0 Add ESP32-H2 chip id in esp_chip_id_t enum in esp_app_format.h header file 2023-06-08 10:34:23 +05:30
69bcbe97f4 aes: fix DMA descriptor calculation for the alignment case
The number of the DMA descriptors allocated for certain length (e.g.,
8176) were not sufficient (off by 1 error). This used to result in the
dynamic memory corruption as the region was modified beyond the
allocated range.

This change fixes the DMA descriptor calculation part and allocates
sufficient DMA descriptors based on the data length alignment considerations.

Test has also been added to cover the specific scenario in the CI.

Closes https://github.com/espressif/esp-idf/issues/11310
2023-06-07 04:29:32 +00:00
f9cf8db97e drivers: fix issue reported by coverity 2023-06-07 11:42:11 +08:00
a9d12c0fe9 adc: fixed the issue that multiply overflow before type expand 2023-06-07 11:40:56 +08:00
e74a2565e4 Fix initialization macros for twai_timing_config_t not setting .clk_src and .brp 2023-06-07 01:45:26 +00:00
57e70c0d2c IEEE802154: modification of the action when stop tx/rx ack 2023-06-05 17:56:01 +08:00
zwl
50d30f7ff1 esp_phy:Update phy lib for ESP32-C2 2023-06-05 16:49:48 +08:00
zwl
80f3ad1f1b ble:fixed the issue that slave reports the wrong address for master when address resolution disable 2023-06-05 16:49:48 +08:00
4bc762621d Merge branch 'bugfix/fix_bleqabr23_222_v5.1' into 'release/v5.1'
Revert "bluedroid: report disconnect event after BLE link closed" (backport 5.1)

See merge request espressif/esp-idf!24036
2023-06-03 08:43:09 +08:00
42592552b5 Merge branch 'feature/itwt_add_setup_timeout_timer_backport_v5.1' into 'release/v5.1'
esp_wifi: itwt add setup timeout timer to track response frame (backport v5.1)

See merge request espressif/esp-idf!24040
2023-06-03 08:40:41 +08:00
5a21bea309 esp_wifi: itwt add setup timeout timer to track response frame 2023-06-02 19:46:15 +08:00
cb88d20f9e Merge branch 'bugfix/fix_wakeup_failed_if_powerdown_flash_in_lightsleep_v5.1' into 'release/v5.1'
Power Management: fixed flash funcs called in sleep wakeup process (backport v5.1)

See merge request espressif/esp-idf!24009
2023-06-02 19:18:36 +08:00
d28cb4a954 esp_wifi:
1. mesh: layer2 node will scan all channels when fixed root leave
2. show warning info when setting max connection num for softAP
2023-06-02 17:27:28 +08:00
c5e580e522 Revert "bluedroid: report disconnect event after BLE link closed"
This reverts commit d751960b27.
2023-06-02 16:51:07 +08:00
ddc16a47fe Merge branch 'bugfix/wpsreg_ap_assoc_respone_v5.1' into 'release/v5.1'
esp_wifi: Bugfix wpsreg AP not responding to assoc req (v5.1)

See merge request espressif/esp-idf!24027
2023-06-02 13:30:22 +08:00
03832dbd5e bugfix: fix some flash funcs called in sleep wakeup process 2023-06-02 02:53:51 +00:00
ecf46dd5da Merge branch 'docs/update_esp32c6_wifi_api_guides_backport_v5.1' into 'release/v5.1'
docs: update esp32c6 api guides about wifi part (backport v5.1)

See merge request espressif/esp-idf!24020
2023-06-01 19:24:50 +08:00
e8d9104953 esp_wifi: Bugfix wpsreg AP not responding to assoc req
Fixed regression caused by 2b8e40e7
2023-06-01 15:36:54 +05:30
6cd76ba321 docs: update for esp32c6 2023-06-01 14:27:19 +08:00
5a9cff0d34 docs: update esp32c6 api guides about wifi part 2023-06-01 14:26:37 +08:00
aa741b90ad Merge branch 'docs/c6_misc_updates_v5.1' into 'release/v5.1'
Docs: c6 misc updates (v5.1)

See merge request espressif/esp-idf!23999
2023-06-01 11:03:42 +08:00
4b20d27caf bootloader_support: add missing esp_rom_sys.h to bootloader_flash.c bootloader build
Missing esp_rom_sys.h header could cause declaration issues.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2023-06-01 10:57:16 +08:00
d5fb4ff7c8 esp_rom: add common ROM API to update CPU tick rate 2023-06-01 10:57:13 +08:00
b845c66748 spi_master: fix the assertion on a NULL desired_dev
Closes https://github.com/espressif/esp-idf/issues/11536
2023-06-01 02:50:45 +00:00
22adf838c9 Merge branch 'bugfix/c6_h2_decrease_rng_frequency_v5.1' into 'release/v5.1'
esp_hw_support: decrease RNG read frequency for C6 and H2 (v5.1)

See merge request espressif/esp-idf!24001
2023-06-01 00:54:49 +08:00
f4f45345ee esp_hw_support: decrease RNG read frequency on C6 and H2
* The RNG reading frequency of 200 KHz has been too high for
  C6 and H2 since on these chips the RNG output is combined
  with the RTC slow clock which is only 150KHz. Reduced the max
  reading frequency via esp_random() from 200KHz to 62.5KHz,
  which show best results in tests.
  Also updated the bootloader_fill_random() max frequency to the
  same value to be in line, even though it was just 83KHz.
2023-05-31 16:16:25 +00:00
7b09d12c89 Merge branch 'bugfix/efuse_summary_v5.1' into 'release/v5.1'
system-hardware/efuse: fixed efuse summary description containing ; breaking efuse-summary (v5.1)

See merge request espressif/esp-idf!23979
2023-05-31 22:57:37 +08:00
30f8f83d52 Merge branch 'bugfix/add_warning_for_rc_fast_calibration_h2_v5.1' into 'release/v5.1'
clk: Add warning log if RC_FAST clock calibration is needed on esp32h2 (v5.1)

See merge request espressif/esp-idf!23935
2023-05-31 20:21:11 +08:00
5cd24826bb Merge branch 'bugfix/fix_rc_fast_calibration_v5.1' into 'release/v5.1'
rtc_clk: fix esp32c6/esp32h2 eco chip `RC_FAST` bad calibration value (backport v5.1)

See merge request espressif/esp-idf!23940
2023-05-31 17:40:28 +08:00
0d13f6f09d Merge branch 'bugfix/fix_hang_during_sleep_process_v5.1' into 'release/v5.1'
bugfix: fix hang on pd_top sleep process (backport v5.1)

See merge request espressif/esp-idf!23852
2023-05-31 17:40:02 +08:00
871dd9e21a docs: updated misc C6 programming guide docs with minor changes. 2023-05-31 15:47:26 +08:00
273d973489 idocs: updated Storage API reference documents for ESP32H2 2023-05-31 15:46:42 +08:00
8df4a852f5 docs: updated Storage API reference documents for ESP32C6 2023-05-31 15:46:41 +08:00
bb4218285b system-hardware/efuse: fixed efuse summary description containing ; breaking efuse-summary
If the efuse description from esptool contained semi-colons it would be interpretted as
a list delimiter in CMake. Summary is now passed as in quotes to escape this behavior.
2023-05-30 14:07:50 +08:00
c337759e24 core-system/linux-target: fixed heap_caps_realloc not correctly allocating the requested number of bytes
Closes https://github.com/espressif/esp-idf/issues/11523
2023-05-30 13:27:46 +08:00
888e4339f9 esp_eth: fixed esp_eth_transmit_vargs to transmit only when link is up
esp_eth test: clear unicast Rx event before wait
2023-05-29 11:22:11 +00:00
997f9dd183 example: Fix memory leak in ws_echo_server when httpd_queue_work failed
Closes https://github.com/espressif/esp-idf/issues/11507
2023-05-26 20:02:58 +08:00
3da76d4bd7 vfs: select sanity NULL check
https://github.com/espressif/esp-idf/issues/9964
2023-05-26 13:46:11 +02:00
ea5e0ff298 Merge branch 'backport/fix_matter_commissioning_ble_disconnect_issue' into 'release/v5.1'
openthread: Add some backports related to openthread(Backport v5.1)

See merge request espressif/esp-idf!23893
2023-05-26 15:37:14 +08:00
125d00c0f7 Merge branch 'feature/c6_bootloader_rng_v5.1' into 'release/v5.1'
Feature/c6 bootloader rng (v5.1)

See merge request espressif/esp-idf!23896
2023-05-26 15:36:45 +08:00
8c714acfb5 bugfix: fix rc_fast bad calibration value 2023-05-26 13:59:25 +08:00
1a68d8ddd5 example: fix led strip memory overwrite before trans done
Closes https://github.com/espressif/esp-idf/issues/11487
2023-05-26 13:28:31 +08:00
702afbb0f7 clk: Add warning log if RC_FAST clock calibration is needed on esp32h2 2023-05-26 11:45:00 +08:00
41047c16c9 Tools: Update the certificate of idf_tools.py 2023-05-25 16:29:56 +02:00
b0e2f33082 esp_hw_support/bootloader: made ESP32-C6 and ESP32-H2 RNG available 2023-05-24 09:43:21 +05:30
7eb9af5806 openthread: fix frame counter when re-transmition 2023-05-24 10:43:16 +08:00
2016bddbda openthread: add kconfig for enabling mac filter 2023-05-24 10:42:52 +08:00
d9e289a5fb esp_phy: updating lib phy to adapt the voltage changes 2023-05-24 10:35:39 +08:00
71f1bc4453 tools: fix control characters print if hints enabled
Closes https://github.com/espressif/esp-idf/issues/11351
2023-05-23 18:30:22 +08:00
6ad6fb9755 Merge branch 'feature/update_ble_doc_for_esp32c6_esp32h2_v5.1' into 'release/v5.1'
ble docs: Update ble doc for esp32c6 and esp32h2

See merge request espressif/esp-idf!23801
2023-05-23 15:33:51 +08:00
aea087b793 vfs: VFS_MAX_COUNT should be non-zero even without IO support 2023-05-22 12:30:24 +02:00
de4e003256 Allow to config the maximum number of VFS entries. 2023-05-22 12:30:24 +02:00
56677dabe8 Merge branch 'add_c6_in_supported_targets_in_prov_example_v5.1' into 'release/v5.1'
Add ESP32-C6 in supported targets (v5.1)

See merge request espressif/esp-idf!23846
2023-05-20 07:41:54 +08:00
9310ed608e Merge branch 'contrib/github_pr_10532_v5.1' into 'release/v5.1'
[SDMMC Mount] fix infinite loop when SD card is not responsive (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23527
2023-05-20 07:35:38 +08:00
057cf2b8ee Merge branch 'bugfix/wifi_backport_v5.1' into 'release/v5.1'
esp_wifi: backport some wifi fixes to v5.1

See merge request espressif/esp-idf!23847
2023-05-20 07:34:41 +08:00
829fdd172c Merge branch 'feature/add_support_for_lp_i2c_v5.1' into 'release/v5.1'
lp-i2c: Added support for LP I2C peripheral to LP core (v5.1)

See merge request espressif/esp-idf!23850
2023-05-20 04:38:59 +08:00
8cecbafe18 Merge branch 'bugfix/close_phy_tsens_before_sleep_v5.1' into 'release/v5.1'
sleep: fix deepsleep current leakage caused by phy_tsens (backport v5.1)

See merge request espressif/esp-idf!23843
2023-05-19 20:29:22 +08:00
786faa3cac Merge branch 'doc/update_efuse_info_v5.1' into 'release/v5.1'
doc: Update all efuse info files (v5.1)

See merge request espressif/esp-idf!23853
2023-05-19 20:28:15 +08:00
6477500cf1 sdmmc: incrementally increase delay of vTaskDelay
Prevents unnecessary slowdown in polling functions
2023-05-19 14:01:43 +02:00
3ef8c77588 esp_dpp: Fix retry with esp_supp_dpp_start_listen after failure
This fixes a subtle bug in which ESP_ERR_DPP_TX_FAILURE errors would
call esp_supp_dpp_stop_listen which sets the s_dpp_stop_listening flag
to true.  Subsequent attempts to restart listening with
esp_supp_dpp_start_listen then only attempt to listen once more for
500ms before reading the s_dpp_stop_listening flag again and giving up.

This contributes greatly to #10615, but the fix here is still largely
a work-around as it sometimes requires manually retrying a couple times
before it works.  Without this fix, any number of retries by
deinit/init again will seemingly not work as the retries for currently
unknown reasons.

Signed-off-by: Shreyas Sheth <shreyas.sheth@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/10865
2023-05-19 17:17:18 +08:00
9aedb4bd83 wpa_supplicant : Fix scan results for GCMP and GCMP-256 cipher.
Add support for recognising GCMP and GCMP-256 ciphers if used by AP.
Update the scan example to show the correct cipher.
2023-05-19 16:58:51 +08:00
576489f8cf wpa_supplicant : Add MBO ie in probe request.
Adds the MBO information element in the probe request frame by resetting
scan_ie after set_config is done.
2023-05-19 16:58:40 +08:00
a32201f6ec Merge branch 'bugfix/fix_compilation_error_optimization_v5.1' into 'release/v5.1'
Nimble: Fix compilation issues seen while enabling -O2 optimization (v5.1)

See merge request espressif/esp-idf!23717
2023-05-19 16:48:18 +08:00
774696285d Merge branch 'bugfix/fix_lp_bod_if_bt_i154_init_phy_before_wifi_v5.1' into 'release/v5.1'
fix(phy): fix lp_bod reset if bt/i154 init phy before wifi

See merge request espressif/esp-idf!23831
2023-05-19 16:25:11 +08:00
d345beb02a Merge branch 'contrib/github_pr_11402_v5.1' into 'release/v5.1'
esp_ds: ignore releasing mutex if not called from same task (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23840
2023-05-19 16:11:15 +08:00
cb6b14a0f8 doc: Update efuse info files 2023-05-19 15:17:16 +08:00
eccb5318f9 Kconfig: add more help info for pm related options help 2023-05-19 13:51:29 +08:00
1df2dcc9fe bugfix: treat too short sleep duration as sleep reject by software 2023-05-19 13:51:24 +08:00
00e777aff9 bugfix: fix pmp retention and add pma retention 2023-05-19 13:51:20 +08:00
267c5e37a2 lp-i2c: Added support for LP I2C peripheral to LP core
This commit adds support for the LP I2C peripheral driver to be used by
the LP core. An example is also added to demonstrate the usage of the LP
I2C peripheral from the LP core.
2023-05-19 07:33:01 +02:00
2220a07ec1 1. Support NAN ifx for API's esp_wifi_internal_set_fix_rate and esp_wifi_set_protocol
2. Remove user configurable flag fsd_reqd from NAN publish config
3. Fix issue wherein NDL of previously cancelled service is obtained in peer record of new service with no NDL
2023-05-19 12:46:39 +08:00
a3ecb8fe93 Add esp32c6 in supported target for ota examples 2023-05-19 10:03:45 +05:30
d9de899ed7 Add ESP32-C6 in supported targets for wifi_prov_mgr example 2023-05-19 10:03:45 +05:30
871bbdcec3 netdb:fixed bug for getaddrinfo returns null when IPV4 mapped address
Closes https://github.com/espressif/esp-idf/issues/9693
2023-05-19 12:26:07 +08:00
050367ea37 esp_wifi: fix softap nvs <ssid,password,pmk> not match issue
Closes FCS-1196
2023-05-19 12:23:20 +08:00
8bfb5c837e esp_wifi: Fix tx_callback issue for ESP32C6 2023-05-19 12:19:54 +08:00
7412d1a1a9 wpa_supplicant: Use 'mbedtls_pk_parse_public_key' to parse compressed EC public key and remove unnecessary code
Support to parse compressed EC public key is added from 'mbedtls-3.4.0'
2023-05-19 12:19:08 +08:00
edf9f9eff7 esp-wifi: add station SAE-PK (Public Key) configuration note 2023-05-19 12:18:49 +08:00
fc5fe1132a bugfix: close phy_tsens before deepsleep 2023-05-19 11:04:17 +08:00
ed32d7a267 Merge branch 'bugfix/move_adc_onshot_power_management_to_shot_read_func_v5.1' into 'release/v5.1'
Sleep: Fixed abnormal deepsleep base current of ULP ADC on esp32s2/esp32s3 chips (backport v5.1)

See merge request espressif/esp-idf!23828
2023-05-19 11:03:54 +08:00
0d12613ab9 ble docs: Update the ble docs for esp32c6 and esp32h2 2023-05-19 11:03:11 +08:00
cc7c851cb2 Merge branch 'feature/use_api_to_enable_modem_on_esp32h2_v5.1' into 'release/v5.1'
ble: use modem_clock api to set clocks on ESP32-H2

See merge request espressif/esp-idf!23806
2023-05-19 11:01:44 +08:00
501c7d1101 esp_ds: ignore releasing mutex if not called from same task 2023-05-19 08:31:34 +05:30
05c98d8b53 Merge branch 'bugfix/sync-contribution-guide_v5.1' into 'release/v5.1'
docs: updated contribution agreement (v5.1)

See merge request espressif/esp-idf!23839
2023-05-19 10:54:51 +08:00
19f300fa24 Merge branch 'bugfix/use_safe_noreturn_attr_v5.1' into 'release/v5.1'
compiler: replaced noreturn by __noreturn__ in header files (v5.1)

See merge request espressif/esp-idf!23811
2023-05-19 09:37:50 +08:00
c58915842e Merge branch 'bugfix/eth-start-spi-initialize-failure-v5.1' into 'release/v5.1'
Fix eth_start initializes spi bus with SPI_DMA_CH_AUTO (backport v5.1)

See merge request espressif/esp-idf!23815
2023-05-19 09:12:22 +08:00
6cc4ab56e4 docs: updated contribution agreement 2023-05-18 16:27:45 +02:00
bd0f9b8512 fix(phy): fix lp_bod reset if bt/i154 init phy before wifi 2023-05-18 20:57:57 +08:00
43a67a5da3 Merge branch 'feature/esp32c2_enable_rf_temp_compensation_v5.1' into 'release/v5.1'
Feature/esp32c2 enable rf temp compensation v5.1

See merge request espressif/esp-idf!23730
2023-05-18 20:34:30 +08:00
ed076c2bc8 bugfix: move adc_oneshot_power_acquire/release to adc_oneshot_read
Closes https://github.com/espressif/esp-idf/issues/10595
Closes https://github.com/espressif/esp-idf/issues/11386
2023-05-18 20:08:47 +08:00
7fcba0fbf8 Merge branch 'bugfix/fix_some_ble_bug_v5.1' into 'release/v5.1'
Fixed some BLE bugs (backport v5.1)

See merge request espressif/esp-idf!23699
2023-05-18 20:08:25 +08:00
8b7cd4dc08 Merge branch 'bugfix/hfp_ag_idx_invalid_v5.1' into 'release/v5.1'
bt: Fixed out of bounds access due to variable length array(v5.1)

See merge request espressif/esp-idf!23665
2023-05-18 20:07:21 +08:00
57b31ed545 Merge branch 'feature/add_bluetooth_nimble_lightsleep_example_v5.1' into 'release/v5.1'
bt: Added an example of Bluetooth using light sleep(v5.1)

See merge request espressif/esp-idf!23686
2023-05-18 20:06:16 +08:00
2010d70892 Merge branch 'bugfix/a2dp_source_app_state_error_v5.1' into 'release/v5.1'
bt: Fixed the issue that the a2dp source would not send the media start command due to the connection initiated by the peer device(v5.1)

See merge request espressif/esp-idf!23557
2023-05-18 20:04:45 +08:00
f503b0f621 Merge branch 'fix/sdcard_example_blocker_v5.1' into 'release/v5.1'
CI: fix sdcard examples timeout (v5.1)

See merge request espressif/esp-idf!23477
2023-05-18 20:03:59 +08:00
5b4c95c50f Merge branch 'bugfix/update_esp32c6eco1_sleep_fosc_cal_cycles_backport_v5.1' into 'release/v5.1'
bugfix: update esp32c6 eco1 fosc calibration cycles during sleep(backport v5.1)

See merge request espressif/esp-idf!23490
2023-05-18 19:52:05 +08:00
79fab2eb92 Merge branch 'backport/fix_ieee802154_typo' into 'release/v5.1'
ieee802154: fix a typo in set_channel API(Backport v5.1)

See merge request espressif/esp-idf!23809
2023-05-18 17:07:06 +08:00
f79088f115 Merge branch 'bugfix/add_len_check_per_spi_master_transaction_v5.1' into 'release/v5.1'
spi master: added transaction length check to refuse longer than hardware supported length (v5.1)

See merge request espressif/esp-idf!23747
2023-05-18 16:47:18 +08:00
38a1cfe59c Nimble: Fix compilation issues seen while enabling -O2 optimization 2023-05-18 14:00:33 +05:30
0814386710 Merge branch 'refactor/driver_ut_to_test_app_v5.1' into 'release/v5.1'
CI: Move all UT in driver to test_app(backport v5.1)

See merge request espressif/esp-idf!23708
2023-05-18 16:18:26 +08:00
431f5b81a2 Merge branch 'bugfix/fix_doc_blufi_eror_v5.1' into 'release/v5.1'
fix blufi doc error (backport v5.1)

See merge request espressif/esp-idf!23724
2023-05-18 15:04:17 +08:00
e8dba711ff Merge branch 'bugfix/fix_iphone_disconnects_immediately_after_connecting_when_BLE_wifi_coexist_v5.1' into 'release/v5.1'
Fix the bug that the iPhone disconnects immediately after connecting when BLE and wifi coexist(backport v5.1)

See merge request espressif/esp-idf!23786
2023-05-18 15:04:14 +08:00
bd5b1008de comm_components: eth_start initializes spi bus with SPI_DMA_CH_AUTO
Close https://github.com/espressif/esp-idf/issues/11083
2023-05-18 14:46:09 +08:00
9f7475dd98 Merge branch 'contrib/github_pr_11215_v5.1' into 'release/v5.1'
improve thread safety in esp_timer (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23539
2023-05-18 13:06:46 +08:00
a6cbf68991 compiler: replaced noreturn by __noreturn__ in header files
* noreturn may be replaced by third-party macros,
  rendering it ineffective

* Closes https://github.com/espressif/esp-idf/issues/11339
2023-05-18 12:49:40 +08:00
6ba1c6c44f ieee802154: fix a typo in set_channel API 2023-05-18 10:39:51 +08:00
82c6c8149c Merge branch 'bug/interactive_hints_v5.1' into 'release/v5.1'
tools: fix hints processing in interactive mode (v5.1)

See merge request espressif/esp-idf!23795
2023-05-18 00:09:16 +08:00
b3bde42d8c Merge branch 'bugfix/update_test_dl_esp_cert_v5.1' into 'release/v5.1'
tests: update Root certificate for the test endpoints (v5.1)

See merge request espressif/esp-idf!23797
2023-05-17 21:39:09 +08:00
83ac726851 ble: use modem_clock api to set clock on ESP32-C6 2023-05-17 20:04:07 +08:00
133e19d6ee tests: update Root certificate for the test endpoints
Use Root certificate (`DigiCert Global Root G2`) for the
`dl.espressif.com` and `espressif.com` test endpoints.

This fixes the test failure introduced due to renewal of
the intermediate certificate.
2023-05-17 15:27:24 +05:30
8702e49057 spi: added an API to get max transaction length and use in spi lcd driver 2023-05-17 09:03:26 +00:00
4943844764 spi: added transaction length check to refuse longer than hardware supported length 2023-05-17 09:03:26 +00:00
b525e273ce tools: fix hints processing in interactive mode
Currently hints are processed only once the process is finished and
exits with non-error exit code. In interactive mode, e.g. for monitor,
we want to process ouput lines for hints right away.

This adds a simple buffer, which keeps the last line and once EOL is
reached, it is processed for hints.

Since the original hints processing was file based, a new helper
function was added to allow processing hints in string.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-05-17 10:56:39 +02:00
0ed8499898 Merge branch 'bugfix/a2dp_source_crash_connect_to_Bose_speaker_v5.1' into 'release/v5.1'
Bugfix/a2dp source crash connect to bose speaker (v5.1)

See merge request espressif/esp-idf!23574
2023-05-17 15:10:34 +08:00
0122794a4e Merge branch 'bugfix/deinit_ble_v5.1' into 'release/v5.1'
bugfix: deinit ble for specifies ESP_BT_MODE_BTDM (backport v5.1)

See merge request espressif/esp-idf!23068
2023-05-17 15:09:29 +08:00
c92ddbbf6f Merge branch 'bugfix/reduce_logging_for_SAE' into 'release/v5.1'
Modify log level for SAE (Backport v5.1)

See merge request espressif/esp-idf!23547
2023-05-17 14:02:39 +08:00
5bd2b5bc41 fix blufi doc error 2023-05-17 04:06:11 +00:00
b311a3ffc2 Merge branch 'contrib/github_pr_11388_v5.1' into 'release/v5.1'
Update esp_cpu.h to include esp_attr.h (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23738
2023-05-17 09:24:38 +08:00
8adb48cbfd Merge branch 'fix/console-build-error_v5.1' into 'release/v5.1'
console: Fix building issue when serial JTAG is set (v5.1)

See merge request espressif/esp-idf!23735
2023-05-17 08:39:03 +08:00
e86b8136bd Merge branch 'bugfix/c2_wdt_reset_reason_v5.1' into 'release/v5.1'
wdt: fix IWDT reset reason for esp32c2 (v5.1)

See merge request espressif/esp-idf!23740
2023-05-17 08:38:45 +08:00
9b73003628 Fix the bug that the iPhone disconnects immediately after connecting when BLE and wifi coexist 2023-05-16 17:54:06 +08:00
3bdbad6aa7 Merge branch 'feature/remove_coredump_tests_v5.1' into 'release/v5.1'
coredump: remove tests (moved to esp-coredump repo) (v5.1)

See merge request espressif/esp-idf!23767
2023-05-16 17:40:26 +08:00
df7a27e36d CI: Move all UT in driver to test_app 2023-05-16 16:42:28 +08:00
b62cbebb81 Merge branch 'feature/expose_addr_resolv_out_stack_v5.1' into 'release/v5.1'
Nimble:Added change to expose addr resolution API outside stack (v5.1)

See merge request espressif/esp-idf!23491
2023-05-16 16:34:11 +08:00
zwl
c907f489d6 ble:fixed build error when disable smp 2023-05-16 16:08:54 +08:00
zwl
9b61156746 ble:esp32c2 add rf temperature compensation 2023-05-16 16:08:54 +08:00
b8bd147466 ci: re-enable reset reason tests for all targets except H2. 2023-05-16 05:22:07 +00:00
e0b91b748e esp-system: fixed int WDT reset reason being reported as task WDT on C2 2023-05-16 05:22:07 +00:00
726ed144e4 coredump: remove tests (moved to esp-coredump repo) 2023-05-16 12:43:04 +08:00
accb45f466 Update esp_cpu.h
If esp_attr.h is not included then there are no definitions for the symbol 'FORCE_INLINE_ATTR'.
2023-05-16 04:37:17 +00:00
c5003e6220 console: Fix building issue when serial JTAG is set
Closes https://github.com/espressif/esp-idf/issues/10707
2023-05-16 04:37:09 +00:00
96e1f6e7a2 Merge branch 'openthread/default_dnsserver_address_v5_1' into 'release/v5.1'
openthread: Add menuconfig to set the default dns server address(v5.1)

See merge request espressif/esp-idf!23757
2023-05-16 12:36:20 +08:00
d17ab36645 Merge branch 'feature/c6_ulp_timer_v5.1' into 'release/v5.1'
ulp: lp timer support for lp core (v5.1)

See merge request espressif/esp-idf!23659
2023-05-16 09:19:56 +08:00
a056e655d8 openthread: Add menuconfig to set the default dns server address 2023-05-15 19:30:14 +08:00
aed737b351 Merge branch 'feature/efuse_settings_v5.1' into 'release/v5.1'
hal: Explicit setting of efuse time settings (v5.1)

See merge request espressif/esp-idf!23725
2023-05-15 19:16:30 +08:00
0edb7ee43a Merge branch 'bugfix/ulp_i2c_timeout_config_v5.1' into 'release/v5.1'
ulp-riscv-i2c: Add ULP RISC-V I2C read/write timeout config option (v5.1)

See merge request espressif/esp-idf!23657
2023-05-15 16:03:15 +08:00
689db30956 Merge branch 'contrib/github_pr_11025_v5.1' into 'release/v5.1'
Enable support for C++23 in esp-idf (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23421
2023-05-15 16:02:54 +08:00
59b6634a9a Merge branch 'feature/add_missed_settings_for_bootloader_reserve_rtc_mem_for_c6_h2_v5.1' into 'release/v5.1'
esp_system (C6 & H2): Enables BOOTLOADER_RESERVE_RTC_MEM feature for bootloader (v5.1)

See merge request espressif/esp-idf!23402
2023-05-15 16:02:35 +08:00
24ae831b3d Merge branch 'contrib/github_pr_11394_v5.1' into 'release/v5.1'
docs: Fix typo in Linux/macOS getting started docs (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23732
2023-05-15 10:50:34 +08:00
78d88afbef Merge branch 'bugfix/i2c_timing_wrong_v5.1' into 'release/v5.1'
i2c: fix a bug in sda sample timing (backport v5.1)

See merge request espressif/esp-idf!23379
2023-05-15 10:47:35 +08:00
b8365dced6 Merge branch 'Bugfix/fix_tsen_issue_v5.1' into 'release/v5.1'
Temperature sensor: fix return value issue @low temp on H2(backport v5.1)

See merge request espressif/esp-idf!23719
2023-05-15 10:46:11 +08:00
b7199e88b7 Merge branch 'bugfix/mcpwm_bldc_example_v5.1' into 'release/v5.1'
mcpwm: test generator force level with dead time module (v5.1)

See merge request espressif/esp-idf!23714
2023-05-15 10:00:00 +08:00
2701677eb6 Fix typo in Linux/macOS getting started docs
`hello_word` -> `hello_world`
2023-05-15 09:34:48 +08:00
2165ff386e hal: Explicit setting of efuse time settings
EFUSE_PWR_ON_NUM in C3 has default value = 0x2880, now = 0x3000
2023-05-12 21:42:38 +08:00
zlq
79a2cc224c H2:fix temp sensor issue @low temp 2023-05-12 17:00:58 +08:00
6cfc6f53be Merge branch 'bugfix/enable_i_pdm_example_pytest_on_h2_v5.1' into 'release/v5.1'
i2s_pdm: enable example pytest on h2 (v5.1)

See merge request espressif/esp-idf!23642
2023-05-12 16:47:25 +08:00
e35897db33 Merge branch 'feature/heap-in-flash_v5.1' into 'release/v5.1'
heap: Add a configuration that places all the heap component in flash (v5.1)

See merge request espressif/esp-idf!23377
2023-05-12 15:57:31 +08:00
7e49268933 bugfix: deinit ble for specifies ESP_BT_MODE_BTDM 2023-05-12 14:53:56 +08:00
a7021c3e44 mcpwm: fix bldc example force output level inverted
set_force_level can only set the generator level before the deadtime module.
if the deadtime module enables the inverter, then the real output level is inverted accordingly
2023-05-12 14:40:10 +08:00
190e9e7212 Merge branch 'bugfix/fix_several_bugs_in_i2s_v5.1' into 'release/v5.1'
i2s: fix several bugs in std and tdm mode (v5.1)

See merge request espressif/esp-idf!23669
2023-05-12 11:05:34 +08:00
fc69e53e40 Merge branch 'ci/fix_system_invalid_kconfigs_v5.1' into 'release/v5.1'
ci: fix invalid kconfig options in system test apps (v5.1)

See merge request espressif/esp-idf!23660
2023-05-12 11:04:08 +08:00
6f459d4ea8 Merge branch 'feature/reset_mcpwm_in_restart_v5.1' into 'release/v5.1'
mcpwm: reset peripheral in restart, panic and halt (v5.1)

See merge request espressif/esp-idf!23651
2023-05-12 10:12:58 +08:00
1d89e24199 Merge branch 'bugfix/fix_mspi_octal_psram_timing_tuning_point_fallback_id_v5.1' into 'release/v5.1'
mspi: modified mspi 80mhz octal psram timing tuning point fallback id on s3 (v5.1)

See merge request espressif/esp-idf!23689
2023-05-11 21:24:44 +08:00
2379ee36ab cxx: gnu++23 -> gnu++2b for clang compatibility, added docs and test
* Using -std=gnu++2b now for both gcc and clang as clang
  does not recognize gnu++23 yet
* Added a build test app to check the C++ standard in IDF
* Updated english docs to reflect the change to C++23
2023-05-11 17:48:38 +08:00
58fa57af93 Enable support for C++23 in esp-idf 2023-05-11 17:45:20 +08:00
b1c85cc1d5 Merge branch 'contrib/github_pr_10895_v5.1' into 'release/v5.1'
Fix possible conversion errors by using __builtin_ffsll (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23690
2023-05-11 16:45:44 +08:00
cf5e2c3962 Merge branch 'doc/update_mcpwm_deadtime_v5.1' into 'release/v5.1'
MCPWM: don't allow to apply the same delay module to multiple generators (v5.1)

See merge request espressif/esp-idf!23663
2023-05-11 16:13:23 +08:00
b77479df39 bluedroid: fix ble ext adv rand addr setting for NRPA 2023-05-11 14:36:39 +08:00
ac42a8f2c7 bluedroid: fix ble adv data construct for device name 2023-05-11 14:36:39 +08:00
e6f018a309 bluedroid: fix ble smp key distribution setting 2023-05-11 14:36:39 +08:00
2afb56d189 Update bt lib for ESP32-C3 and ESP32-S3
- Fixed remote mic error during encryption procedure
2023-05-11 14:36:39 +08:00
d751960b27 bluedroid: report disconnect event after BLE link closed 2023-05-11 14:36:39 +08:00
7ddb440384 bt: Deleted some redundant variables in HFP_AG 2023-05-11 06:09:06 +00:00
a891aa7e4d bt: Fixed the problem of out-of-bounds access caused by the variable-length array introduced in 3268075231
Closes https://github.com/espressif/esp-idf/issues/11264
2023-05-11 06:09:06 +00:00
d3d73ed8b2 bt: Fixed codec mode error in ESP_HF_WBS_RESPONSE_EVT 2023-05-11 06:09:06 +00:00
a498871111 Merge branch 'bugfix/fix_wrong_hp_ldo_h2_to_v5.1' into 'release/v5.1'
ESP32H2: Fix too low hp ldo dbias (v5.1)

See merge request espressif/esp-idf!23598
2023-05-11 11:59:26 +08:00
5d6b59109b Merge branch 'ci/newlib_pytest_v5.1' into 'release/v5.1'
ci: move newlib tests to pytest (v5.1)

See merge request espressif/esp-idf!23685
2023-05-11 11:49:48 +08:00
48ab527148 cxx/esp_hw_support: added build test, changed parameter types
Changed rv_utils_intr_edge_ack and esp_cpu_intr_edge_ack to
take uint32_t instead of int to avoid build errors.

The test is to test in particular that __builtin_ffsll, used in
xt_utils.h, which is included via esp_cpu.h, compiles fine
in C++20 with -Wsign-conversion enabled.

Closes https://github.com/espressif/esp-idf/pull/10895
2023-05-11 11:16:45 +08:00
51a9057d9e Fix possible conversion errors by using __builtin_ffsll instead of __builtin_ffs
Signed-off-by: term_est <62337595+term-est@users.noreply.github.com>
2023-05-11 11:16:45 +08:00
6ae2c3c240 mspi: modified mspi 80mhz octal psram timing tuning point fallback id on s3 2023-05-11 11:13:32 +08:00
8b8a6a4450 bt: Added an example of Bluetooth using light sleep 2023-05-11 10:24:00 +08:00
6b0d93efd4 ci: misc fixes for newlib test app
Enabled additional tests for C2, added config for testing with newlib nano
as well as cleaned up old configs
2023-05-11 09:27:09 +08:00
d795abeb03 newlib: move test to pytest 2023-05-11 09:26:39 +08:00
70feed14dd Merge branch 'feature/update-OpenOCD-to-v0.12.0-esp32-20230419_v5.1' into 'release/v5.1'
tools: update OpenOCD version to v0.12.0-esp32-20230419 (v5.1)

See merge request espressif/esp-idf!23677
2023-05-11 01:55:34 +08:00
ae4d1c1f81 Merge branch 'feature/esp32c6_esp32h2_enable_panic_tests_v5.1' into 'release/v5.1'
tests: panic: esp32c6/esp32h2 enable (v5.1)

See merge request espressif/esp-idf!23683
2023-05-11 00:27:22 +08:00
eec03e6a32 Merge branch 'feature/freertos_add_create_task_with_caps_v5.1' into 'release/v5.1'
FreeRTOS: Add xTaskCreateWithCaps() (v5.1)

See merge request espressif/esp-idf!23382
2023-05-10 22:34:17 +08:00
6b31235f3f tests: panic: add esp32c6 esp32h2 2023-05-10 19:19:47 +08:00
2744e6ce07 Merge branch 'feature/refactor_gdbstub_v5.1' into 'release/v5.1'
esp_gdbstub: refactor code (v5.1)

See merge request espressif/esp-idf!23513
2023-05-10 19:11:39 +08:00
b3c5ee767a tools: update OpenOCD version to v0.12.0-esp32-20230419 2023-05-10 13:15:19 +03:00
ad5044c5f6 freertos: Add task creation with caps functions
This commit adds the corresponding CreateWithCaps functions for tasks:

- xTaskCreatePinnedToCoreWithCaps()
- xTaskCreateWithCaps()
- vTaskDeleteWithCaps()

Documentation and migraiton guide have been updated accordingly.

Closes https://github.com/espressif/esp-idf/issues/11216
2023-05-10 17:55:49 +08:00
4a35536244 Merge branch 'feature/freertos_get_static_buffers_v5.1' into 'release/v5.1'
FreeRTOS: Add GetStaticBuffer and CreateWithCaps functions (v5.1)

See merge request espressif/esp-idf!23381
2023-05-10 17:53:26 +08:00
670996f484 Merge branch 'bugfix/make_clean_files_v5.1' into 'release/v5.1'
build-system: replace ADDITIONAL_MAKE_CLEAN_FILES with ADDITIONAL_CLEAN_FILES (v5.1)

See merge request espressif/esp-idf!23661
2023-05-10 13:46:56 +08:00
8bb8c144c7 i2s_doc: fixed the data of stereo left/right state 2023-05-10 12:36:00 +08:00
653ba59b23 i2s_tdm: fixed half sample bit calculation and added check for slot mask 2023-05-10 12:34:14 +08:00
319e0689a5 i2s_std: fixed mclk check for 24-bit data and enable left alignment as default 2023-05-10 12:32:38 +08:00
6b86fc7ad7 Merge branch 'test/enlarge_gptimer_test_threshold_v5.1' into 'release/v5.1'
gptimer: enlarge test threshold (v5.1)

See merge request espressif/esp-idf!23622
2023-05-10 10:39:45 +08:00
f4c5fdbd1a Merge branch 'ci/migrate_peripherals_examples_v5.1' into 'release/v5.1'
ci: migrate peripherals ttfw test scripts (v5.1)

See merge request espressif/esp-idf!23403
2023-05-10 10:25:40 +08:00
7b93cf91aa mcpwm: can't apply the same delay module to multiple generators
This is a hardware limitation, one delay module can only be used by one generator at one time.

Closes https://github.com/espressif/esp-idf/issues/11327
2023-05-10 10:09:48 +08:00
63153794c9 build-system: replace ADDITIONAL_MAKE_CLEAN_FILES with ADDITIONAL_CLEAN_FILES
ADDITIONAL_MAKE_CLEAN_FILES is deprecated and only worked with make.
Replaced with the new ADDITIONAL_CLEAN_FILES (CMake 3.15) which also works with ninja.
2023-05-10 09:53:55 +08:00
19a2e42770 ci: fix invalid kconfig options in system test apps 2023-05-10 09:42:12 +08:00
45fd8feba3 ulp: add support for using lp timer with lp core on C6 2023-05-10 09:39:24 +08:00
f5020d3f1b Merge branch 'bugfix/freertos_nested_sched_suspension_v5.1' into 'release/v5.1'
freertos-idf: Fixed incorrect scheduler suspension check in xTaskRemoveFromEventList() (v5.1)

See merge request espressif/esp-idf!23650
2023-05-10 01:41:34 +08:00
08600cb1a3 ulp-riscv-i2c: Add ULP RISC-V I2C read/write timeout config option
The commit 88e4c06028 introduced a loop timeout for all ULP RISC-V I2C
transactions to avoid getting stuck in a forever loop. The loop timeout
was set to 500 msec by default. This commit improves on the concept by
making the loop timeout configurable via a Kconfig option in terms of
CPU ticks. If the timeout is set to -1 value then the transaction loops
will never timeout, therefore restoring the driver behavior before the
timeout was introduced.

The commit also updates the I2C Fast mode timings for esp32s2 which need
to be adjusted due to bus timing constraints.

Closes https://github.com/espressif/esp-idf/issues/11154
2023-05-09 15:07:50 +02:00
236d601e98 mcpwm: reset peripheral in restart, panic and halt
mcpwm is commonly used in power eletronic area, when restart happens,
make sure the mcpwm generator is not working.

closes https://github.com/espressif/esp-idf/issues/11324
2023-05-09 18:30:46 +08:00
ee18b19b8f freertos-idf: Fixed incorrect scheduler suspension check in xTaskRemoveFromEventList()
This commit fixes a bug in xTaskRemoveFromEvenetList() where in the
check for scheduler suspension did not account for nested suspensions.
Additionally, this commit updates all checks for scheduler
suspension to follow a uniform way.
2023-05-09 12:25:09 +02:00
27f044bd7f i2s_pdm: enable example pytest on h2 (v5.1) 2023-05-09 17:30:40 +08:00
5a353ab1ca Merge branch 'docs/add_cn_trans_i2s_v5.1' into 'release/v5.1'
Docs: add CN translation for i2s.rst (backport v5.1)

See merge request espressif/esp-idf!23625
2023-05-09 15:13:45 +08:00
bac34f23bc Docs: add CN translation for i2s.rst (backport v5.1) 2023-05-09 15:13:44 +08:00
8a08cfe7d1 Merge branch 'bugfix/fix_own_addr_is_rap_random_err_v5.1' into 'release/v5.1'
Fixed no error report when own address type is rpa_random and no random address setting(backport v5.1)

See merge request espressif/esp-idf!23623
2023-05-08 20:20:53 +08:00
242713ceee Merge branch 'bugfix/ana_cmpr_negative_enum_v5.1' into 'release/v5.1'
driver: Fix ana_cmpr negative enum comparison and bad test (v5.1)

See merge request espressif/esp-idf!23630
2023-05-08 19:44:56 +08:00
1d3a08d06f Merge branch 'docs/provide_CN_trans_for_22939_backport_v5.1' into 'release/v5.1'
docs: update links in mdns.rst (backport_v5.1)

See merge request espressif/esp-idf!23633
2023-05-08 19:43:31 +08:00
e6de764ca1 docs: update links in mdns.rst_backport_v5.1 2023-05-08 17:46:58 +08:00
3948949019 driver: Fix ana_cmpr negative enum comparison
The C17 standard (sec 6.7.2.2) indicates that the underlying type of an enum is
implementation defined (i.e., can be signed or unsigned). Thus, comparing
"-1 >= some_enum" where "some_enum" is always 0 or largert can return true if
the compiler uses unsigned for enums.

This commit fixes the following issues with ana_cmpr:

- Fixed incorrect comparison in ana_cmpr_del_unit() that relied on enums being
signed, thus would always return true.
- Fixed incorrect expected argument in the "ana_cmpr_unit_install_uninstall"
test. This was not picked up due to the incorrect enum comparison above.
2023-05-08 17:11:52 +08:00
24cc2d714e Fixed BLE disconnection failure on ESP32 2023-05-08 12:17:09 +08:00
16696d98c1 Fixed battery profile wrong condition 2023-05-08 11:31:22 +08:00
zwj
daf2622a5b Fixed no error report when own address type is rpa_random and no random address setting 2023-05-08 11:31:06 +08:00
864f5532fa gptimer: enlarge test threshold 2023-05-08 10:18:58 +08:00
d4a3427eaf Merge branch 'bugfix/gdma_log_nano_v5.1' into 'release/v5.1'
gdma: fixed crash from logging when using newlib nano (v5.1)

See merge request espressif/esp-idf!23585
2023-05-08 10:13:55 +08:00
94d6614c88 Merge branch 'ci/fix_overwrite_pytest_configs_v5.1' into 'release/v5.1'
ci: fixed test apps overriding pytest configs (v5.1)

See merge request espressif/esp-idf!23495
2023-05-06 17:40:58 +08:00
de5a9ac1f3 Merge branch 'bugfix/check_filter_range_v5.1' into 'release/v5.1'
rmt: check filter and idle threashold (v5.1)

See merge request espressif/esp-idf!23604
2023-05-06 14:00:20 +08:00
46f104b3ae gdma: fixed crash from logging when using newlib nano
Newlib nano printf formatting do not support %z, and will crash if such an identifier
is followed by a %s indentifier.

Closes https://github.com/espressif/esp-idf/issues/9631
2023-05-06 13:47:51 +08:00
dd747bd54d Merge branch 'contrib/github_pr_11326_v5.1' into 'release/v5.1'
correct typo in reference to ESP-IDF repo (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23551
2023-05-06 13:09:33 +08:00
7d96d9e306 Merge branch 'backport/fix_openthread_ci' into 'release/v5.1'
OpenThread CI: add a function for executing commands(backport v5.1)

See merge request espressif/esp-idf!23602
2023-05-06 10:34:06 +08:00
1111fd2630 Merge branch 'contrib/github_pr_11296_v5.1' into 'release/v5.1'
Fix references to IDF_ADD_PATHS_EXTRAS before being assigned (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23599
2023-05-05 21:12:11 +08:00
d12ad17373 rmt: check filter and idle threashold
Closes https://github.com/espressif/esp-idf/issues/11262
2023-05-05 19:07:59 +08:00
4db113a2eb Merge branch 'bugfix/hf_cind_ind_index_v5.1' into 'release/v5.1'
bt: Fixed the inconsistency between the indicator event received by the HF application layer and the actually received indicator(v5.1)

See merge request espressif/esp-idf!23559
2023-05-05 18:47:45 +08:00
bba2581f1a Merge branch 'bugfix/fatfs_open_O_CREAT_fails_v5.1' into 'release/v5.1'
fatfs: fix "open("xx",O_CREAT|O_WRONLY,0666)" call failure (v5.1)

See merge request espressif/esp-idf!23561
2023-05-05 18:13:51 +08:00
938bcc0337 OpenThread CI: add a function for executing commands 2023-05-05 18:05:02 +08:00
845efafc76 Fix references to IDF_ADD_PATHS_EXTRAS before being declared 2023-05-05 11:17:24 +02:00
cje
78b9f5e151 fix too low hp ldo dbias bug for h2 2023-05-05 17:04:18 +08:00
8dbe966d89 fix a2dp source crash when connect to Bose speaker 2023-05-04 19:00:20 +08:00
38570b052b pm: fix invalid trace pins for C6 and H2 2023-05-04 14:42:17 +08:00
4477f3e559 bugfix: fix for fatfs "open("xx",O_CREAT|O_WRONLY,0666)" call failure
fatfs 'open' with only O_CREAT flag fails to creat new file

Closes https://github.com/espressif/esp-idf/issues/1817
2023-05-04 11:45:37 +05:30
25e8069532 bt: Fixed the inconsistency between the indicator event received by the HF application layer and the actually received indicator.
Closes https://github.com/espressif/esp-idf/issues/6486
2023-05-04 14:08:30 +08:00
90e354a723 wpa_supplicant: Reduce logging for SAE 2023-05-04 11:23:55 +05:30
2004bf4e11 Merge branch 'bugfix/rmt_one-wire_v5.1' into 'release/v5.1'
rmt_onewire: refactor example with component registry (v5.1)

See merge request espressif/esp-idf!23509
2023-05-04 13:32:18 +08:00
a0a6e34f4f docs: fix wrong link to esp-adf github issues in migration guide 2023-05-04 12:57:08 +08:00
6b5b7f09f9 i2c: fix a bug in sda sample timing
* Closes https://github.com/espressif/esp-idf/issues/9777

This bug prevented SCL line to work properly after a NACK was received in master mode.
2023-05-04 12:14:43 +08:00
42d5b865dd Fixed the issue that the a2dp source would not send the media start command due to the connection initiated by the peer device
Closes https://github.com/espressif/esp-idf/issues/11170
2023-05-04 12:13:27 +08:00
123da6baa7 bugfix: fix esp32c6eco1 fosc calibration cycles during sleep 2023-05-04 11:47:54 +08:00
2654d29bc5 correct typo in reference to ESP-IDF repo
There's a reference to the ESP-ADF repo that looks like it was intended to be a reference to the ESP-IDF repo. This branch fixes the reference.
2023-05-04 11:43:08 +08:00
b3b85cafb1 Merge branch 'bugfix/fix_ble_hop_sel_v5.1' into 'release/v5.1'
Fixed BLE connection failed to be established when disabled 5.0 feature (backport 5.1)

See merge request espressif/esp-idf!23530
2023-05-04 11:38:06 +08:00
21fd9aaee8 ci: small cleanup for the dependencies.yml 2023-05-04 11:21:40 +08:00
8fd3b342aa ci: add pattern ccs811 2023-05-04 11:21:39 +08:00
1c1c6d59b3 ci: migrate peripherals ttfw test scripts 2023-05-04 11:21:29 +08:00
f2d144166a sdio_example: fix meaningless print in host, make shared reg access more readable in slave 2023-05-04 11:21:10 +08:00
e704f72356 Merge branch 'backport/ble_bugfix_5_1' into 'release/v5.1'
ble: [ESP32C6][ESP32H2][ESP32C2] updata libble

See merge request espressif/esp-idf!23523
2023-05-04 10:52:01 +08:00
4f1fc73fc2 Merge branch 'bugfix/eth_driver_cleanup_v5.1' into 'release/v5.1'
Ethernet driver and documentation clean-up (v5.1)

See merge request espressif/esp-idf!23545
2023-05-04 10:05:25 +08:00
2508350137 Merge branch 'bugfix/eth_l2_test_switch_v5.1' into 'release/v5.1'
LAN8720 & IP101 L2 Test Fix (v5.1)

See merge request espressif/esp-idf!23535
2023-05-04 10:04:46 +08:00
058bb0edd0 docs: update translation for esp_eth 2023-05-03 07:39:24 +00:00
71d19fa9c9 Ethernet driver and documentation clean-up 2023-05-03 07:39:24 +00:00
07d1e19107 improve thread safety in esp_timer
Inadequate locking in the esp_timer component allowed corruption
of the s_timers linked list:

1. timer_armed(timer) returns false
2. another task arms the timer and adds it to s_timers
3. the list is locked
4. the timer is inserted into s_timers again

The last step results in a loop in the s_timers list, which causes
an infinite loop when iterated. This change always locks the
list before checking if the timer is already armed avoiding
the data race.
2023-05-02 20:22:24 +02:00
1042115566 esp_eth pytest: increased robustness of the L2 test
Added filtering frames based on MAC address
2023-05-02 10:25:58 +02:00
b97cf6ca7c Merge branch 'fix/ecdsa_hal_v5.1' into 'release/v5.1'
ecdsa: Support multiple ECDSA keys (v5.1)

See merge request espressif/esp-idf!23444
2023-05-02 11:48:17 +08:00
5775e1d3b7 esp_system (C6 & H2): Enables BOOTLOADER_RESERVE_RTC_MEM feature for bootloader
This option reserves an area in RTC FAST memory for the following features:
- "Skip image validation when exiting deep sleep"
- "Reserve RTC FAST memory for custom purposes"
- "GPIO triggers factory reset"
2023-05-01 06:27:11 +00:00
4a74ae4921 ci: Add patterns and target-tests for ecdsa_efuse runner 2023-04-30 11:48:46 +05:30
5fac5b0191 mbedtls/ecdsa: Add ECDSA signature generation test 2023-04-30 11:47:35 +05:30
abc099ce9f ecdsa: Support multiple ECDSA keys
Add provision to choose which efuse block should be used as ECDSA
private key
2023-04-30 11:47:35 +05:30
174ef6c4a3 ecdsa_hal.c: Add missing configuration for signature generation 2023-04-30 11:47:35 +05:30
89c06b3c51 Update bt lib for ESP32-C3 and ESP32-S3
- Fixed ble hopping selection for connection when disabled 5.0 feature
2023-04-28 19:30:45 +08:00
62a5ad5fc1 sdmmc: add vTaskDelay to loops to prevent potential WDT trigger
Also change timeout to 120 seconds in fatfs sdcard pytest to prevent failing during formatting.
2023-04-28 12:39:08 +02:00
c7ca30e62f [SDMMC] add reasonable timeouts to all while loops
Closes: https://github.com/espressif/esp-idf/pull/10532
2023-04-28 12:39:06 +02:00
6ff1059da7 [SDMMC Mount] fix infinite loop when SD card is not responsive
Closes: https://github.com/espressif/esp-idf/pull/10532
2023-04-28 12:37:27 +02:00
d6a1ccb27f ble: [ESP32C6][ESP32H2][ESP32C2] updata libble
Fixed the occasional mic error caused by wrong tx cnt
Fixed the BLE connection timeout issue
2023-04-28 17:27:36 +08:00
zwl
e575e0b44a Ble: bugfix for packet loss issue during connection on ESP32C6 2023-04-28 17:27:08 +08:00
cbd210b431 Merge branch 'refactor/rename_to_esp_clk_tree_prefix_v5.1' into 'release/v5.1'
esp_clk_tree: Rename clk_tree_xxx to esp_clk_tree_xxx (v5.1)

See merge request espressif/esp-idf!23449
2023-04-28 17:11:46 +08:00
14dac35540 rmt_onewire: refactor example with component manager
Closes https://github.com/espressif/esp-idf/issues/10790
2023-04-28 13:38:33 +08:00
71a19d238c esp_gdbstub: refactor code 2023-04-28 12:38:26 +08:00
961018d882 Merge branch 'bugfix/pmkid_sha256_bug_v5.1' into 'release/v5.1'
wpa_supplicant: Fix PMKID SHA-256 related regression (Backport v5.1)

See merge request espressif/esp-idf!23494
2023-04-28 07:52:52 +08:00
c710a69952 Merge branch 'bugfix/fix_softap_pairwise_cipher_issue_v5.1' into 'release/v5.1'
esp_wifi: update pairwise cipher in softAP(Backport v5.1)

See merge request espressif/esp-idf!23503
2023-04-28 04:45:59 +08:00
eeea0a7ea8 Merge branch 'feature/esp_tls_add_getter_setter_v5.1' into 'release/v5.1'
esp-tls: Added getter/setter function for the conn_state. (v5.1)

See merge request espressif/esp-idf!23408
2023-04-28 04:36:25 +08:00
5fdb9b00c5 CI: fix sdcard examples timeout 2023-04-27 17:47:12 +02:00
310e5e71ed Merge branch 'bugfix/spp_notify_v5.1' into 'release/v5.1'
NimBLE: Removed indicate flag from gatt db and added subscription case in spp_server example (v5.1)

See merge request espressif/esp-idf!23458
2023-04-27 23:36:24 +08:00
9a58988bae Merge branch 'test/removed_emmc_esp32_ut_v5.1' into 'release/v5.1'
emmc: removed esp32 emmc ut_017 (v5.1)

See merge request espressif/esp-idf!23485
2023-04-27 23:34:24 +08:00
d89db7e4a7 Merge branch 'feature/spi_hal_move_out_iram_v5.1' into 'release/v5.1'
spi: change linker file to move spi hal out from iram (v5.1)

See merge request espressif/esp-idf!23448
2023-04-27 23:31:16 +08:00
c0c9227883 Merge branch 'fix/sdio_sd_cards_not_detected_correctly_v5.1' into 'release/v5.1'
sdmmc: sdio combination cards correct setup (v5.1)

See merge request espressif/esp-idf!23478
2023-04-27 23:28:28 +08:00
c49dce48eb Merge branch 'fix/esp32s3_ununsed_dcache_as_dram_v5.1' into 'release/v5.1'
esp_hw_support: Update the memory ptr location/property checks to include the unused DCACHE added to DRAM (v5.1)

See merge request espressif/esp-idf!23303
2023-04-27 22:09:55 +08:00
1a03cb02c2 Merge branch 'feature/support_fosc_calibration_c6_eco1_to_v5.1' into 'release/v5.1'
ESP32C6: Fix fosc calibration fail bug for ECO1 & Above (v5.1)

See merge request espressif/esp-idf!23467
2023-04-27 20:38:31 +08:00
193f581cec esp_wifi: update pairwise cipher in softAP 2023-04-27 20:07:48 +08:00
f03e3c164e esp_supplicant: When the softAP authentication mode is set to WPA2_PSK, WPA2_WPA3_PSK, or WPA3_PSK, the pairwise cipher will be overwritten with WIFI_CIPHER_TYPE_CCMP 2023-04-27 20:07:39 +08:00
8d383980a1 esp_supplicant: wpa pmf should be disabled 2023-04-27 20:07:30 +08:00
202b18b5fa esp_clk_tree: Rename clk_tree_xxx to esp_clk_tree_xxx, add compilation warning to clk_tree.h 2023-04-27 11:11:18 +00:00
3048251be0 Merge branch 'ci/pytest_case_tester_script_fix_v5.1' into 'release/v5.1'
ci: pytest automation script increase timeout time (v5.1)

See merge request espressif/esp-idf!23447
2023-04-27 17:35:51 +08:00
c35f7cad45 Merge branch 'feature/c6_ulp_sleep_v5.1' into 'release/v5.1'
ulp: added sleep support for lp core (v5.1)

See merge request espressif/esp-idf!23484
2023-04-27 17:07:24 +08:00
1b4e46428d Merge branch 'bugfix/reject_tkip_in_owe_v5.1' into 'release/v5.1'
Reject TKIP cipher incase of OWE connection (Backport v5.1)

See merge request espressif/esp-idf!23462
2023-04-27 16:51:15 +08:00
5bba395bc8 Merge branch 'bugfix/wifi_prov_deinit_github_v5.1' into 'release/v5.1'
wifi_prov_mgr: Fixed memory leak after bluetooth stack was stopping. (v5.1)

See merge request espressif/esp-idf!23436
2023-04-27 16:33:53 +08:00
8719a45d97 Merge branch 'ci/fix_no_test_script_corner_case_v5.1' into 'release/v5.1'
ci: fix build script when no test script found (v5.1)

See merge request espressif/esp-idf!23404
2023-04-27 16:10:10 +08:00
0e484e1daa Merge branch 'feature/bt_uses_creationg_with_caps_functions_v5.1' into 'release/v5.1'
BT: Remove "create static" calls from OSI (v5.1)

See merge request espressif/esp-idf!23337
2023-04-27 16:06:10 +08:00
0be6802198 Merge branch 'backport/ieee802154_open_src' into 'release/v5.1'
ieee802154: drive code open source (backport v5.1)

See merge request espressif/esp-idf!23461
2023-04-27 16:02:09 +08:00
9f80af3770 Merge branch 'bugfix/ble_mesh_fix_heartbeat_set_v5.1' into 'release/v5.1'
ble_mesh: stack: Update the heartbeat filter entry add/remove handling (v5.1)

See merge request espressif/esp-idf!23460
2023-04-27 14:38:27 +08:00
411c392d97 Merge branch 'feature/support_fosc_calibration_h2_eco2_to_v5.1' into 'release/v5.1'
ESP32H2: Fix fosc calibration fail bug for ECO2 & Above (v5.1)

See merge request espressif/esp-idf!23469
2023-04-27 14:38:01 +08:00
3724bf6256 ci: fixed test apps overriding pytest configs 2023-04-27 14:29:06 +08:00
a64cbdea10 wpa_supplicant: Fix PMKID SHA-256 related regression
Fixed regression caused by commit 38e9c8b4
2023-04-27 11:35:20 +05:30
728c1ffe59 Merge branch 'backport/openthread_ci_fix' into 'release/v5.1'
Openthread: add delay to ensure that the dut can receive input command(BackportV5.1)

See merge request espressif/esp-idf!23486
2023-04-27 13:56:46 +08:00
2bc721739c Merge branch 'bugfix/i2s_tdm_multi_dev_on_h2_v5.1' into 'release/v5.1'
i2s: fixed tdm multi dev test on h2 (v5.1)

See merge request espressif/esp-idf!23475
2023-04-27 13:20:03 +08:00
34e0ed613a Nimble:Added change to expose addr resolution API outside stack 2023-04-27 10:33:47 +05:30
7492e0a2c7 Merge branch 'support/backport_154_related_feature' into 'release/v5.1'
openthread: backport Thread related fixes (backport v5.1)

See merge request espressif/esp-idf!23427
2023-04-27 11:57:47 +08:00
ea65b1fefb esp_phy: remove esp32h4 phylib 2023-04-27 11:28:12 +08:00
a33c60a36f ieee802154: remove libieee802154.a for target esp32h4 2023-04-27 11:28:12 +08:00
3178718a3d ieee802154: support driver opensrc 2023-04-27 11:27:57 +08:00
deedc51cf1 Merge branch 'ci/chip_support_network_invalid_kconfig_v5.1' into 'release/v5.1'
ci: remove redundent ci configs for chip support and network components (v5.1)

See merge request espressif/esp-idf!23471
2023-04-27 11:10:54 +08:00
f7e3f76899 openthread CI: add delay to ensure that the dut can receive input command 2023-04-27 10:54:19 +08:00
46511c8fd1 Merge branch 'bugfix/fix_wrong_frame_ptr_after_wake_restore_backportv5.1' into 'release/v5.1'
bugfix: fix wrong RvCoreCriticalSleepFrame ptr value after wake restore (backport v5.1)

See merge request espressif/esp-idf!23473
2023-04-27 10:45:04 +08:00
96b3f52c4e emmc: temporarily removed esp32 emmc ut_017 2023-04-27 10:30:38 +08:00
2117b7a1dc Merge branch 'contrib/github_pr_11113_v5.1' into 'release/v5.1'
Fix usb enumeration stage error for some device (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23332
2023-04-27 10:12:12 +08:00
3ae079ac12 Merge branch 'bugfix/fix_duplicate_scan_cycle_refresh_not_accurate_v5.1' into 'release/v5.1'
Fixed duplicate scan refresh cycle is not accurate after restarting scan on ESP32(backport v5.1)

See merge request espressif/esp-idf!23405
2023-04-27 10:02:17 +08:00
0bac174058 ulp: added sleep support for lp core
Added support for running LP core while hp core sleeps, as well
as waking up the hp core.
2023-04-27 09:51:41 +08:00
856cfa4ae2 Merge branch 'refactor/remove_esp32h4_target_v5.1' into 'release/v5.1'
esp32h4: remove esp32h4 target (v5.1)

See merge request espressif/esp-idf!23422
2023-04-27 09:37:51 +08:00
0d13dbbb1f OpenThread border router: support border router to connect with SSED 2023-04-27 09:16:10 +08:00
51c058d80f ieee802154: increase the timeout for ieee802.15.4 CI test 2023-04-27 09:16:10 +08:00
aea120b98b openthread: fix the spi conflict between ot-spinel and ethernet 2023-04-27 09:16:10 +08:00
7909394274 openthread: fix platform udp send rules for OT netif 2023-04-27 09:16:10 +08:00
6bfa2b7078 openthread port: set ipv6 address zone with netif index when udp joining or leaving group 2023-04-27 09:16:10 +08:00
86a673946c openthread: Add check for lock acquire and release 2023-04-27 09:16:10 +08:00
aedcec9be5 Merge branch 'feature/emmc_example_v5.1' into 'release/v5.1'
SDMMC Host: added an example to communicate with an eMMC chip and also a bugfix for Host timing (v5.1)

See merge request espressif/esp-idf!23283
2023-04-26 22:41:15 +08:00
934f0477a4 Merge branch 'bugfix/allow_no_specify_uart_clk_src_v5.1' into 'release/v5.1'
uart: Allow omitting source_clk parameter to uart_param_config (v5.1)

See merge request espressif/esp-idf!23451
2023-04-26 20:32:35 +08:00
81988b0007 Merge branch 'docs/add_Chinese_translation_for_api-reference/error-codes_backport_v5.1' into 'release/v5.1'
docs: provide translation for docs/zh_CN/api-reference/error-codes.rst (backport v5.1)

See merge request espressif/esp-idf!23397
2023-04-26 19:47:13 +08:00
de45fb1c33 docs: provide translation for docs/zh_CN/api-reference/error-codes.rst (backport v5.1) 2023-04-26 19:47:13 +08:00
29be39086f Merge branch 'docs/update_out_of_sync_api-reference_docs_backport_v5.1' into 'release/v5.1'
docs: update out-of-sync api reference docs (backport v5.1)

See merge request espressif/esp-idf!23399
2023-04-26 19:45:23 +08:00
934c2c3a58 sdmmc: sdio combination cards correct setup
Co-authored-by: Mau Abata <mauabata@gmail.com>
Closes https://github.com/espressif/esp-idf/issues/9822
Closes https://github.com/espressif/esp-idf/issues/10280
2023-04-26 13:27:59 +02:00
0aad1efe15 i2s: fixed tdm multi dev test on h2 2023-04-26 18:55:36 +08:00
87328d594f esp32h4: checked all the corner stuffs of the removal 2023-04-26 18:53:12 +08:00
954a6a2cff esp32h4: removed esp32h4 related codes 2023-04-26 18:53:12 +08:00
cae47ce37e esp32h4: removed esp32h4 related files 2023-04-26 18:53:12 +08:00
8f24b34f21 esp32h4: remove esp32h4 target from ci 2023-04-26 18:53:12 +08:00
804a9ea1f6 esp32h4: remove esp32h4 target from peripherals 2023-04-26 18:53:10 +08:00
46deef434f esp_pm: check sleep retention frame integrity in ci UT 2023-04-26 17:36:46 +08:00
5ccf93d788 bugfix: fix wrong RvCoreCriticalSleepFrame ptr value after wake restore 2023-04-26 17:36:42 +08:00
4c3c6b7f99 ci: remove redundent ci configs for chip support and network components
CI would build psram config test apps even for target with no psram.
2023-04-26 17:29:51 +08:00
70fc0bde01 support h2 eco2 fosc calibration for v5.1 2023-04-26 17:08:09 +08:00
1564884cc1 support c6 eco1 fosc calibration for v5.1 2023-04-26 16:32:28 +08:00
86226770b8 esp_wifi: Reject TKIP cipher incase of OWE connection 2023-04-26 12:10:33 +05:30
e121775d6c ble_mesh: stack: Update the heartbeat filter entry add/remove handling 2023-04-26 14:17:11 +08:00
ef3da6b372 NimBLE: Removed indicate flag from gatt db, added subscription case and corrected indentation
in spp_server example.
2023-04-26 11:39:09 +05:30
1b6461b9f8 Merge branch 'bugfix/bod_glitch_reset_c6_v5.1' into 'release/v5.1'
bootloader: fix BOD and glitch reset on C6 and H2 (v5.1)

See merge request espressif/esp-idf!23380
2023-04-26 13:09:32 +08:00
16f3317496 soc/esp32s3: Fix the SOC_MEM_INTERNAL_HIGH value
- As per the memory block diagram for ESP32-S3, the
  internal memory address ranges as follows:
  DRAM: 0x3FC88000 (== SOC_MEM_INTERNAL_LOW) <-> 0x3FCF0000
  IRAM: 0x40378000 <-> 0x403E0000 (== SOC_MEM_INTERNAL_HIGH)
2023-04-26 04:01:38 +00:00
3118120659 esp_hw_support: Update memory ptr location/property checks
- to acknowledge the unused DCACHE added to DRAM for ESP32-S3

- For ESP32-S3, when the DCACHE size is set to 16 kB, the unused 48 kB is added to
  the heap in 2 blocks of 32 kB (from 0x3FCF0000) and 16 kB (from 0x3C000000).
- But, if we try allocating memory from the 16 kB block and run an `esp_ptr_internal`
  check on that memory pointer, it fails as the address block from 0x3C000000
  corresponds to the external memory symbols SOC_DROM_LOW and SOC_EXTRAM_DATA_LOW.
  (E.g. freertos - If the IDLE task stack buffer gets allocated from this region,
  the firmware will abort due to this failure).
- Thus, the checks `esp_ptr_internal`, `esp_ptr_in_drom` and `esp_ptr_byte_accessible`
  have been updated to acknowledge this memory as a part of the DRAM.

Co-authored-by: Mahavir Jain <mahavir@espressif.com>
2023-04-26 04:01:38 +00:00
e1b89eeae0 Merge branch 'feature/s2_ulp_riscv_adc_v5.1' into 'release/v5.1'
ulp-riscv: enable ULP-RISCV ADC example for esp32s2 (v5.1)

See merge request espressif/esp-idf!23371
2023-04-26 11:59:20 +08:00
cfcb57333b Merge branch 'bugfix/fix_chip_broken_bug_in_monitor_mode_S2_v5.1' into 'release/v5.1'
ESP32S2/C3/C2: fixed S2 dangerous power parameters in sleep modes and support S2/C3/C2 different sleep mode (v5.1)

See merge request espressif/esp-idf!23378
2023-04-26 11:41:09 +08:00
24bfb8a8e5 uart: Allow the users to not specify the source_clk in uart_config_t when calling uart_param_config 2023-04-26 11:24:16 +08:00
f61e219667 spi: change linker file let spi hal able to out from iram 2023-04-26 11:15:30 +08:00
40b0dbae10 spi_flash: fix config SPI_FLASH_SHARE_SPI1_BUS dependency 2023-04-26 11:15:30 +08:00
ee4e5c014a sdio: test_sdio add unity sync signals 2023-04-26 11:11:59 +08:00
4dcd055612 ci: pytest automation script increase timeout time 2023-04-26 11:11:59 +08:00
6b28967b64 Merge branch 'bugfix/fix_adc_continuouus_example_pytest_potential_failure_v5.1' into 'release/v5.1'
adc: fix adc_continuous example pytest potential failure (v5.1)

See merge request espressif/esp-idf!23425
2023-04-25 19:59:43 +08:00
f6e0867eb8 wifi_prov_mgr: Fixed memory leak after bluetooth stack was stopping. 2023-04-25 15:48:09 +05:30
30cc0769ac Merge branch 'refactor/remove_esp_mm_kconfig_as_no_kconfig_option_now_v5.1' into 'release/v5.1'
esp_mm: removed empty kconfig files (v5.1)

See merge request espressif/esp-idf!23284
2023-04-25 17:52:35 +08:00
f793584c68 Merge branch 'docs/update_cn_trans_api_guides' into 'release/v5.1'
Docs: Update cn trans api guides (backport v5.1)

See merge request espressif/esp-idf!23384
2023-04-25 17:16:43 +08:00
3a34660d54 Docs: Update cn trans api guides (backport v5.1) 2023-04-25 17:16:43 +08:00
d54af90022 Merge branch 'ci/disable_test_dram_reg2_execute_violation_v5.1' into 'release/v5.1'
ci: disable test_dram_reg2_execute_violation on esp32s2 (v5.1)

See merge request espressif/esp-idf!23420
2023-04-25 14:28:16 +08:00
a0df46d342 Merge branch 'bugfix/wifi_backport_v5.1' into 'release/v5.1'
esp_wifi: backport some wifi fixes to v5.1

See merge request espressif/esp-idf!23389
2023-04-25 13:52:44 +08:00
959f92e744 Merge branch 'docs/esp_protocols_docs_migration_v5.1' into 'release/v5.1'
docs: migrated documentation from github.io to docs.espressif.com (v5.1)

See merge request espressif/esp-idf!23319
2023-04-25 13:49:13 +08:00
e23ce8209d fix adc_continuous example pytest potential failure 2023-04-25 12:26:34 +08:00
92965cd124 Merge branch 'feature/sram1_iram_v5.1' into 'release/v5.1'
system: add kconfig option for using parts of SRAM1 for IRAM (v5.1)

See merge request espressif/esp-idf!23370
2023-04-25 11:35:08 +08:00
8c11edb852 Merge branch 'feature/update_mbedtls_v5.1' into 'release/v5.1'
mbedtls: Update to release/v3.4.0 (v5.1)

See merge request espressif/esp-idf!23398
2023-04-25 11:04:44 +08:00
f67a860cf0 ci: disable test_dram_reg2_execute_violation on esp32s2 2023-04-25 10:02:00 +08:00
9d114e30b5 Merge branch 'feature/esp_sys_iram_cleanup_v5.1' into 'release/v5.1'
esp-system: move uncessary IRAM functions to flash (v5.1)

See merge request espressif/esp-idf!23376
2023-04-25 09:51:25 +08:00
e104fa1904 Merge branch 'bugfix/esp32_pico_v3_2_chip_info_v5.1' into 'release/v5.1'
system: fix esp32 chip info not listing esp32 pico v3-02 as having embedded spiram (v5.1)

See merge request espressif/esp-idf!23393
2023-04-25 09:46:25 +08:00
d7b344c97a heap: Add a configuration that places all the heap component and related functionalities in flash when enabled
Add test configuration to run all tests with heap component in the flash.
Add reference to this new configuration in performance section of the documentation.
2023-04-25 01:12:10 +00:00
5bea8592d9 Merge branch 'ci/run_readme_checks_not_in_parallel' into 'release/v5.1'
ci: run readme check when constants.py or check script updated (v5.1)

See merge request espressif/esp-idf!23386
2023-04-25 09:00:59 +08:00
0f8bf38913 ci: run readme check when constants.py or check script updated 2023-04-25 08:51:22 +08:00
e24e674e2f esp-tls: Added getter/setter function for the conn_state.
* Added the setter function to set the connection sockfd value
Closes https://github.com/espressif/esp-idf/issues/10871
2023-04-24 14:49:26 +05:30
zwj
52ca53746f Fixed disconnection due to consecutive CRC errors in first 6 intervals 2023-04-24 15:49:36 +08:00
zwj
a26449844f Fixed duplicate scan refresh cycle is not accurate after restarting scan on ESP32 2023-04-24 15:49:12 +08:00
d020a58be1 Merge branch 'ci/soc_caps_docs_build_v5.1' into 'release/v5.1'
ci: build all docs if soc_caps.h changed (v5.1)

See merge request espressif/esp-idf!23374
2023-04-24 15:48:15 +08:00
4f40bfd864 ci: fix build script when no test script found 2023-04-24 15:47:58 +08:00
75002dce56 Merge branch 'contrib/github_pr_11163_v5.1' into 'release/v5.1'
Make custom bootloader message match actual output (GitHub PR) (v5.1)

See merge request espressif/esp-idf!23375
2023-04-24 15:46:58 +08:00
b8718506cd mbedtls: fix ci failures for update v3.4.0
- While updating to mbedtls release/v3.4.0, building mbedtls/library/psa_crypto.c,
clang produced an unreachable-code warning, so added `-Wno-unreachable-code` compile option for clang.
- In `mbedtls/v3.4.0`, the ECDSA restartable sign and verify functions (`ecdsa.c`) were made public.
- But the `mbedtls_ecdsa_sign_det_restartable` function prototype was declared in the file `ecdsa.h`,
only when `MBEDTLS_ECDSA_SIGN_ALT` was not defined.
- added a patch in mbedtls library to fix it.
2023-04-24 11:56:56 +05:30
0116dcb578 mbedtls: replace low-level sha apis with md apis in esp_ssl_tls 2023-04-24 11:56:56 +05:30
3152dea192 mbedtls: Update config options as per release/v3.4.0
- Added a Kconfig option for the newly added mbedtls option MBEDTLS_PKCS7_C
2023-04-24 11:56:56 +05:30
31e42e77de mbedtls: Update to release/v3.4.0
- Release Notes: https://github.com/Mbed-TLS/mbedtls/releases/tag/v3.4.0
2023-04-24 11:56:56 +05:30
f0b2bd5c81 docs: update out-of-sync api reference docs 2023-04-24 14:23:35 +08:00
83a682ca1a Merge branch 'monitor_win_color-v5.1' into 'release/v5.1'
bug(idf_monitor): fix color on windows with hints (v5.1)

See merge request espressif/esp-idf!23346
2023-04-24 14:00:05 +08:00
9ddd08c502 system: fix esp32 chip info not listing esp32 pico v3-02 as having embedded spiram
Closes https://github.com/espressif/esp-idf/issues/11233
2023-04-24 13:53:26 +08:00
4e73cb77e5 Merge branch 'esptool_extra-v5.1' into 'release/v5.1'
feat(esptool): allow to set force for write_flash (v5.1)

See merge request espressif/esp-idf!23338
2023-04-24 13:44:41 +08:00
f9ebbdf6ea esp_wifi:Enable wpsreg to initialize in APSTA mode 2023-04-24 12:32:47 +08:00
39caffc592 esp_wifi: espnow support using 11ax rate to send frame 2023-04-24 12:32:27 +08:00
ce5444d349 esp_wifi: Bugfix store authmode security in NVS 2023-04-24 12:32:08 +08:00
79dabf50b0 esp_wifi: Install keys after successful transmission of EAPOL 4/4 Message 2023-04-24 12:31:21 +08:00
a4dbb3a0a1 esp_wifi: Update wifi libs
Fix some NAN issues related to followup and matching filters
2023-04-24 12:30:54 +08:00
8438887cb4 esp_wifi: update phy_init_data.h for c6 mcs 8 9 power issue 2023-04-24 12:30:30 +08:00
7a410499f3 esp_wifi: Validate softap interface when sending beacon frame 2023-04-24 12:30:04 +08:00
c020a68e1e Update the ESP-NOW frame length in docs 2023-04-24 12:29:32 +08:00
55d44e0bee wifi_mesh: fix the heap corrupt issue in MTXON task 2023-04-24 12:29:19 +08:00
5736694dbc Merge branch 'bugfix/adds_iram_attr_for_some_esp_timer_apis_v5.1' into 'release/v5.1'
esp_timer: Adds IRAM_ATTR for esp_timer_restart and esp_timer_is_active (v5.1)

See merge request espressif/esp-idf!23309
2023-04-24 11:48:02 +08:00
6102cfdd27 sdmmc: in/out phase adapted to esp32 and esp32s3 2023-04-24 03:45:29 +00:00
5b18007d92 sdmmc: I/O phase adjustments
1. Fix incorrect meaning of SDMMC.clock bits, synchronize the names
   with the TRM.
2. Choose input and output phases to satisfy typical timing
   requirements.
3. Move use_hold_reg setting into the host driver, since it is related
   to timing.

Closes https://github.com/espressif/esp-idf/issues/8521
Related to https://github.com/espressif/esp-idf/issues/8257
2023-04-24 03:45:29 +00:00
bead0d741b sdmmc: add an example communicating with eMMC chip on S3 2023-04-24 03:45:29 +00:00
a218144f4c esp_mm: removed empty kconfig files
- MMU configuration related kconfig options will be in soc, or
esp_hw_support
- Cache configuration related kconfig options will be in soc, or
esp_hw_support
- mmap driver and msync driver kconfig options will be still in esp_mm.
As there's no kconfig options for them yet, removed kconfig files
2023-04-24 03:45:00 +00:00
46fe70fb46 freertos: Add unit tests for ...WithCaps() functions 2023-04-24 11:44:46 +08:00
c5fe3ec05d freertos: Add wrapper functions to create objects with capabilities
This commit adds various ...WithCaps() functions to create FreeRTOS objects
with specific memory capabilities.
2023-04-24 11:44:46 +08:00
3562cb8051 freertos: Add GetStaticBuffer functions
This commit adds the various ...GetStaticBuffer() functions from upstream
FreeRTOS. See https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/641 for more
details.
2023-04-24 11:44:46 +08:00
7b41d6004a freertos: Fix idf_additions.h include order error
When building for CONFIG_FREERTOS_SMP, "idf_additions.h" was previously
implicitly included by "task.h" so that other ESP-IDF components still have
access to IDF API additions without needing to include "idf_additions.h"
directly.

However, some FreeRTOS headers (e.g., queue.h) will include task.h before
declaring any types (e.g., QueueHandle_t). Thus if any of those types are used
in idf_additions.h, we get a missing type error.

This commit moves the implicity include of idf_additions.h to FreeRTOS.h
2023-04-24 11:44:46 +08:00
5c88e0d801 bootloader: enable super WDT and BOD reset on C2 2023-04-24 11:32:23 +08:00
c6559a9b64 bootloader: cleanup ana reset config code 2023-04-24 11:32:23 +08:00
ca3d871a21 bootloader: fixed super watchdog not enabled issue on C3, S3, H4 2023-04-24 11:32:23 +08:00
113e4dc520 bootloader: removed unavailable rtc features 2023-04-24 11:32:23 +08:00
80315b77a0 bootloader: fix analog reset on C6 and H2 2023-04-24 11:32:23 +08:00
aeabe8d742 Merge branch 'feature/hfp_ag_hints_v5.1' into 'release/v5.1'
tools: Update idf-py hints with Bluedroid HFP AG info[backport 5.1]

See merge request espressif/esp-idf!23289
2023-04-24 10:42:24 +08:00
1644050652 Merge branch 'bugfix/fix_some_ble_bug_v5.1' into 'release/v5.1'
Fixed some BLE bugs (backport v5.1)

See merge request espressif/esp-idf!23324
2023-04-24 10:41:59 +08:00
a12e124410 Merge branch 'bugfix/bt_diable_enbale_crash_v5.1' into 'release/v5.1'
bt:Fixed esp32 controller bug (v5.1)

See merge request espressif/esp-idf!23365
2023-04-24 10:39:58 +08:00
36d6a927d1 Merge branch 'bugfix/fix_some_esp32c3_s3_ble_bugs_230422' into 'release/v5.1'
Fixed some ESP32C3/S3 BLE bugs 23-04-22(backport v5.1)

See merge request espressif/esp-idf!23353
2023-04-24 10:38:34 +08:00
cje
93eeb4265c fix chip broken bug when run in monitor mode of S2 and modify voltage param to fit all sleep mode of S2/C2/C3 2023-04-24 10:37:57 +08:00
f608431421 Merge branch 'bugfix/spi_lcd_max_trans_size_v5.1' into 'release/v5.1'
spi_lcd: maximum transfer size should respect bus configuration (v5.1)

See merge request espressif/esp-idf!23229
2023-04-24 10:31:51 +08:00
21c536c563 Merge branch 'bugfix/lcd_align_before_cache_write_back_v5.1' into 'release/v5.1'
manually align the color buffer before cache write back (v5.1)

See merge request espressif/esp-idf!23243
2023-04-24 10:28:16 +08:00
de33225c31 riscv: moved some interrupt functions from IRAM to flash
These functions dont need to be in IRAM.
2023-04-24 10:27:31 +08:00
b07a534984 esp-system: move uncessary IRAM functions to flash 2023-04-24 10:27:31 +08:00
b0a1c0d045 Make custom bootloader message match actual output
Fixes the custom bootloader README.md so that the example output matches
what will actually be output by default in the custom bootloader.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2023-04-24 10:25:22 +08:00
73f895217b ci: build all docs if soc_caps.h changed
soc_caps.h is thightly coupled with the docs build. Should build all docs
after changing it to make sure nothing broke.
2023-04-24 10:18:11 +08:00
0fb6316888 Merge branch 'bugfix/rmt_encode_state_init_v5.1' into 'release/v5.1'
rmt: define RMT_ENCODING_RESET in rmt_encode_state_t (v5.1)

See merge request espressif/esp-idf!23239
2023-04-24 10:18:08 +08:00
be8727cf88 Merge branch 'bugfix/i2s_fix_intr_flag_for_pdm_rx_v5.1' into 'release/v5.1'
i2s: fix interrupt flag of pdm rx mode (v5.1)

See merge request espressif/esp-idf!23125
2023-04-24 10:13:41 +08:00
8b0860ef95 ulp-riscv: enable ULP-RISCV ADC example for esp32s2
ADC can now be used from the ULP-RISCV on S2 after the RTC power parameters were
fixed in a624d8d061

Closes https://github.com/espressif/esp-idf/issues/11052
Closes https://github.com/espressif/esp-idf/issues/11040
2023-04-24 10:12:00 +08:00
6bb4dc35ab docs: update CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM docs to better reflect the limitations 2023-04-24 09:55:00 +08:00
34fea0d38f system: add kconfig option for using parts of SRAM1 for IRAM
Using parts of SRAM1 for IRAM allows apps with more statically allocated IRAM

Closes https://github.com/espressif/esp-idf/issues/9824
2023-04-24 09:54:47 +08:00
a6b1ebce31 Merge branch 'maint/release_v5.1_codeowners' into 'release/v5.1'
gitlab: simplify approvals for backports (v5.1)

See merge request espressif/esp-idf!23285
2023-04-24 05:19:37 +08:00
b5357e8b01 bt:Fixed esp32 controller bug
1. Fixed crash after controller disable and re-enable
2. Fixed the crash caused by processing the HCI_Read_Remote_Extented_Features command in the non-connected state

Closes https://github.com/espressif/esp-idf/issues/11164
Closes https://github.com/espressif/esp-idf/issues/10835
2023-04-23 20:26:56 +08:00
59666637bc Disable controller 5.0 feature bits if host 5.0 feature is not enabled 2023-04-22 20:49:30 +08:00
zwj
48c5f74cbc improve scan performance when scan and sync coexist on ESP32-C3 and ESP32-S3 2023-04-22 20:49:10 +08:00
8e41186ac8 Update bt lib for ESP32-C3 and ESP32-S3
- Fixed non-connectable and non-scannable directed adv can't be scanned
2023-04-22 20:48:38 +08:00
49718b20a5 bug(idf_monitor): fix color on windows with hints
Closes https://github.com/espressif/esp-idf/issues/9610
2023-04-21 14:42:26 +02:00
f1a2bc777e usb_host: Use up-to-date syntax in pytest 2023-04-21 15:45:42 +08:00
0ed6610212 feat(esptool): allow to set force for write_flash 2023-04-21 09:36:18 +02:00
51405fd9d4 bt: Remove FreeRTOS static allocation from OSI functions
Previously, the BT OSI would use various FreeRTOS "create static" functions to
ensure that semaphores and queues were always allocated to internal memory.
However, from commit e21ab0332b onwards, all
dynamic memory allocated by FreeRTOS will default to internal RAM.

Thus, the extra "create static" calls can be removed to simply the code.
2023-04-21 15:19:29 +08:00
71786a7413 usb_host: Update docs and comments regarding first configuration enumeration
This commit updates some comments and documentation regarding changes made in
PR https://github.com/espressif/esp-idf/pull/11113.
2023-04-21 12:49:18 +08:00
4102628a3b Fix usb enumeration stage error for some device 2023-04-21 12:49:18 +08:00
d0011b778a bluedroid: report status after clearing the BLE white list 2023-04-20 18:58:38 +08:00
c2fe7be50e bluedroid: fix GATTC cache address save 2023-04-20 18:57:23 +08:00
13e3480f03 docs: migrated documentetation from github.io to docs.espressif.com 2023-04-20 13:38:16 +04:00
024e201097 esp_timer: Adds IRAM_ATTR for esp_timer_restart and esp_timer_is_active
Closes https://github.com/espressif/esp-idf/issues/10522
Closes https://github.com/espressif/esp-idf/issues/10859
2023-04-20 15:14:52 +08:00
62467fbca5 tools: Update idf-py hints with Bluedroid HFP AG info 2023-04-19 19:10:00 +08:00
84f81437a3 gitlab: simplify approvals for backports (v5.1) 2023-04-19 12:19:55 +02:00
c00759ad34 lcd: test send color buffers in multiple steps 2023-04-18 10:08:38 +08:00
472cc06f6c i80_lcd: align before cache sync 2023-04-18 10:08:38 +08:00
b5572b1db0 rmt: define RMT_ENCODING_RESET in rmt_encode_state_t
Closes https://github.com/espressif/esp-idf/issues/11200
2023-04-17 21:28:45 +08:00
2b461df8a8 spi_lcd: test spi lcd io can transfer color data to a fixed window region
also test the io tx_param and tx_color can skip the command phase
2023-04-17 16:25:14 +08:00
7a716377a3 spi_lcd: maximum transfer size should respect bus configuration
Also this commit added the SPI_TRANS_CS_KEEP_ACTIVE flag for io_tx_color
2023-04-17 16:25:14 +08:00
965e9abd7b i2s: fixed the test case I2S_thread_concurrent_safety_test 2023-04-10 15:29:22 +08:00
a47169f450 i2s: fix interrupt flag of pdm rx mode
Forgot to update in PR https://github.com/espressif/esp-idf/pull/10997
2023-04-10 15:29:22 +08:00
2002 changed files with 45626 additions and 138461 deletions

View File

@ -2,214 +2,5 @@
#
# https://docs.gitlab.com/ee/user/project/code_owners.html#the-syntax-of-code-owners-files
#
# If more than one rule matches a given file, the latest rule is used.
# The file should be generally kept sorted, except when it is necessary
# to use a different order due to the fact above. In that case, use
# '# sort-order-reset' comment line to reset the sort order.
#
# Recipes for a few common cases:
#
# 1. Specific directory with all its contents:
#
# /components/app_trace/
#
# Note the trailing slash!
#
# 2. File with certain extension in any subdirectory of a certain directory:
#
# /examples/**/*.py
#
# This includes an *.py files in /examples/ directory as well.
#
# 3. Contents of a directory with a certain name, anywhere in the tree:
#
# test_*_host/
#
# Will match everything under components/efuse/test_efuse_host/,
# components/heap/test_multi_heap_host/, components/lwip/test_afl_host/, etc.
#
# 4. Same as above, except limited to a specific place in the tree:
#
# /components/esp32*/
#
# Matches everything under /components/esp32, /components/esp32s2, etc.
# Doesn't match /tools/some-test/components/esp32s5.
#
# 5. Specific file:
#
# /tools/tools.json
#
# 6. File with a certain name anywhere in the tree
#
# .gitignore
#
* @esp-idf-codeowners/other
/.* @esp-idf-codeowners/tools
/.github/workflows/ @esp-idf-codeowners/ci
/.gitlab-ci.yml @esp-idf-codeowners/ci
/.gitlab/ci/ @esp-idf-codeowners/ci
/.gitlab/dangerjs/ @esp-idf-codeowners/ci @esp-idf-codeowners/tools
/.pre-commit-config.yaml @esp-idf-codeowners/ci
/.readthedocs.yml @esp-idf-codeowners/docs
/CMakeLists.txt @esp-idf-codeowners/build-config
/CONTRIBUTING.md @esp-idf-codeowners/docs
/Kconfig @esp-idf-codeowners/build-config
/README*.md @esp-idf-codeowners/docs
/SUPPORT_POLICY*.md @esp-idf-codeowners/docs
/add_path.sh @esp-idf-codeowners/tools
/conftest.py @esp-idf-codeowners/ci
/export.* @esp-idf-codeowners/tools
/install.* @esp-idf-codeowners/tools
/pytest.ini @esp-idf-codeowners/ci
/sdkconfig.rename @esp-idf-codeowners/build-config
/sonar-project.properties @esp-idf-codeowners/ci
# sort-order-reset
/components/app_trace/ @esp-idf-codeowners/tools
/components/app_update/ @esp-idf-codeowners/system @esp-idf-codeowners/app-utilities
/components/bootloader*/ @esp-idf-codeowners/system @esp-idf-codeowners/security
/components/bootloader_support/bootloader_flash/ @esp-idf-codeowners/peripherals
/components/bt/ @esp-idf-codeowners/bluetooth
/components/cmock/ @esp-idf-codeowners/system
/components/console/ @esp-idf-codeowners/system @esp-idf-codeowners/app-utilities/console
/components/cxx/ @esp-idf-codeowners/system
/components/driver/ @esp-idf-codeowners/peripherals
/components/efuse/ @esp-idf-codeowners/system
/components/esp_adc/ @esp-idf-codeowners/peripherals
/components/esp_app_format/ @esp-idf-codeowners/system @esp-idf-codeowners/app-utilities
/components/esp_coex/ @esp-idf-codeowners/wifi @esp-idf-codeowners/bluetooth @esp-idf-codeowners/ieee802154
/components/esp_common/ @esp-idf-codeowners/system
/components/esp_eth/ @esp-idf-codeowners/network
/components/esp_event/ @esp-idf-codeowners/system
/components/esp_gdbstub/ @esp-idf-codeowners/tools
/components/esp_hid/ @esp-idf-codeowners/bluetooth
/components/esp_http_client/ @esp-idf-codeowners/app-utilities
/components/esp_http_server/ @esp-idf-codeowners/app-utilities
/components/esp_https_ota/ @esp-idf-codeowners/app-utilities
/components/esp_https_server/ @esp-idf-codeowners/app-utilities
/components/esp_hw_support/ @esp-idf-codeowners/system @esp-idf-codeowners/peripherals
/components/esp_lcd/ @esp-idf-codeowners/peripherals
/components/esp_local_ctrl/ @esp-idf-codeowners/app-utilities
/components/esp_mm/ @esp-idf-codeowners/peripherals
/components/esp_netif/ @esp-idf-codeowners/network
/components/esp_netif_stack/ @esp-idf-codeowners/network
/components/esp_partition/ @esp-idf-codeowners/storage
/components/esp_phy/ @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/ieee802154
/components/esp_pm/ @esp-idf-codeowners/power-management @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/system
/components/esp_psram/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/system
/components/esp_ringbuf/ @esp-idf-codeowners/system
/components/esp_rom/ @esp-idf-codeowners/system @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi
/components/esp_system/ @esp-idf-codeowners/system
/components/esp_timer/ @esp-idf-codeowners/system
/components/esp-tls/ @esp-idf-codeowners/app-utilities
/components/esp_wifi/ @esp-idf-codeowners/wifi
/components/espcoredump/ @esp-idf-codeowners/tools
/components/esptool_py/ @esp-idf-codeowners/tools
/components/fatfs/ @esp-idf-codeowners/storage
/components/fatfs/**/*.py @esp-idf-codeowners/tools
/components/freertos/ @esp-idf-codeowners/system
/components/hal/ @esp-idf-codeowners/peripherals
/components/heap/ @esp-idf-codeowners/system
/components/http_parser/ @esp-idf-codeowners/app-utilities
/components/idf_test/ @esp-idf-codeowners/ci
/components/ieee802154/ @esp-idf-codeowners/ieee802154
/components/json/ @esp-idf-codeowners/app-utilities
/components/linux/ @esp-idf-codeowners/system
/components/log/ @esp-idf-codeowners/system
/components/lwip/ @esp-idf-codeowners/lwip
/components/mbedtls/ @esp-idf-codeowners/app-utilities/mbedtls @esp-idf-codeowners/security
/components/mqtt/ @esp-idf-codeowners/network
/components/newlib/ @esp-idf-codeowners/system @esp-idf-codeowners/tools
/components/nvs_flash/ @esp-idf-codeowners/storage
/components/openthread/ @esp-idf-codeowners/ieee802154
/components/partition_table/ @esp-idf-codeowners/system
/components/perfmon/ @esp-idf-codeowners/tools
/components/protobuf-c/ @esp-idf-codeowners/app-utilities
/components/protocomm/ @esp-idf-codeowners/app-utilities/provisioning
/components/pthread/ @esp-idf-codeowners/system
/components/riscv/ @esp-idf-codeowners/system
/components/sdmmc/ @esp-idf-codeowners/storage
/components/soc/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/system
/components/spi_flash/ @esp-idf-codeowners/peripherals
/components/spiffs/ @esp-idf-codeowners/storage
/components/tcp_transport/ @esp-idf-codeowners/network
/components/touch_element/ @esp-idf-codeowners/peripherals
/components/ulp/ @esp-idf-codeowners/system
/components/unity/ @esp-idf-codeowners/ci
/components/usb/ @esp-idf-codeowners/peripherals/usb
/components/vfs/ @esp-idf-codeowners/storage
/components/wear_levelling/ @esp-idf-codeowners/storage
/components/wifi_provisioning/ @esp-idf-codeowners/app-utilities/provisioning
/components/wpa_supplicant/ @esp-idf-codeowners/wifi @esp-idf-codeowners/app-utilities/mbedtls
/components/xtensa/ @esp-idf-codeowners/system
/docs/ @esp-idf-codeowners/docs
/docs/**/api-reference/bluetooth/ @esp-idf-codeowners/bluetooth
/docs/**/api-reference/network/ @esp-idf-codeowners/network
/docs/**/api-reference/peripherals/ @esp-idf-codeowners/peripherals
/docs/**/api-reference/peripherals/usb* @esp-idf-codeowners/peripherals @esp-idf-codeowners/peripherals/usb
/docs/**/api-reference/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/docs/**/api-reference/provisioning/ @esp-idf-codeowners/app-utilities/provisioning
/docs/**/api-reference/storage/ @esp-idf-codeowners/storage
/docs/**/api-reference/system/ @esp-idf-codeowners/system
/docs/**/security/ @esp-idf-codeowners/security
/docs/**/migration-guides/ @esp-idf-codeowners/docs @esp-idf-codeowners/all-maintainers
/examples/README.md @esp-idf-codeowners/docs @esp-idf-codeowners/ci
/examples/**/*.py @esp-idf-codeowners/ci @esp-idf-codeowners/tools
/examples/bluetooth/ @esp-idf-codeowners/bluetooth
/examples/build_system/ @esp-idf-codeowners/build-config
/examples/common_components/ @esp-idf-codeowners/system
/examples/custom_bootloader/ @esp-idf-codeowners/system
/examples/cxx/ @esp-idf-codeowners/system
/examples/ethernet/ @esp-idf-codeowners/network
/examples/get-started/ @esp-idf-codeowners/system
/examples/mesh/ @esp-idf-codeowners/wifi
/examples/network/ @esp-idf-codeowners/network @esp-idf-codeowners/wifi
/examples/openthread/ @esp-idf-codeowners/ieee802154
/examples/peripherals/ @esp-idf-codeowners/peripherals
/examples/peripherals/usb/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/peripherals/usb
/examples/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/examples/provisioning/ @esp-idf-codeowners/app-utilities/provisioning
/examples/security/ @esp-idf-codeowners/security
/examples/storage/ @esp-idf-codeowners/storage
/examples/system/ @esp-idf-codeowners/system
/examples/system/ota/ @esp-idf-codeowners/app-utilities
/examples/wifi/ @esp-idf-codeowners/wifi
/examples/zigbee/ @esp-idf-codeowners/ieee802154
/tools/ @esp-idf-codeowners/tools
/tools/ble/ @esp-idf-codeowners/app-utilities
/tools/catch/ @esp-idf-codeowners/ci
/tools/ci/ @esp-idf-codeowners/ci
/tools/cmake/ @esp-idf-codeowners/build-config
/tools/esp_prov/ @esp-idf-codeowners/app-utilities
/tools/kconfig*/ @esp-idf-codeowners/build-config
/tools/ldgen/ @esp-idf-codeowners/build-config
/tools/mass_mfg/ @esp-idf-codeowners/app-utilities
/tools/mocks/ @esp-idf-codeowners/system
/tools/test_apps/README.md @esp-idf-codeowners/docs @esp-idf-codeowners/ci
## Note: owners here should be the same as the owners for the same example subdir, above
/tools/test_apps/build_system/ @esp-idf-codeowners/build-config
/tools/test_apps/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/tools/test_apps/security/ @esp-idf-codeowners/security
/tools/test_apps/system/ @esp-idf-codeowners/system
/tools/test_apps/**/*.py @esp-idf-codeowners/ci @esp-idf-codeowners/tools
/tools/test_build_system/ @esp-idf-codeowners/tools @esp-idf-codeowners/build-config
/tools/unit-test-app/ @esp-idf-codeowners/system @esp-idf-codeowners/tools
# sort-order-reset
/components/**/test_apps/**/*.py @esp-idf-codeowners/ci @esp-idf-codeowners/tools
# ignore lists
/tools/ci/check_copyright_config.yaml @esp-idf-codeowners/all-maintainers
/tools/ci/check_copyright_ignore.txt @esp-idf-codeowners/all-maintainers
/tools/ci/mypy_ignore_list.txt @esp-idf-codeowners/tools
* @esp-idf-codeowners/all-maintainers

View File

@ -215,14 +215,6 @@ build_pytest_examples_esp32c2:
IDF_TARGET: esp32c2
TEST_DIR: examples
build_pytest_examples_esp32h4:
extends:
- .build_pytest_no_jtag_template
- .rules:build:example_test-esp32h4
variables:
IDF_TARGET: esp32h4
TEST_DIR: examples
build_pytest_examples_jtag: # for all targets
extends:
- .build_pytest_jtag_template
@ -649,14 +641,6 @@ build_examples_cmake_esp32c3:
IDF_TARGET: esp32c3
TEST_DIR: examples
build_examples_cmake_esp32h4:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32h4
variables:
IDF_TARGET: esp32h4
TEST_DIR: examples
build_examples_cmake_esp32c6:
extends:
- .build_cmake_template
@ -729,13 +713,6 @@ build_clang_test_apps_esp32c6:
variables:
IDF_TARGET: esp32c6
build_clang_test_apps_esp32h4:
extends:
- .build_clang_test_apps_riscv
- .rules:build:custom_test-esp32h4
variables:
IDF_TARGET: esp32h4
.test_build_system_template:
stage: host_test
extends:

View File

@ -3,7 +3,6 @@
- esp32s2
- esp32s3
- esp32c3
- esp32h4
- esp32c2
- esp32c6
- esp32h2
@ -133,13 +132,15 @@ build:integration_test:
- *target_test
- *all_targets
- - bt # example_test_005
- wifi # example_test_002, example_test*wifi*
- ethernet # example_test*ethernet*
- sdio # component_ut_pytest_esp32_sdio
- wifi # pytest*wifi*
- ethernet # pytest*ethernet*
- sdio # pytest*sdio*
- usb # USB Device & Host tests
- adc # component_ut_pytest_esp32x_adc
- adc # pytest*adc*
- i154
- flash_multi
- ecdsa
- ccs811 # pytest*ccs811*
patterns:
- "{0}-{1}-{2}"
- "{0}-{2}"
@ -213,31 +214,10 @@ build:integration_test:
#################################
# Triggered Only By Labels Jobs #
#################################
"labels:iperf_stress_test": # example_test
labels:
- iperf_stress_test
included_in:
- build:example_test
- build:example_test-esp32
- build:target_test
"labels:weekend_test": # custom test
labels:
- weekend_test
included_in:
- build:custom_test
- build:custom_test-esp32
- build:target_test
"labels:nvs_coverage": # host_test
labels:
- nvs_coverage
"labels:fuzzer_test-weekend_test": # host test
labels:
- fuzzer_test
- weekend_test
"labels-protected:lan8720": # UT # FIXME: IDFCI-1176 temporary run this on master/release or with label
labels:
- lan8720

View File

@ -3,6 +3,7 @@
- "docs/**/*"
- "**/*.rst"
- "CONTRIBUTING.rst"
- "**/soc_caps.h"
.patterns-docs-partial: &patterns-docs-partial
- "components/**/*.h"
@ -43,6 +44,9 @@
.doc-rules:build:docs-partial:
rules:
- <<: *if-dev-push
changes: *patterns-docs-full
when: never
- <<: *if-dev-push
changes: *patterns-docs-partial

View File

@ -185,30 +185,6 @@ test_efuse_table_on_host_esp32c6:
variables:
IDF_TARGET: esp32c6
test_efuse_table_on_host_esp32h4:
extends: .test_efuse_table_on_host_template
variables:
IDF_TARGET: esp32h4
test_espcoredump:
extends: .host_test_template
artifacts:
when: always
paths:
- components/espcoredump/test/**/.coverage
- components/espcoredump/test/**/output
expire_in: 1 week
variables:
IDF_COREDUMP_ELF_REPO: "https://gitlab-ci-token:${BOT_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/idf/idf-coredump-elf.git"
IDF_COREDUMP_ELF_TAG: idf-20220928
# install CMake version specified in tools.json
SETUP_TOOLS_LIST: "all"
script:
- eval $($IDF_PATH/tools/idf_tools.py export)
- retry_failed git clone ${IDF_COREDUMP_ELF_REPO} -b $IDF_COREDUMP_ELF_TAG
- cd ${IDF_PATH}/components/espcoredump/test/
- ./test_espcoredump.sh ${CI_PROJECT_DIR}/idf-coredump-elf
test_logtrace_proc:
extends: .host_test_template
artifacts:
@ -247,6 +223,14 @@ test_mkuf2:
- cd ${IDF_PATH}/tools/test_mkuf2
- ./test_mkuf2.py
test_sbom:
extends:
- .host_test_template
- .rules:patterns:sbom
script:
- cd ${IDF_PATH}/tools/test_sbom
- pytest
test_autocomplete:
extends:
- .host_test_template

View File

@ -54,9 +54,10 @@
- "tools/ci/ci_build_apps.py"
- "tools/test_build_system/**/*"
.patterns-custom_test: &patterns-custom_test
- "components/espcoredump/**/*"
.patterns-sbom: &patterns-sbom
- "tools/test_sbom/*"
.patterns-custom_test: &patterns-custom_test
- "tools/ci/python_packages/gitlab_api.py"
- "tools/ci/python_packages/tiny_test_fw/**/*"
- "tools/ci/python_packages/ttfw_idf/**/*"
@ -246,6 +247,7 @@
- "components/driver/include/driver/sdio*.h"
- "components/driver/include/driver/sdmmc*.h"
- "components/sdmmc/**/*"
- "examples/peripherals/sdio/**/*"
# for jobs: component_ut_pytest_sdio related
.patterns-component_ut-sdio: &patterns-component_ut-sdio
@ -259,6 +261,13 @@
- "components/driver/include/driver/sdmmc*.h"
- "components/sdmmc/**/*"
.patterns-example_test-ccs811: &patterns-example_test-ccs811
# components
- "examples/system/console/advanced/components/**/*"
- "components/driver/i2c/**/*"
# tests
- "examples/peripherals/i2c/i2c_tools/**/*"
# for jobs: UT_xx_SDSPI related
.patterns-unit_test-sdio: &patterns-unit_test-sdio
- "components/hal/sdio*.c"
@ -306,6 +315,11 @@
- "components/efuse/**/*"
- "examples/peripherals/adc/**/*"
.patterns-target_test-ecdsa: &patterns-target_test-ecdsa
- "components/hal/**/*"
- "components/efuse/**/*"
- "components/mbedtls/port/ecdsa/*"
##############
# if anchors #
##############
@ -414,6 +428,14 @@
- <<: *if-dev-push
changes: *patterns-sonarqube-files
.rules:patterns:sbom:
rules:
- <<: *if-protected
- <<: *if-dev-push
changes: *patterns-sbom
- <<: *if-dev-push
changes: *patterns-submodule
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# DO NOT place comments or maintain any code from this line
#
@ -447,9 +469,6 @@
.if-label-component_ut_esp32h2: &if-label-component_ut_esp32h2
if: '$BOT_LABEL_COMPONENT_UT_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-component_ut_esp32h4: &if-label-component_ut_esp32h4
if: '$BOT_LABEL_COMPONENT_UT_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32h4(?:,[^,\n\r]+)*$/i'
.if-label-component_ut_esp32s2: &if-label-component_ut_esp32s2
if: '$BOT_LABEL_COMPONENT_UT_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32s2(?:,[^,\n\r]+)*$/i'
@ -474,9 +493,6 @@
.if-label-custom_test_esp32h2: &if-label-custom_test_esp32h2
if: '$BOT_LABEL_CUSTOM_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-custom_test_esp32h4: &if-label-custom_test_esp32h4
if: '$BOT_LABEL_CUSTOM_TEST_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32h4(?:,[^,\n\r]+)*$/i'
.if-label-custom_test_esp32s2: &if-label-custom_test_esp32s2
if: '$BOT_LABEL_CUSTOM_TEST_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32s2(?:,[^,\n\r]+)*$/i'
@ -504,18 +520,12 @@
.if-label-example_test_esp32h2: &if-label-example_test_esp32h2
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-example_test_esp32h4: &if-label-example_test_esp32h4
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32h4(?:,[^,\n\r]+)*$/i'
.if-label-example_test_esp32s2: &if-label-example_test_esp32s2
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32s2(?:,[^,\n\r]+)*$/i'
.if-label-example_test_esp32s3: &if-label-example_test_esp32s3
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32S3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32s3(?:,[^,\n\r]+)*$/i'
.if-label-fuzzer_test: &if-label-fuzzer_test
if: '$BOT_LABEL_FUZZER_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*fuzzer_test(?:,[^,\n\r]+)*$/i'
.if-label-host_test: &if-label-host_test
if: '$BOT_LABEL_HOST_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*host_test(?:,[^,\n\r]+)*$/i'
@ -528,9 +538,6 @@
.if-label-integration_test_wifi: &if-label-integration_test_wifi
if: '$BOT_LABEL_INTEGRATION_TEST_WIFI || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*integration_test_wifi(?:,[^,\n\r]+)*$/i'
.if-label-iperf_stress_test: &if-label-iperf_stress_test
if: '$BOT_LABEL_IPERF_STRESS_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*iperf_stress_test(?:,[^,\n\r]+)*$/i'
.if-label-lan8720: &if-label-lan8720
if: '$BOT_LABEL_LAN8720 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*lan8720(?:,[^,\n\r]+)*$/i'
@ -567,18 +574,12 @@
.if-label-unit_test_esp32h2: &if-label-unit_test_esp32h2
if: '$BOT_LABEL_UNIT_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32h2(?:,[^,\n\r]+)*$/i'
.if-label-unit_test_esp32h4: &if-label-unit_test_esp32h4
if: '$BOT_LABEL_UNIT_TEST_ESP32H4 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32h4(?:,[^,\n\r]+)*$/i'
.if-label-unit_test_esp32s2: &if-label-unit_test_esp32s2
if: '$BOT_LABEL_UNIT_TEST_ESP32S2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32s2(?:,[^,\n\r]+)*$/i'
.if-label-unit_test_esp32s3: &if-label-unit_test_esp32s3
if: '$BOT_LABEL_UNIT_TEST_ESP32S3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32s3(?:,[^,\n\r]+)*$/i'
.if-label-weekend_test: &if-label-weekend_test
if: '$BOT_LABEL_WEEKEND_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*weekend_test(?:,[^,\n\r]+)*$/i'
.if-label-windows: &if-label-windows
if: '$BOT_LABEL_WINDOWS || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*windows(?:,[^,\n\r]+)*$/i'
@ -607,7 +608,6 @@
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-component_ut_esp32c6
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-component_ut_esp32h4
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-component_ut_esp32s3
- <<: *if-label-lan8720
@ -618,7 +618,6 @@
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32h4
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
- <<: *if-dev-push
@ -637,6 +636,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -670,6 +671,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -702,6 +705,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -734,6 +739,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -766,6 +773,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -798,6 +807,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -830,6 +841,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -862,6 +875,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -879,11 +894,9 @@
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-custom_test_esp32c6
- <<: *if-label-custom_test_esp32h2
- <<: *if-label-custom_test_esp32h4
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-custom_test_esp32s3
- <<: *if-label-target_test
- <<: *if-label-weekend_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
@ -894,6 +907,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -908,7 +923,6 @@
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32
- <<: *if-label-target_test
- <<: *if-label-weekend_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
@ -919,6 +933,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -943,6 +959,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -967,6 +985,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -991,6 +1011,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1016,29 +1038,7 @@
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
.rules:build:custom_test-esp32h4:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32h4
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-custom_test
- <<: *if-dev-push
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1063,6 +1063,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1087,6 +1089,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1121,10 +1125,8 @@
- <<: *if-label-example_test_esp32c3
- <<: *if-label-example_test_esp32c6
- <<: *if-label-example_test_esp32h2
- <<: *if-label-example_test_esp32h4
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
- <<: *if-label-iperf_stress_test
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
@ -1138,6 +1140,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1150,6 +1154,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1164,7 +1170,6 @@
- <<: *if-label-build
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32
- <<: *if-label-iperf_stress_test
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
@ -1178,6 +1183,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1190,6 +1197,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1216,6 +1225,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1228,6 +1239,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1255,6 +1268,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1267,6 +1282,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1293,6 +1310,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1305,6 +1324,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1332,43 +1353,7 @@
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
changes: *patterns-example_test-i154
- <<: *if-dev-push
changes: *patterns-example_test-sdio
- <<: *if-dev-push
changes: *patterns-example_test-usb
- <<: *if-dev-push
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-target_test-wifi
.rules:build:example_test-esp32h4:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32h4
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1381,6 +1366,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1407,6 +1394,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1419,6 +1408,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1445,6 +1436,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1457,6 +1450,8 @@
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1509,7 +1504,6 @@
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-component_ut_esp32c6
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-component_ut_esp32h4
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-component_ut_esp32s3
- <<: *if-label-custom_test
@ -1518,7 +1512,6 @@
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-custom_test_esp32c6
- <<: *if-label-custom_test_esp32h2
- <<: *if-label-custom_test_esp32h4
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-custom_test_esp32s3
- <<: *if-label-example_test
@ -1527,13 +1520,11 @@
- <<: *if-label-example_test_esp32c3
- <<: *if-label-example_test_esp32c6
- <<: *if-label-example_test_esp32h2
- <<: *if-label-example_test_esp32h4
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
- <<: *if-label-integration_test
- <<: *if-label-integration_test_ble
- <<: *if-label-integration_test_wifi
- <<: *if-label-iperf_stress_test
- <<: *if-label-lan8720
- <<: *if-label-target_test
- <<: *if-label-unit_test
@ -1542,10 +1533,8 @@
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32h4
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
- <<: *if-label-weekend_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
@ -1568,6 +1557,8 @@
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
@ -1584,6 +1575,8 @@
changes: *patterns-integration_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1609,7 +1602,6 @@
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32h4
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
- <<: *if-dev-push
@ -1620,6 +1612,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1649,6 +1643,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1677,6 +1673,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1705,6 +1703,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1733,6 +1733,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1761,6 +1763,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1789,6 +1793,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -1817,6 +1823,8 @@
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
@ -2085,6 +2093,19 @@
- <<: *if-dev-push
changes: *patterns-target_test-adc
.rules:test:component_ut-esp32h2-ecdsa:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
.rules:test:component_ut-esp32s2:
rules:
- <<: *if-revert-branch
@ -2338,6 +2359,19 @@
- <<: *if-dev-push
changes: *patterns-example_test-bt
.rules:test:example_test-esp32-ccs811:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-example_test-ccs811
.rules:test:example_test-esp32-ethernet:
rules:
- <<: *if-revert-branch

View File

@ -97,6 +97,22 @@ pytest_examples_esp32_jtag:
SETUP_TOOLS: "1" # need gdb openocd
PYTEST_EXTRA_FLAGS: "--log-cli-level DEBUG"
pytest_examples_esp32_ccs811:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32-ccs811
needs:
- build_pytest_examples_esp32
tags: [ esp32, ccs811 ]
pytest_examples_esp32_sdio:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32-sdio
needs:
- build_pytest_examples_esp32
tags: [ esp32, sdio_master_slave ]
pytest_examples_esp32s2_generic:
extends:
- .pytest_examples_dir_template
@ -249,6 +265,14 @@ pytest_examples_esp32_ethernet:
- build_pytest_examples_esp32
tags: [ esp32, ethernet]
pytest_examples_esp32_ethernet_httpbin:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32-ethernet
needs:
- build_pytest_examples_esp32
tags: [ esp32, httpbin]
pytest_examples_esp32_8mb_flash:
extends:
- .pytest_examples_dir_template
@ -488,6 +512,14 @@ pytest_examples_esp32h2_adc:
- build_pytest_examples_esp32h2
tags: [ esp32h2, adc ]
example_test_pytest_esp32s3_emmc:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32s3
needs:
- build_pytest_examples_esp32s3
tags: [ esp32s3, emmc ]
.pytest_components_dir_template:
extends: .pytest_template
variables:
@ -884,6 +916,14 @@ pytest_components_esp32h2_adc:
- build_pytest_components_esp32h2
tags: [ esp32h2, adc ]
component_ut_pytest_esp32h2_ecdsa:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32h2-ecdsa
needs:
- build_pytest_components_esp32h2
tags: [ esp32h2, ecdsa_efuse ]
pytest_components_esp32c6_generic_multi_device:
extends:
- .pytest_components_dir_template
@ -1090,12 +1130,6 @@ example_test_001C:
- ESP32
- Example_GENERIC
.example_test_003:
extends: .example_test_esp32_template
tags:
- ESP32
- Example_SDIO
example_test_005:
extends:
- .example_test_esp32_template
@ -1104,12 +1138,6 @@ example_test_005:
- ESP32
- Example_WIFI_BT
example_test_007:
extends: .example_test_esp32_template
tags:
- ESP32
- Example_I2C_CCS811_SENSOR
example_test_C3_GENERIC:
extends: .example_test_esp32c3_template
tags:
@ -1203,19 +1231,12 @@ UT_006:
- UT_T1_SPIMODE
- psram
UT_017:
.UT_017:
extends: .unit_test_esp32_template
tags:
- ESP32_IDF
- EMMC
UT_022:
extends: .unit_test_esp32_template
tags:
- ESP32_IDF
- UT_T2_I2C
- psram
UT_028:
extends: .unit_test_esp32_template
tags:
@ -1288,12 +1309,6 @@ UT_C3_FLASH:
- ESP32C3_IDF
- UT_T1_ESP_FLASH
UT_C3_I2C:
extends: .unit_test_esp32c3_template
tags:
- ESP32C3_IDF
- UT_T2_I2C
UT_C3_SDSPI:
extends:
- .unit_test_esp32c3_template

53
.gitmodules vendored
View File

@ -2,6 +2,26 @@
# All the relative URL paths are intended to be GitHub ones
# For Espressif's public projects please use '../../espressif/proj', not a '../proj'
#
# Submodules SBOM information
# ---------------------------
# Submodules, which are used directly and not forked into espressif namespace should
# contain SBOM information here. Other submodules should have the SBOM manifest file
# included in the root of their project's repository.
#
# The sbom-hash entry records the submodule's checkout SHA as presented in git-tree
# commit object. For example spiffs submodule
#
# $ git ls-tree HEAD components/spiffs/spiffs
# 160000 commit 0dbb3f71c5f6fae3747a9d935372773762baf852 components/spiffs/spiffs
#
# The hash can be also obtained with git submodule command
#
# $ git submodule status components/spiffs/spiffs
# 0dbb3f71c5f6fae3747a9d935372773762baf852 components/spiffs/spiffs (0.2-255-g0dbb3f71c5f6)
#
# The submodule SHA recorded here has to match with SHA, which is presented in git-tree.
# This is checked by CI. Also please don't forget to update the submodule version
# if you are changing the sbom-hash. This is important for SBOM generation.
[submodule "components/bt/controller/lib_esp32"]
path = components/bt/controller/lib_esp32
@ -10,14 +30,31 @@
[submodule "components/bootloader/subproject/components/micro-ecc/micro-ecc"]
path = components/bootloader/subproject/components/micro-ecc/micro-ecc
url = ../../kmackay/micro-ecc.git
sbom-version = 1.0
sbom-cpe = cpe:2.3:a:micro-ecc_project:micro-ecc:{}:*:*:*:*:*:*:*
sbom-supplier = Person: Ken MacKay
sbom-url = https://github.com/kmackay/micro-ecc
sbom-description = A small and fast ECDH and ECDSA implementation for 8-bit, 32-bit, and 64-bit processors
sbom-hash = d037ec89546fad14b5c4d5456c2e23a71e554966
[submodule "components/spiffs/spiffs"]
path = components/spiffs/spiffs
url = ../../pellepl/spiffs.git
sbom-version = 0.2-255-g0dbb3f71c5f6
sbom-supplier = Person: Peter Andersson
sbom-url = https://github.com/pellepl/spiffs
sbom-description = Wear-leveled SPI flash file system for embedded devices
sbom-hash = 0dbb3f71c5f6fae3747a9d935372773762baf852
[submodule "components/json/cJSON"]
path = components/json/cJSON
url = ../../DaveGamble/cJSON.git
sbom-version = 1.7.15
sbom-cpe = cpe:2.3:a:cjson_project:cjson:{}:*:*:*:*:*:*:*
sbom-supplier = Person: Dave Gamble
sbom-url = https://github.com/DaveGamble/cJSON
sbom-description = Ultralightweight JSON parser in ANSI C
sbom-hash = d348621ca93571343a56862df7de4ff3bc9b5667
[submodule "components/mbedtls/mbedtls"]
path = components/mbedtls/mbedtls
@ -34,10 +71,21 @@
[submodule "components/protobuf-c/protobuf-c"]
path = components/protobuf-c/protobuf-c
url = ../../protobuf-c/protobuf-c.git
sbom-version = 1.4.1
sbom-cpe = cpe:2.3:a:protobuf-c_project:protobuf-c:{}:*:*:*:*:*:*:*
sbom-supplier = Organization: protobuf-c community <https://groups.google.com/g/protobuf-c>
sbom-url = https://github.com/protobuf-c/protobuf-c
sbom-description = Protocol Buffers implementation in C
sbom-hash = abc67a11c6db271bedbb9f58be85d6f4e2ea8389
[submodule "components/unity/unity"]
path = components/unity/unity
url = ../../ThrowTheSwitch/Unity.git
sbom-version = v2.4.3-51-g7d2bf62b7e6a
sbom-supplier = Organization: ThrowTheSwitch community <http://www.throwtheswitch.org>
sbom-url = https://github.com/ThrowTheSwitch/Unity
sbom-description = Simple Unit Testing for C
sbom-hash = 7d2bf62b7e6afaf38153041a9d53c21aeeca9a25
[submodule "components/bt/host/nimble/nimble"]
path = components/bt/host/nimble/nimble
@ -50,6 +98,11 @@
[submodule "components/cmock/CMock"]
path = components/cmock/CMock
url = ../../ThrowTheSwitch/CMock.git
sbom-version = v2.5.2-2-geeecc49ce8af
sbom-supplier = Organization: ThrowTheSwitch community <http://www.throwtheswitch.org>
sbom-url = https://github.com/ThrowTheSwitch/CMock
sbom-description = CMock - Mock/stub generator for C
sbom-hash = eeecc49ce8af123cf8ad40efdb9673e37b56230f
[submodule "components/openthread/openthread"]
path = components/openthread/openthread

View File

@ -139,7 +139,8 @@ repos:
name: Check if all apps readme files match given .build-test-rules.yml files. Modify the supported target tables
entry: tools/ci/check_build_test_rules.py check-readmes
language: python
files: 'tools/test_apps/.+|examples/.+|components/.+'
files: 'tools/test_apps/.+|examples/.+|components/.+|tools/idf_py_actions/constants.py|tools/ci/check_build_test_rules.py'
require_serial: true
additional_dependencies:
- PyYAML == 5.3.1
- idf_build_apps
@ -157,7 +158,7 @@ repos:
- id: file-contents-sorter
files: 'tools\/ci\/(executable-list\.txt|mypy_ignore_list\.txt|check_copyright_ignore\.txt)'
- repo: https://github.com/espressif/check-copyright/
rev: v1.0.1
rev: v1.0.2
hooks:
- id: check-copyright
args: ['--ignore', 'tools/ci/check_copyright_ignore.txt', '--config', 'tools/ci/check_copyright_config.yaml']

24
Kconfig
View File

@ -66,28 +66,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
config IDF_TARGET_ESP32H4
bool
default "y" if IDF_TARGET="esp32h4"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
choice IDF_TARGET_ESP32H4_BETA_VERSION
prompt "ESP32-H4 beta version"
depends on IDF_TARGET_ESP32H4
default IDF_TARGET_ESP32H4_BETA_VERSION_2
help
Currently ESP32-H4 has several beta versions for internal use only.
Select the one that matches your chip model.
config IDF_TARGET_ESP32H4_BETA_VERSION_1
bool
prompt "ESP32-H4 beta1"
config IDF_TARGET_ESP32H4_BETA_VERSION_2
bool
prompt "ESP32-H4 beta2"
endchoice
config IDF_TARGET_ESP32C2
bool
default "y" if IDF_TARGET="esp32c2"
@ -116,10 +94,8 @@ mainmenu "Espressif IoT Development Framework Configuration"
default 0x0002 if IDF_TARGET_ESP32S2
default 0x0005 if IDF_TARGET_ESP32C3
default 0x0009 if IDF_TARGET_ESP32S3
default 0x000A if IDF_TARGET_ESP32H4_BETA_VERSION_1
default 0x000C if IDF_TARGET_ESP32C2
default 0x000D if IDF_TARGET_ESP32C6
default 0x000E if IDF_TARGET_ESP32H4_BETA_VERSION_2 # ESP32-TODO: IDF-3475
default 0x0010 if IDF_TARGET_ESP32H2
default 0xFFFF

View File

@ -8,7 +8,7 @@
#define HEAP_TRACE_SRCFILE /* don't warn on inclusion here */
#include "esp_heap_trace.h"
#undef HEAP_TRACE_SRCFILE
#include "esp_heap_caps.h"
#if CONFIG_APPTRACE_SV_ENABLE
#include "esp_app_trace.h"
#include "esp_sysview_trace.h"
@ -85,7 +85,7 @@ void heap_trace_dump_caps(__attribute__((unused)) const uint32_t caps)
}
/* Add a new allocation to the heap trace records */
static IRAM_ATTR void record_allocation(const heap_trace_record_t *record)
static HEAP_IRAM_ATTR void record_allocation(const heap_trace_record_t *record)
{
if (!s_tracing) {
return;
@ -100,7 +100,7 @@ static IRAM_ATTR void record_allocation(const heap_trace_record_t *record)
For HEAP_TRACE_ALL, this means filling in the freed_by pointer.
For HEAP_TRACE_LEAKS, this means removing the record from the log.
*/
static IRAM_ATTR void record_free(void *p, void **callers)
static HEAP_IRAM_ATTR void record_free(void *p, void **callers)
{
if (!s_tracing) {
return;

View File

@ -37,8 +37,6 @@
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32H4
#include "esp32h4/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C6

View File

@ -334,7 +334,7 @@ typedef enum {
/**
* @brief Revokes the old signature digest. To be called in the application after the rollback logic.
*
* Relevant for Secure boot v2 on ESP32-S2, ESP32-S3, ESP32-C3, ESP32-H4 where upto 3 key digests can be stored (Key \#N-1, Key \#N, Key \#N+1).
* Relevant for Secure boot v2 on ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6, ESP32-H2 where upto 3 key digests can be stored (Key \#N-1, Key \#N, Key \#N+1).
* When key \#N-1 used to sign an app is invalidated, an OTA update is to be sent with an app signed with key \#N-1 & Key \#N.
* After successfully booting the OTA app should call this function to revoke Key \#N-1.
*

View File

@ -148,5 +148,5 @@ endif()
#
# So for now we just have the top-level build remove the final build products...
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES
ADDITIONAL_CLEAN_FILES
${bootloader_binary_files})

View File

@ -25,7 +25,7 @@ MEMORY
*/
iram_seg (RWX) : org = 0x40080400, len = 0xfc00
/* 64k at the end of DRAM, after ROM bootloader stack */
dram_seg (RW) : org = 0x3FFF0000, len = 0x10000
dram_seg (RW) : org = 0x3FFF0000, len = 0x6000
}
/* Default entry point: */

View File

@ -1,9 +0,0 @@
PROVIDE ( ets_update_cpu_frequency = 0x40008550 ); /* Updates g_ticks_per_us on the current CPU only; not on the other core */
PROVIDE ( MD5Final = 0x4005db1c );
PROVIDE ( MD5Init = 0x4005da7c );
PROVIDE ( MD5Update = 0x4005da9c );
/* bootloader will use following functions from xtensa hal library */
xthal_get_ccount = 0x4000c050;
xthal_get_ccompare = 0x4000c078;
xthal_set_ccompare = 0x4000c058;

View File

@ -1,240 +0,0 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/** Simplified memory map for the bootloader.
* Make sure the bootloader can load into main memory without overwriting itself.
*
* ESP32-H4 ROM static data usage is as follows:
* - 0x3fccb900 - 0x3fcdd210: Shared buffers, used in UART/USB/SPI download mode only
* - 0x3fcdd210 - 0x3fcdf210: PRO CPU stack, can be reclaimed as heap after RTOS startup
* - 0x3fcdf210 - 0x3fce0000: ROM .bss and .data (not easily reclaimable)
*
* The 2nd stage bootloader can take space up to the end of ROM shared
* buffers area (0x3fce9704). For alignment purpose we shall use value (0x3fce9700).
*/
/* The offset between Dbus and Ibus. Used to convert between 0x403xxxxx and 0x3fcxxxxx addresses. */
iram_dram_offset = 0x700000;
/* We consider 0x3fce9700 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
*/
/* These lengths can be adjusted, if necessary: */
bootloader_usable_dram_end = 0x3fcdd120;
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
bootloader_dram_seg_len = 0x5000;
bootloader_iram_loader_seg_len = 0x7000;
bootloader_iram_seg_len = 0x2000;
/* Start of the lower region is determined by region size and the end of the higher region */
bootloader_dram_seg_end = bootloader_usable_dram_end - bootloader_stack_overhead;
bootloader_dram_seg_start = bootloader_dram_seg_end - bootloader_dram_seg_len;
bootloader_iram_loader_seg_start = bootloader_dram_seg_start - bootloader_iram_loader_seg_len + iram_dram_offset;
bootloader_iram_seg_start = bootloader_iram_loader_seg_start - bootloader_iram_seg_len;
MEMORY
{
iram_seg (RWX) : org = bootloader_iram_seg_start, len = bootloader_iram_seg_len
iram_loader_seg (RWX) : org = bootloader_iram_loader_seg_start, len = bootloader_iram_loader_seg_len
dram_seg (RW) : org = bootloader_dram_seg_start, len = bootloader_dram_seg_len
}
/* Default entry point: */
ENTRY(call_start_cpu0);
SECTIONS
{
.iram_loader.text :
{
. = ALIGN (16);
_loader_text_start = ABSOLUTE(.);
*(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram1 .iram1.*) /* catch stray IRAM_ATTR */
*liblog.a:(.literal .text .literal.* .text.*)
*libgcc.a:(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_clock_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_common_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable)
*libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_enable .text.bootloader_random_enable)
*libbootloader_support.a:bootloader_efuse.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_console_loader.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_panic.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:bootloader_soc.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:esp_image_format.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_encrypt.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:flash_partitions.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot.*(.literal .text .literal.* .text.*)
*libbootloader_support.a:secure_boot_signatures_bootloader.*(.literal .text .literal.* .text.*)
*libmicro-ecc.a:*.*(.literal .text .literal.* .text.*)
*libspi_flash.a:*.*(.literal .text .literal.* .text.*)
*libhal.a:wdt_hal_iram.*(.literal .text .literal.* .text.*)
*libhal.a:mmu_hal.*(.literal .text .literal.* .text.*)
*libhal.a:cache_hal.*(.literal .text .literal.* .text.*)
*libhal.a:efuse_hal.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_clk.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:rtc_time.*(.literal .text .literal.* .text.*)
*libesp_hw_support.a:regi2c_ctrl.*(.literal .text .literal.* .text.*)
*libefuse.a:*.*(.literal .text .literal.* .text.*)
*(.fini.literal)
*(.fini)
*(.gnu.version)
_loader_text_end = ABSOLUTE(.);
} > iram_loader_seg
.iram.text :
{
. = ALIGN (16);
*(.entry.text)
*(.init.literal)
*(.init)
} > iram_seg
/* Shared RAM */
.dram0.bss (NOLOAD) :
{
. = ALIGN (8);
_dram_start = ABSOLUTE(.);
_bss_start = ABSOLUTE(.);
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN (8);
_bss_end = ABSOLUTE(.);
} > dram_seg
.dram0.data :
{
_data_start = ABSOLUTE(.);
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
*(.data1)
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
*(.gnu.linkonce.s2.*)
*(.jcr)
_data_end = ABSOLUTE(.);
} > dram_seg
.dram0.rodata :
{
_rodata_start = ABSOLUTE(.);
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.sdata2 .sdata2.* .srodata .srodata.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table)
*(.gcc_except_table)
*(.gnu.linkonce.e.*)
*(.gnu.version_r)
*(.eh_frame)
. = (. + 3) & ~ 3;
/* C++ constructor and destructor tables, properly ordered: */
__init_array_start = ABSOLUTE(.);
KEEP (*crtbegin.*(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
__init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.*(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
/* C++ exception handlers table: */
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
*(.xt_except_desc)
*(.gnu.linkonce.h.*)
__XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.);
*(.xt_except_desc_end)
*(.dynamic)
*(.gnu.version_d)
_rodata_end = ABSOLUTE(.);
/* Literals are also RO data. */
_lit4_start = ABSOLUTE(.);
*(*.lit4)
*(.lit4.*)
*(.gnu.linkonce.lit4.*)
_lit4_end = ABSOLUTE(.);
. = ALIGN(4);
_dram_end = ABSOLUTE(.);
} > dram_seg
.iram.text :
{
_stext = .;
_text_start = ABSOLUTE(.);
*(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.iram .iram.*) /* catch stray IRAM_ATTR */
*(.fini.literal)
*(.fini)
*(.gnu.version)
/** CPU will try to prefetch up to 16 bytes of
* of instructions. This means that any configuration (e.g. MMU, PMS) must allow
* safe access to up to 16 bytes after the last real instruction, add
* dummy bytes to ensure this
*/
. += 16;
_text_end = ABSOLUTE(.);
_etext = .;
} > iram_seg
}
/**
* Appendix: Memory Usage of ROM bootloader
*
* 0x3fccb81c ------------------> _dram0_0_start
* | |
* | |
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
* | |
* | |
* 0x3fcdd120 ------------------> __stack_sentry
* | |
* | | 2. Startup pro cpu stack (freed when IDF app is running)
* | |
* 0x3fcdf120 ------------------> __stack (pro cpu)
* | |
* | |
* | | 3. Shared memory only used in startup code or nonos/early boot*
* | | (can be freed when IDF runs)
* | |
* | |
* 0x3fcdfa6c ------------------> _dram0_rtos_reserved_start
* | |
* | |
* | | 4. Shared memory used in startup code and when IDF runs
* | |
* | |
* 0x3fcdfe40 ------------------> _dram0_rtos_reserved_end
* | |
* 0x3fcdfe4c ------------------> _data_start_interface
* | |
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
* | |
* 0x3fce0000 ------------------> _data_end_interface
*/

View File

@ -1,6 +0,0 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/* No definition for ESP32-H4 target */

View File

@ -1,13 +0,0 @@
/*
* ESP32S2 ROM address table
* Generated for ROM with MD5sum: 0a2c7ec5109c17884606d23b47045796
*/
PROVIDE (ets_update_cpu_frequency = 0x4000d8a4);
PROVIDE (MD5Final = 0x4000530c);
PROVIDE (MD5Init = 0x4000526c);
PROVIDE (MD5Update = 0x4000528c);
/* bootloader will use following functions from xtensa hal library */
xthal_get_ccount = 0x4001aa90;
xthal_get_ccompare = 0x4001aabc;
xthal_set_ccompare = 0x4001aa98;

View File

@ -1,6 +0,0 @@
/**
* ESP32S3 ROM address table
* Generated for ROM with MD5sum: d20fb231463ce337432b1fa9cba0b3c9
*/
PROVIDE ( ets_update_cpu_frequency = 0x40043164 );

View File

@ -5,7 +5,3 @@ components/bootloader_support/test_apps/rtc_custom_section:
- if: IDF_TARGET == "esp32c2"
temporary: false
reason: esp32c2 does not have RTC memory
disable_test:
- if: IDF_TARGET == "esp32h2"
temporary: true
reason: target esp32h2 is not supported yet

View File

@ -164,7 +164,7 @@ if(CONFIG_SECURE_SIGNED_APPS AND (CONFIG_SECURE_BOOT_V1_ENABLED OR CONFIG_SECURE
target_add_binary_data(${COMPONENT_LIB} "${secure_boot_verification_key}" "BINARY"
RENAME_TO signature_verification_key_bin)
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
APPEND PROPERTY ADDITIONAL_CLEAN_FILES
"${secure_boot_verification_key}")
endif()

View File

@ -120,6 +120,7 @@ esp_err_t bootloader_flash_erase_range(uint32_t start_addr, uint32_t size)
#include "esp32/rom/cache.h"
#endif
#include "esp_rom_spiflash.h"
#include "esp_rom_sys.h"
#include "hal/mmu_hal.h"
#include "hal/mmu_ll.h"
#include "hal/cache_hal.h"

View File

@ -200,6 +200,12 @@ esp_err_t bootloader_init_spi_flash(void)
bootloader_enable_qio_mode();
#endif
// Since the workaround in IDF-6709, the spi_speed value in the bootloader header
// is not the real value, overwrite it.
#if CONFIG_ESPTOOLPY_FLASHFREQ_80M
bootloader_image_hdr.spi_speed = ESP_IMAGE_SPI_SPEED_DIV_1;
#endif
print_flash_info(&bootloader_image_hdr);
update_flash_config(&bootloader_image_hdr);
//ensure the flash is write-protected

View File

@ -1,250 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <assert.h>
#include "string.h"
#include "sdkconfig.h"
#include "esp_err.h"
#include "esp_log.h"
#include "esp_rom_gpio.h"
#include "esp_rom_efuse.h"
#include "esp32h4/rom/gpio.h"
#include "esp32h4/rom/spi_flash.h"
#include "esp32h4/rom/efuse.h"
#include "soc/gpio_periph.h"
#include "soc/efuse_reg.h"
#include "soc/spi_reg.h"
#include "soc/spi_mem_reg.h"
#include "soc/soc_caps.h"
#include "flash_qio_mode.h"
#include "bootloader_flash_config.h"
#include "bootloader_common.h"
#include "bootloader_flash_priv.h"
#include "bootloader_init.h"
#include "hal/mmu_hal.h"
#include "hal/cache_hal.h"
#include "hal/mmu_ll.h"
#define FLASH_IO_MATRIX_DUMMY_40M 0
#define FLASH_IO_MATRIX_DUMMY_80M 0
void bootloader_flash_update_id()
{
esp_rom_spiflash_chip_t *chip = &rom_spiflash_legacy_data->chip;
chip->device_id = bootloader_read_flash_id();
}
void IRAM_ATTR bootloader_flash_cs_timing_config()
{
SET_PERI_REG_MASK(SPI_MEM_USER_REG(0), SPI_MEM_CS_HOLD_M | SPI_MEM_CS_SETUP_M);
SET_PERI_REG_BITS(SPI_MEM_CTRL2_REG(0), SPI_MEM_CS_HOLD_TIME_V, 0, SPI_MEM_CS_HOLD_TIME_S);
SET_PERI_REG_BITS(SPI_MEM_CTRL2_REG(0), SPI_MEM_CS_SETUP_TIME_V, 0, SPI_MEM_CS_SETUP_TIME_S);
SET_PERI_REG_MASK(SPI_MEM_USER_REG(1), SPI_MEM_CS_HOLD_M | SPI_MEM_CS_SETUP_M);
SET_PERI_REG_BITS(SPI_MEM_CTRL2_REG(1), SPI_MEM_CS_HOLD_TIME_V, 1, SPI_MEM_CS_HOLD_TIME_S);
SET_PERI_REG_BITS(SPI_MEM_CTRL2_REG(1), SPI_MEM_CS_SETUP_TIME_V, 0, SPI_MEM_CS_SETUP_TIME_S);
}
void IRAM_ATTR bootloader_flash_clock_config(const esp_image_header_t *pfhdr)
{
uint32_t spi_clk_div = 0;
switch (pfhdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_1:
spi_clk_div = 1;
break;
case ESP_IMAGE_SPI_SPEED_DIV_2:
spi_clk_div = 2;
break;
case ESP_IMAGE_SPI_SPEED_DIV_3:
spi_clk_div = 3;
break;
case ESP_IMAGE_SPI_SPEED_DIV_4:
spi_clk_div = 4;
break;
default:
break;
}
esp_rom_spiflash_config_clk(spi_clk_div, 0);
}
void IRAM_ATTR bootloader_flash_set_dummy_out(void)
{
REG_SET_BIT(SPI_MEM_CTRL_REG(0), SPI_MEM_FDUMMY_OUT | SPI_MEM_D_POL | SPI_MEM_Q_POL);
REG_SET_BIT(SPI_MEM_CTRL_REG(1), SPI_MEM_FDUMMY_OUT | SPI_MEM_D_POL | SPI_MEM_Q_POL);
}
void IRAM_ATTR bootloader_flash_dummy_config(const esp_image_header_t *pfhdr)
{
bootloader_configure_spi_pins(1);
bootloader_flash_set_dummy_out();
}
static const char *TAG = "boot.esp32h4";
void IRAM_ATTR bootloader_configure_spi_pins(int drv)
{
const uint32_t spiconfig = esp_rom_efuse_get_flash_gpio_info();
uint8_t wp_pin = esp_rom_efuse_get_flash_wp_gpio();
uint8_t clk_gpio_num = SPI_CLK_GPIO_NUM;
uint8_t q_gpio_num = SPI_Q_GPIO_NUM;
uint8_t d_gpio_num = SPI_D_GPIO_NUM;
uint8_t cs0_gpio_num = SPI_CS0_GPIO_NUM;
uint8_t hd_gpio_num = SPI_HD_GPIO_NUM;
uint8_t wp_gpio_num = SPI_WP_GPIO_NUM;
if (spiconfig == 0) {
} else {
clk_gpio_num = spiconfig & 0x3f;
q_gpio_num = (spiconfig >> 6) & 0x3f;
d_gpio_num = (spiconfig >> 12) & 0x3f;
cs0_gpio_num = (spiconfig >> 18) & 0x3f;
hd_gpio_num = (spiconfig >> 24) & 0x3f;
wp_gpio_num = wp_pin;
}
esp_rom_gpio_pad_set_drv(clk_gpio_num, drv);
esp_rom_gpio_pad_set_drv(q_gpio_num, drv);
esp_rom_gpio_pad_set_drv(d_gpio_num, drv);
esp_rom_gpio_pad_set_drv(cs0_gpio_num, drv);
if (hd_gpio_num <= MAX_PAD_GPIO_NUM) {
esp_rom_gpio_pad_set_drv(hd_gpio_num, drv);
}
if (wp_gpio_num <= MAX_PAD_GPIO_NUM) {
esp_rom_gpio_pad_set_drv(wp_gpio_num, drv);
}
}
static void update_flash_config(const esp_image_header_t *bootloader_hdr)
{
uint32_t size;
switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB:
size = 1;
break;
case ESP_IMAGE_FLASH_SIZE_2MB:
size = 2;
break;
case ESP_IMAGE_FLASH_SIZE_4MB:
size = 4;
break;
case ESP_IMAGE_FLASH_SIZE_8MB:
size = 8;
break;
case ESP_IMAGE_FLASH_SIZE_16MB:
size = 16;
break;
default:
size = 2;
}
cache_hal_disable(CACHE_TYPE_ALL);
// Set flash chip size
esp_rom_spiflash_config_param(rom_spiflash_legacy_data->chip.device_id, size * 0x100000, 0x10000, 0x1000, 0x100, 0xffff); // TODO: set mode
cache_hal_enable(CACHE_TYPE_ALL);
}
static void print_flash_info(const esp_image_header_t *bootloader_hdr)
{
ESP_EARLY_LOGD(TAG, "magic %02x", bootloader_hdr->magic);
ESP_EARLY_LOGD(TAG, "segments %02x", bootloader_hdr->segment_count);
ESP_EARLY_LOGD(TAG, "spi_mode %02x", bootloader_hdr->spi_mode);
ESP_EARLY_LOGD(TAG, "spi_speed %02x", bootloader_hdr->spi_speed);
ESP_EARLY_LOGD(TAG, "spi_size %02x", bootloader_hdr->spi_size);
const char *str;
switch (bootloader_hdr->spi_speed) {
case ESP_IMAGE_SPI_SPEED_DIV_2:
str = "24MHz";
break;
case ESP_IMAGE_SPI_SPEED_DIV_3:
str = "16MHz";
break;
case ESP_IMAGE_SPI_SPEED_DIV_4:
str = "12MHz";
break;
case ESP_IMAGE_SPI_SPEED_DIV_1:
str = "48MHz";
break;
default:
str = "12MHz";
break;
}
ESP_EARLY_LOGI(TAG, "SPI Speed : %s", str);
/* SPI mode could have been set to QIO during boot already,
so test the SPI registers not the flash header */
uint32_t spi_ctrl = REG_READ(SPI_MEM_CTRL_REG(0));
if (spi_ctrl & SPI_MEM_FREAD_QIO) {
str = "QIO";
} else if (spi_ctrl & SPI_MEM_FREAD_QUAD) {
str = "QOUT";
} else if (spi_ctrl & SPI_MEM_FREAD_DIO) {
str = "DIO";
} else if (spi_ctrl & SPI_MEM_FREAD_DUAL) {
str = "DOUT";
} else if (spi_ctrl & SPI_MEM_FASTRD_MODE) {
str = "FAST READ";
} else {
str = "SLOW READ";
}
ESP_EARLY_LOGI(TAG, "SPI Mode : %s", str);
switch (bootloader_hdr->spi_size) {
case ESP_IMAGE_FLASH_SIZE_1MB:
str = "1MB";
break;
case ESP_IMAGE_FLASH_SIZE_2MB:
str = "2MB";
break;
case ESP_IMAGE_FLASH_SIZE_4MB:
str = "4MB";
break;
case ESP_IMAGE_FLASH_SIZE_8MB:
str = "8MB";
break;
case ESP_IMAGE_FLASH_SIZE_16MB:
str = "16MB";
break;
default:
str = "2MB";
break;
}
ESP_EARLY_LOGI(TAG, "SPI Flash Size : %s", str);
}
static void IRAM_ATTR bootloader_init_flash_configure(void)
{
bootloader_flash_dummy_config(&bootloader_image_hdr);
bootloader_flash_cs_timing_config();
}
static void bootloader_spi_flash_resume(void)
{
bootloader_execute_flash_command(CMD_RESUME, 0, 0, 0);
esp_rom_spiflash_wait_idle(&g_rom_flashchip);
}
esp_err_t bootloader_init_spi_flash(void)
{
bootloader_init_flash_configure();
#ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
const uint32_t spiconfig = esp_rom_efuse_get_flash_gpio_info();
if (spiconfig != ESP_ROM_EFUSE_FLASH_DEFAULT_SPI && spiconfig != ESP_ROM_EFUSE_FLASH_DEFAULT_HSPI) {
ESP_EARLY_LOGE(TAG, "SPI flash pins are overridden. Enable CONFIG_SPI_FLASH_ROM_DRIVER_PATCH in menuconfig");
return ESP_FAIL;
}
#endif
bootloader_spi_flash_resume();
bootloader_flash_unlock();
#if CONFIG_ESPTOOLPY_FLASHMODE_QIO || CONFIG_ESPTOOLPY_FLASHMODE_QOUT
bootloader_enable_qio_mode();
#endif
print_flash_info(&bootloader_image_hdr);
update_flash_config(&bootloader_image_hdr);
//ensure the flash is write-protected
bootloader_enable_wp();
return ESP_OK;
}

View File

@ -18,12 +18,8 @@ typedef enum {
ESP_CHIP_ID_ESP32C3 = 0x0005, /*!< chip ID: ESP32-C3 */
ESP_CHIP_ID_ESP32S3 = 0x0009, /*!< chip ID: ESP32-S3 */
ESP_CHIP_ID_ESP32C2 = 0x000C, /*!< chip ID: ESP32-C2 */
#if CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_2
ESP_CHIP_ID_ESP32H4 = 0x000E, /*!< chip ID: ESP32-H4 Beta2*/ // ESP32H4-TODO: IDF-3475
#elif CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_1
ESP_CHIP_ID_ESP32H4 = 0x000A, /*!< chip ID: ESP32-H4 Beta1 */
#endif
ESP_CHIP_ID_ESP32C6 = 0x000D, /*!< chip ID: ESP32-C6 */
ESP_CHIP_ID_ESP32H2 = 0x0010, /*!< chip ID: ESP32-H2 */
ESP_CHIP_ID_INVALID = 0xFFFF /*!< Invalid chip ID (we defined it to make sure the esp_chip_id_t is 2 bytes size) */
} __attribute__((packed)) esp_chip_id_t;

View File

@ -17,8 +17,6 @@
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32H4
#include "esp32h4/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C6

View File

@ -45,7 +45,7 @@ int bootloader_utility_get_selected_boot_partition(const bootloader_state_t *bs)
* @param[in] bs Bootloader state structure.
* @param[in] start_index The index from which the search for images begins.
*/
__attribute__((noreturn)) void bootloader_utility_load_boot_image(const bootloader_state_t *bs, int start_index);
__attribute__((__noreturn__)) void bootloader_utility_load_boot_image(const bootloader_state_t *bs, int start_index);
#ifdef CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP
/**
@ -65,7 +65,7 @@ void bootloader_utility_load_boot_image_from_deep_sleep(void);
*
* It is not recommended to call this function from an app (if called, the app will abort).
*/
__attribute__((noreturn)) void bootloader_reset(void);
__attribute__((__noreturn__)) void bootloader_reset(void);
/**
* @brief Do any cleanup before exiting the bootloader, before starting the app or resetting

View File

@ -121,22 +121,6 @@ int bootloader_common_select_otadata(const esp_ota_select_entry_t *two_otadata,
#if CONFIG_BOOTLOADER_RESERVE_RTC_MEM
#define RTC_RETAIN_MEM_ADDR (SOC_RTC_DRAM_HIGH - sizeof(rtc_retain_mem_t))
_Static_assert(RTC_RETAIN_MEM_ADDR >= SOC_RTC_DRAM_LOW, "rtc_retain_mem_t structure size is bigger than the RTC memory size. Consider reducing RTC reserved memory size.");
rtc_retain_mem_t *const rtc_retain_mem = (rtc_retain_mem_t *)RTC_RETAIN_MEM_ADDR;
#ifndef BOOTLOADER_BUILD
#include "heap_memory_layout.h"
/* The app needs to be told this memory is reserved, important if configured to use RTC memory as heap.
Note that keeping this macro here only works when other symbols in this file are referenced by the app, as
this feature is otherwise 100% part of the bootloader. However this seems to happen in all apps.
*/
SOC_RESERVE_MEMORY_REGION(RTC_RETAIN_MEM_ADDR, RTC_RETAIN_MEM_ADDR + sizeof(rtc_retain_mem_t), rtc_retain_mem);
#endif
static uint32_t rtc_retain_mem_size(void) {
#ifdef CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC
/* A custom memory has been reserved by the user, do not consider this memory into CRC calculation as it may change without
@ -144,29 +128,31 @@ static uint32_t rtc_retain_mem_size(void) {
* minus the size of everything after (including) `custom` */
return offsetof(rtc_retain_mem_t, custom);
#else
return sizeof(rtc_retain_mem_t) - sizeof(rtc_retain_mem->crc);
return sizeof(rtc_retain_mem_t) - sizeof(bootloader_common_get_rtc_retain_mem()->crc);
#endif
}
static bool is_retain_mem_valid(void)
{
rtc_retain_mem_t* rtc_retain_mem = bootloader_common_get_rtc_retain_mem();
return esp_rom_crc32_le(UINT32_MAX, (uint8_t*)rtc_retain_mem, rtc_retain_mem_size()) == rtc_retain_mem->crc && rtc_retain_mem->crc != UINT32_MAX;
}
static void update_rtc_retain_mem_crc(void)
{
rtc_retain_mem_t* rtc_retain_mem = bootloader_common_get_rtc_retain_mem();
rtc_retain_mem->crc = esp_rom_crc32_le(UINT32_MAX, (uint8_t*)rtc_retain_mem, rtc_retain_mem_size());
}
NOINLINE_ATTR void bootloader_common_reset_rtc_retain_mem(void)
{
hal_memset(rtc_retain_mem, 0, sizeof(rtc_retain_mem_t));
hal_memset(bootloader_common_get_rtc_retain_mem(), 0, sizeof(rtc_retain_mem_t));
}
uint16_t bootloader_common_get_rtc_retain_mem_reboot_counter(void)
{
if (is_retain_mem_valid()) {
return rtc_retain_mem->reboot_counter;
return bootloader_common_get_rtc_retain_mem()->reboot_counter;
}
return 0;
}
@ -176,12 +162,13 @@ void bootloader_common_set_rtc_retain_mem_factory_reset_state(void)
if (!is_retain_mem_valid()) {
bootloader_common_reset_rtc_retain_mem();
}
rtc_retain_mem->flags.factory_reset_state = true;
bootloader_common_get_rtc_retain_mem()->flags.factory_reset_state = true;
update_rtc_retain_mem_crc();
}
bool bootloader_common_get_rtc_retain_mem_factory_reset_state(void)
{
rtc_retain_mem_t* rtc_retain_mem = bootloader_common_get_rtc_retain_mem();
if (is_retain_mem_valid()) {
bool factory_reset_state = rtc_retain_mem->flags.factory_reset_state;
if (factory_reset_state == true) {
@ -196,13 +183,14 @@ bool bootloader_common_get_rtc_retain_mem_factory_reset_state(void)
esp_partition_pos_t* bootloader_common_get_rtc_retain_mem_partition(void)
{
if (is_retain_mem_valid()) {
return &rtc_retain_mem->partition;
return &bootloader_common_get_rtc_retain_mem()->partition;
}
return NULL;
}
void bootloader_common_update_rtc_retain_mem(esp_partition_pos_t* partition, bool reboot_counter)
{
rtc_retain_mem_t* rtc_retain_mem = bootloader_common_get_rtc_retain_mem();
if (reboot_counter) {
if (!is_retain_mem_valid()) {
bootloader_common_reset_rtc_retain_mem();
@ -224,7 +212,14 @@ void bootloader_common_update_rtc_retain_mem(esp_partition_pos_t* partition, boo
rtc_retain_mem_t* bootloader_common_get_rtc_retain_mem(void)
{
return rtc_retain_mem;
#ifdef BOOTLOADER_BUILD
#define RTC_RETAIN_MEM_ADDR (SOC_RTC_DRAM_HIGH - sizeof(rtc_retain_mem_t))
static rtc_retain_mem_t *const s_bootloader_retain_mem = (rtc_retain_mem_t *)RTC_RETAIN_MEM_ADDR;
return s_bootloader_retain_mem;
#else
static __attribute__((section(".bootloader_data_rtc_mem"))) rtc_retain_mem_t s_bootloader_retain_mem;
return &s_bootloader_retain_mem;
#endif // !BOOTLOADER_BUILD
}
#endif // CONFIG_BOOTLOADER_RESERVE_RTC_MEM

View File

@ -27,9 +27,6 @@ int bootloader_clock_get_rated_freq_mhz(void)
#elif CONFIG_IDF_TARGET_ESP32C3
return 160;
#elif CONFIG_IDF_TARGET_ESP32H4
return 96;
#elif CONFIG_IDF_TARGET_ESP32C6
return 160;

View File

@ -8,6 +8,10 @@
#include "esp_cpu.h"
#include "soc/wdev_reg.h"
#if SOC_LP_TIMER_SUPPORTED
#include "hal/lp_timer_hal.h"
#endif
#ifndef BOOTLOADER_BUILD
#include "esp_random.h"
#include "esp_private/periph_ctrl.h"
@ -20,9 +24,14 @@
#else
#if !defined CONFIG_IDF_TARGET_ESP32S3
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 32 * 2) /* extra factor of 2 is precautionary */
#if (defined CONFIG_IDF_TARGET_ESP32C6 || defined CONFIG_IDF_TARGET_ESP32H2)
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 16) // Keep the byte sampling frequency in the ~62KHz range which has been
// tested.
#else
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 32 * 2) /* extra factor of 2 is precautionary */
#endif
#else
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 23) /* 45 KHz reading frequency is the maximum we have tested so far on S3 */
#define RNG_CPU_WAIT_CYCLE_NUM (80 * 23) /* 45 KHz reading frequency is the maximum we have tested so far on S3 */
#endif
__attribute__((weak)) void bootloader_fill_random(void *buffer, size_t length)
@ -34,6 +43,21 @@
assert(buffer != NULL);
for (size_t i = 0; i < length; i++) {
#if SOC_LP_TIMER_SUPPORTED
random = REG_READ(WDEV_RND_REG);
start = esp_cpu_get_cycle_count();
do {
random ^= REG_READ(WDEV_RND_REG);
now = esp_cpu_get_cycle_count();
} while (now - start < RNG_CPU_WAIT_CYCLE_NUM);
// XOR the RT slow clock, which is asynchronous, to add some entropy and improve
// the distribution
uint32_t current_rtc_timer_counter = (lp_timer_hal_get_cycle_count() & 0xFF);
random = random ^ current_rtc_timer_counter;
buffer_bytes[i] = random & 0xFF;
#else
if (i == 0 || i % 4 == 0) { /* redundant check is for a compiler warning */
/* in bootloader with ADC feeding HWRNG, we accumulate 1
bit of entropy per 40 APB cycles (==80 CPU cycles.)
@ -50,6 +74,7 @@
} while (now - start < RNG_CPU_WAIT_CYCLE_NUM);
}
buffer_bytes[i] = random >> ((i % 4) * 8);
#endif
}
}

View File

@ -1,22 +1,99 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
#include "bootloader_random.h"
#include "soc/soc.h"
#include "soc/pcr_reg.h"
#include "soc/apb_saradc_reg.h"
#include "soc/pmu_reg.h"
#include "hal/regi2c_ctrl.h"
#include "soc/regi2c_saradc.h"
#include "esp_log.h"
static const char *TAG = "bootloader_random";
static const uint32_t SAR2_CHANNEL = 9;
static const uint32_t PATTERN_BIT_WIDTH = 6;
static const uint32_t SAR1_ATTEN = 1;
static const uint32_t SAR2_ATTEN = 1;
void bootloader_random_enable(void)
{
// TODO: IDF-5352
ESP_EARLY_LOGW(TAG, "bootloader_random_enable() has not been implemented yet");
// pull SAR ADC out of reset
REG_SET_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_RST_EN);
REG_CLR_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_RST_EN);
// enable SAR ADC APB clock
REG_SET_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_REG_CLK_EN);
// enable ADC_CTRL_CLK (SAR ADC function clock)
REG_SET_BIT(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_EN);
// select XTAL clock (40 MHz) source for ADC_CTRL_CLK
REG_SET_FIELD(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_SEL, 0);
// set the clock divider for ADC_CTRL_CLK to default value (in case it has been changed)
REG_SET_FIELD(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_DIV_NUM, 0);
// some ADC sensor registers are in power group PERIF_I2C and need to be enabled via PMU
SET_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_PERIF_I2C_RSTB);
SET_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_XPD_PERIF_I2C);
// Config ADC circuit (Analog part) with I2C(HOST ID 0x69) and chose internal voltage as sampling source
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_DTEST_RTC_ADDR , 2);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_ENT_RTC_ADDR , 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC1_ENCAL_REF_ADDR, 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC2_ENCAL_REF_ADDR, 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR2_INITIAL_CODE_HIGH_ADDR, 0x08);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR2_INITIAL_CODE_LOW_ADDR, 0x66);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR1_INITIAL_CODE_HIGH_ADDR, 0x08);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR1_INITIAL_CODE_LOW_ADDR, 0x66);
// create patterns and set them in pattern table
uint32_t pattern_one = (SAR2_CHANNEL << 2) | SAR2_ATTEN; // we want channel 9 with max attenuation
uint32_t pattern_two = SAR1_ATTEN; // we want channel 0 with max attenuation, channel doesn't really matter here
uint32_t pattern_table = 0 | (pattern_two << 3 * PATTERN_BIT_WIDTH) | pattern_one << 2 * PATTERN_BIT_WIDTH;
REG_WRITE(APB_SARADC_SAR_PATT_TAB1_REG, pattern_table);
// set pattern length to 2 (APB_SARADC_SAR_PATT_LEN counts from 0)
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_SARADC_SAR_PATT_LEN, 1);
// Same as in C3
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_SARADC_SAR_CLK_DIV, 15);
// set timer expiry (timer is ADC_CTRL_CLK)
REG_SET_FIELD(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_TARGET, 200);
// enable timer
REG_SET_BIT(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_EN);
}
void bootloader_random_disable(void)
{
// TODO: IDF-5352
ESP_EARLY_LOGW(TAG, "bootloader_random_enable() has not been implemented yet");
// disable timer
REG_CLR_BIT(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_EN);
// Write reset value of this register
REG_WRITE(APB_SARADC_SAR_PATT_TAB1_REG, 0xFFFFFF);
// Revert ADC I2C configuration and initial voltage source setting
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR2_INITIAL_CODE_HIGH_ADDR, 0x60);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR2_INITIAL_CODE_LOW_ADDR, 0x0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR1_INITIAL_CODE_HIGH_ADDR, 0x60);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SAR1_INITIAL_CODE_LOW_ADDR, 0x0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_DTEST_RTC_ADDR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC_ENT_RTC_ADDR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC1_ENCAL_REF_ADDR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, ADC_SARADC2_ENCAL_REF_ADDR, 0);
// Revert PMU_RF_PWC_REG to it's initial value
CLEAR_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_PERIF_I2C_RSTB);
// disable ADC_CTRL_CLK (SAR ADC function clock)
REG_WRITE(PCR_SARADC_CLKM_CONF_REG, 0x00404000);
// Set PCR_SARADC_CONF_REG to initial state
REG_WRITE(PCR_SARADC_CONF_REG, 0x5);
}

View File

@ -1,21 +1,88 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
#include "bootloader_random.h"
#include "soc/soc.h"
#include "soc/pcr_reg.h"
#include "soc/apb_saradc_reg.h"
#include "soc/pmu_reg.h"
#include "hal/regi2c_ctrl.h"
#include "soc/regi2c_saradc.h"
#include "esp_log.h"
static const char *TAG = "bootloader_random";
static const uint32_t SAR2_CHANNEL = 9;
static const uint32_t PATTERN_BIT_WIDTH = 6;
static const uint32_t SAR1_ATTEN = 1;
static const uint32_t SAR2_ATTEN = 1;
void bootloader_random_enable(void)
{
// ESP32H2-TODO: IDF-6274
ESP_EARLY_LOGW(TAG, "bootloader_random_enable() has not been implemented yet");
REG_SET_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_RST_EN);
REG_CLR_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_RST_EN);
REG_SET_BIT(PCR_SARADC_CONF_REG, PCR_SARADC_REG_CLK_EN);
REG_SET_BIT(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_EN);
// select XTAL clock (40 MHz) source for ADC_CTRL_CLK
REG_SET_FIELD(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_SEL, 0);
REG_SET_FIELD(PCR_SARADC_CLKM_CONF_REG, PCR_SARADC_CLKM_DIV_NUM, 0);
// some ADC sensor registers are in power group PERIF_I2C and need to be enabled via PMU
SET_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_XPD_PERIF_I2C);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_DTEST, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_ENT_SAR, 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_EN_TOUT_SAR1_BUS, 1);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR2_INIT_CODE_MSB, 0X08);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR2_INIT_CODE_LSB, 0X66);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR1_INIT_CODE_MSB, 0X08);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR1_INIT_CODE_LSB, 0X66);
// create patterns and set them in pattern table
uint32_t pattern_one = (SAR2_CHANNEL << 2) | SAR2_ATTEN;
uint32_t pattern_two = SAR1_ATTEN; // we want channel 0 with max attenuation, channel doesn't really matter here
uint32_t pattern_table = 0 | (pattern_two << 3 * PATTERN_BIT_WIDTH) | pattern_one << 2 * PATTERN_BIT_WIDTH;
REG_WRITE(APB_SARADC_SAR_PATT_TAB1_REG, pattern_table);
// set pattern length to 2 (APB_SARADC_SAR_PATT_LEN counts from 0)
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_SARADC_SAR_PATT_LEN, 0);
// Same as in C3
REG_SET_FIELD(APB_SARADC_CTRL_REG, APB_SARADC_SARADC_SAR_CLK_DIV, 15);
// set timer expiry (timer is ADC_CTRL_CLK)
REG_SET_FIELD(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_TARGET, 200);
// ENABLE_TIMER
REG_SET_BIT(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_EN);
}
void bootloader_random_disable(void)
{
// ESP32H2-TODO: IDF-6274
ESP_EARLY_LOGW(TAG, "bootloader_random_disable() has not been implemented yet");
// disable timer
REG_CLR_BIT(APB_SARADC_CTRL2_REG, APB_SARADC_SARADC_TIMER_EN);
// Write reset value of this register
REG_WRITE(APB_SARADC_SAR_PATT_TAB1_REG, 0xFFFFFF);
// Revert ADC I2C configuration and initial voltage source setting
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR2_INIT_CODE_MSB, 0x60);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR2_INIT_CODE_LSB, 0x0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR1_INIT_CODE_MSB, 0x60);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_SAR1_INIT_CODE_LSB, 0x0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_DTEST, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_ENT_SAR, 0);
REGI2C_WRITE_MASK(I2C_SAR_ADC, I2C_SARADC_EN_TOUT_SAR1_BUS, 0);
// disable ADC_CTRL_CLK (SAR ADC function clock)
REG_WRITE(PCR_SARADC_CLKM_CONF_REG, 0x00404000);
// Set PCR_SARADC_CONF_REG to initial state
REG_WRITE(PCR_SARADC_CONF_REG, 0x5);
}

View File

@ -1,24 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
#include "bootloader_random.h"
#include "esp_log.h"
#include "soc/syscon_reg.h"
#include "soc/rtc_cntl_reg.h"
#include "soc/apb_saradc_reg.h"
#include "soc/system_reg.h"
#include "esp_private/regi2c_ctrl.h"
// ESP32H4-TODO: IDF-3381
void bootloader_random_enable(void)
{
}
void bootloader_random_disable(void)
{
}

View File

@ -28,12 +28,6 @@
#include "esp32c3/rom/uart.h"
#include "esp32c3/rom/gpio.h"
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32H4
#include "esp32h4/rom/efuse.h"
#include "esp32h4/rom/crc.h"
#include "esp32h4/rom/uart.h"
#include "esp32h4/rom/gpio.h"
#include "esp32h4/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/efuse.h"
#include "esp32c2/rom/crc.h"

View File

@ -3,18 +3,10 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
void bootloader_ana_super_wdt_reset_config(bool enable)
{
(void)enable;
}
void bootloader_ana_bod_reset_config(bool enable)
{
(void)enable;
}
//Not supported but common bootloader calls the function. Do nothing
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
(void)enable;

View File

@ -34,6 +34,7 @@
#include "bootloader_mem.h"
#include "bootloader_console.h"
#include "bootloader_flash_priv.h"
#include "bootloader_soc.h"
#include "esp_private/bootloader_flash_internal.h"
#include "esp_efuse.h"
#include "hal/mmu_hal.h"
@ -78,10 +79,19 @@ static void bootloader_super_wdt_auto_feed(void)
REG_WRITE(RTC_CNTL_SWD_WPROTECT_REG, 0);
}
static inline void bootloader_ana_reset_config(void)
{
//Enable super WDT reset.
bootloader_ana_super_wdt_reset_config(true);
//Enable BOD reset
bootloader_ana_bod_reset_config(true);
}
esp_err_t bootloader_init(void)
{
esp_err_t ret = ESP_OK;
bootloader_ana_reset_config();
bootloader_super_wdt_auto_feed();
// In RAM_APP, memory will be initialized in `call_start_cpu0`

View File

@ -3,19 +3,34 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include "soc/rtc_cntl_reg.h"
void bootloader_ana_super_wdt_reset_config(bool enable)
{
(void)enable; // ESP32-C2 has none of these features.
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_SUPER_WDT_RST);
if (enable) {
REG_CLR_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
}
}
void bootloader_ana_bod_reset_config(bool enable)
{
(void)enable; // ESP32-C2 has none of these features.
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOD_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);
} else {
REG_CLR_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);
}
}
//Not supported but common bootloader calls the function. Do nothing
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
(void)enable; // ESP32-C2 has none of these features.
(void)enable;
}

View File

@ -96,29 +96,29 @@ static inline void bootloader_hardware_init(void)
static inline void bootloader_ana_reset_config(void)
{
//Enable super WDT reset.
bootloader_ana_super_wdt_reset_config(true);
/*
For origin chip & ECO1: only support swt reset;
For ECO2: fix brownout reset bug, support swt & brownout reset;
For ECO3: fix clock glitch reset bug, support all reset, include: swt & brownout & clock glitch reset.
For origin chip & ECO1: brownout & clock glitch reset not available
For ECO2: fix brownout reset bug
For ECO3: fix clock glitch reset bug
*/
switch (efuse_hal_chip_revision()) {
case 0:
case 1:
//Enable WDT reset. Disable BOR and GLITCH reset
bootloader_ana_super_wdt_reset_config(true);
//Disable BOD and GLITCH reset
bootloader_ana_bod_reset_config(false);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 2:
//Enable WDT and BOR reset. Disable GLITCH reset
bootloader_ana_super_wdt_reset_config(true);
//Enable BOD reset. Disable GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 3:
default:
//Enable WDT, BOR, and GLITCH reset
bootloader_ana_super_wdt_reset_config(true);
//Enable BOD, and GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(true);
break;

View File

@ -12,15 +12,15 @@ void bootloader_ana_super_wdt_reset_config(bool enable)
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_SUPER_WDT_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_CLR_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
}
}
void bootloader_ana_bod_reset_config(bool enable)
{
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOR_RST);
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOD_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);

View File

@ -103,33 +103,10 @@ static inline void bootloader_hardware_init(void)
static inline void bootloader_ana_reset_config(void)
{
// TODO: IDF-5990 copied from C3, need update
// Have removed bootloader_ana_super_wdt_reset_config for now; can be evaluated later to see whether needs to add it back
/*
For origin chip & ECO1: only support swt reset;
For ECO2: fix brownout reset bug, support swt & brownout reset;
For ECO3: fix clock glitch reset bug, support all reset, include: swt & brownout & clock glitch reset.
*/
uint8_t chip_version = efuse_hal_get_minor_chip_version();
switch (chip_version) {
case 0:
case 1:
//Disable BOR and GLITCH reset
bootloader_ana_bod_reset_config(false);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 2:
//Enable BOR reset. Disable GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 3:
default:
//Enable BOR, and GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(true);
break;
}
//Enable super WDT reset.
bootloader_ana_super_wdt_reset_config(true);
//Enable BOD reset
bootloader_ana_bod_reset_config(true);
}
esp_err_t bootloader_init(void)

View File

@ -1,15 +1,24 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include <assert.h>
#include "soc/soc.h"
#include "soc/lp_analog_peri_reg.h"
void bootloader_ana_super_wdt_reset_config(bool enable)
{
//C6 doesn't support bypass super WDT reset
assert(enable);
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_SUPER_WDT_RST);
}
void bootloader_ana_bod_reset_config(bool enable)
{
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_BOR_RST);
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_BOD_RST);
if (enable) {
REG_SET_BIT(LP_ANALOG_PERI_LP_ANA_BOD_MODE1_CNTL_REG, LP_ANALOG_PERI_LP_ANA_BOD_MODE1_RESET_ENA);
} else {
@ -17,12 +26,8 @@ void bootloader_ana_bod_reset_config(bool enable)
}
}
//Not supported but common bootloader calls the function. Do nothing
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_GLITCH_RST);
if (enable) {
REG_SET_BIT(LP_ANALOG_PERI_LP_ANA_CK_GLITCH_CNTL_REG, LP_ANALOG_PERI_LP_ANA_CK_GLITCH_RESET_ENA);
} else {
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_CK_GLITCH_CNTL_REG, LP_ANALOG_PERI_LP_ANA_CK_GLITCH_RESET_ENA);
}
(void)enable;
}

View File

@ -86,40 +86,16 @@ static void bootloader_super_wdt_auto_feed(void)
static inline void bootloader_hardware_init(void)
{
// TODO: IDF-6267
/* Enable analog i2c master clock */
SET_PERI_REG_MASK(MODEM_LPCON_CLK_CONF_REG, MODEM_LPCON_CLK_I2C_MST_EN);
}
static inline void bootloader_ana_reset_config(void)
{
// TODO: IDF-5990 copied from C6, need update
// Have removed bootloader_ana_super_wdt_reset_config for now; can be evaluated later to see whether needs to add it back
/*
For origin chip & ECO1: only support swt reset;
For ECO2: fix brownout reset bug, support swt & brownout reset;
For ECO3: fix clock glitch reset bug, support all reset, include: swt & brownout & clock glitch reset.
*/
uint8_t chip_version = efuse_hal_get_minor_chip_version();
switch (chip_version) {
case 0:
case 1:
//Disable BOR and GLITCH reset
bootloader_ana_bod_reset_config(false);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 2:
//Enable BOR reset. Disable GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(false);
break;
case 3:
default:
//Enable BOR, and GLITCH reset
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(true);
break;
}
//Enable super WDT reset.
bootloader_ana_super_wdt_reset_config(true);
//Enable BOD reset
bootloader_ana_bod_reset_config(true);
}
esp_err_t bootloader_init(void)

View File

@ -1,20 +1,22 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include "soc/soc.h"
#include "soc/lp_analog_peri_reg.h"
void bootloader_ana_super_wdt_reset_config(bool enable)
{
// ESP32H2 has removed the super wdt
//H2 doesn't support bypass super WDT reset
assert(enable);
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_SUPER_WDT_RST);
}
void bootloader_ana_bod_reset_config(bool enable)
{
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_BOR_RST);
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_BOD_RST);
if (enable) {
REG_SET_BIT(LP_ANALOG_PERI_LP_ANA_BOD_MODE1_CNTL_REG, LP_ANALOG_PERI_LP_ANA_BOD_MODE1_RESET_ENA);
} else {
@ -22,12 +24,8 @@ void bootloader_ana_bod_reset_config(bool enable)
}
}
//Not supported but common bootloader calls the function. Do nothing
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_FIB_ENABLE_REG, LP_ANALOG_PERI_LP_ANA_FIB_GLITCH_RST);
if (enable) {
REG_SET_BIT(LP_ANALOG_PERI_LP_ANA_CK_GLITCH_CNTL_REG, LP_ANALOG_PERI_LP_ANA_CK_GLITCH_RESET_ENA);
} else {
REG_CLR_BIT(LP_ANALOG_PERI_LP_ANA_CK_GLITCH_CNTL_REG, LP_ANALOG_PERI_LP_ANA_CK_GLITCH_RESET_ENA);
}
(void)enable;
}

View File

@ -1,155 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdint.h>
#include "sdkconfig.h"
#include "esp_attr.h"
#include "esp_log.h"
#include "esp_image_format.h"
#include "flash_qio_mode.h"
#include "esp_rom_gpio.h"
#include "esp_rom_efuse.h"
#include "esp_rom_uart.h"
#include "esp_rom_sys.h"
#include "esp_rom_spiflash.h"
#include "soc/efuse_reg.h"
#include "soc/gpio_sig_map.h"
#include "soc/io_mux_reg.h"
#include "soc/assist_debug_reg.h"
#include "esp_cpu.h"
#include "soc/rtc.h"
#include "soc/rtc_cntl_reg.h"
#include "soc/spi_periph.h"
#include "soc/extmem_reg.h"
#include "soc/io_mux_reg.h"
#include "soc/system_reg.h"
#include "esp32h4/rom/efuse.h"
#include "esp32h4/rom/ets_sys.h"
#include "bootloader_common.h"
#include "bootloader_init.h"
#include "bootloader_clock.h"
#include "bootloader_flash_config.h"
#include "bootloader_mem.h"
#include "bootloader_console.h"
#include "bootloader_flash_priv.h"
#include "bootloader_soc.h"
#include "esp_private/bootloader_flash_internal.h"
#include "hal/mmu_hal.h"
#include "hal/cache_hal.h"
static const char *TAG = "boot.esp32h4";
static void wdt_reset_cpu0_info_enable(void)
{
REG_SET_BIT(SYSTEM_CPU_PERI_CLK_EN_REG, SYSTEM_CLK_EN_ASSIST_DEBUG);
REG_CLR_BIT(SYSTEM_CPU_PERI_RST_EN_REG, SYSTEM_RST_EN_ASSIST_DEBUG);
REG_WRITE(ASSIST_DEBUG_CORE_0_RCD_EN_REG, ASSIST_DEBUG_CORE_0_RCD_PDEBUGEN | ASSIST_DEBUG_CORE_0_RCD_RECORDEN);
}
static void wdt_reset_info_dump(int cpu)
{
(void) cpu;
// saved PC was already printed by the ROM bootloader.
// nothing to do here.
}
static void bootloader_check_wdt_reset(void)
{
int wdt_rst = 0;
soc_reset_reason_t rst_reason = esp_rom_get_reset_reason(0);
if (rst_reason == RESET_REASON_CORE_RTC_WDT || rst_reason == RESET_REASON_CORE_MWDT0 || rst_reason == RESET_REASON_CORE_MWDT1 ||
rst_reason == RESET_REASON_CPU0_MWDT0 || rst_reason == RESET_REASON_CPU0_MWDT1 || rst_reason == RESET_REASON_CPU0_RTC_WDT) {
ESP_LOGW(TAG, "PRO CPU has been reset by WDT.");
wdt_rst = 1;
}
if (wdt_rst) {
// if reset by WDT dump info from trace port
wdt_reset_info_dump(0);
}
wdt_reset_cpu0_info_enable();
}
static void bootloader_super_wdt_auto_feed(void)
{
REG_WRITE(RTC_CNTL_SWD_WPROTECT_REG, RTC_CNTL_SWD_WKEY_VALUE);
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_AUTO_FEED_EN);
REG_WRITE(RTC_CNTL_SWD_WPROTECT_REG, 0);
}
static inline void bootloader_hardware_init(void)
{
}
static inline void bootloader_ana_reset_config(void)
{
//Enable WDT, BOR, and GLITCH reset
bootloader_ana_super_wdt_reset_config(true);
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(true);
}
esp_err_t bootloader_init(void)
{
esp_err_t ret = ESP_OK;
bootloader_hardware_init();
bootloader_ana_reset_config();
bootloader_super_wdt_auto_feed();
// In RAM_APP, memory will be initialized in `call_start_cpu0`
#if !CONFIG_APP_BUILD_TYPE_RAM
// protect memory region
bootloader_init_mem();
/* check that static RAM is after the stack */
assert(&_bss_start <= &_bss_end);
assert(&_data_start <= &_data_end);
// clear bss section
bootloader_clear_bss_section();
#endif // !CONFIG_APP_BUILD_TYPE_RAM
// config clock
bootloader_clock_configure();
// initialize console, from now on, we can use esp_log
bootloader_console_init();
/* print 2nd bootloader banner */
bootloader_print_banner();
#if !CONFIG_APP_BUILD_TYPE_PURE_RAM_APP
//init cache hal
cache_hal_init(); //TODO IDF-4649
//init mmu
mmu_hal_init();
// update flash ID
bootloader_flash_update_id();
// Check and run XMC startup flow
if ((ret = bootloader_flash_xmc_startup()) != ESP_OK) {
ESP_LOGE(TAG, "failed when running XMC startup flow, reboot!");
return ret;
}
#if !CONFIG_APP_BUILD_TYPE_RAM
// read bootloader header
if ((ret = bootloader_read_bootloader_header()) != ESP_OK) {
return ret;
}
// read chip revision and check if it's compatible to bootloader
if ((ret = bootloader_check_bootloader_validity()) != ESP_OK) {
return ret;
}
#endif // !CONFIG_APP_BUILD_TYPE_RAM
// initialize spi flash
if ((ret = bootloader_init_spi_flash()) != ESP_OK) {
return ret;
}
#endif // #if !CONFIG_APP_BUILD_TYPE_PURE_RAM_APP
// check whether a WDT reset happend
bootloader_check_wdt_reset();
// config WDT
bootloader_config_wdt();
// enable RNG early entropy source
bootloader_enable_random();
return ret;
}

View File

@ -1,40 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "bootloader_sha.h"
#include <stdbool.h>
#include <string.h>
#include <assert.h>
#include <sys/param.h>
#include "esp32h4/rom/sha.h"
static SHA_CTX ctx;
bootloader_sha256_handle_t bootloader_sha256_start()
{
// Enable SHA hardware
ets_sha_enable();
ets_sha_init(&ctx, SHA2_256);
return &ctx; // Meaningless non-NULL value
}
void bootloader_sha256_data(bootloader_sha256_handle_t handle, const void *data, size_t data_len)
{
assert(handle != NULL);
assert(data_len % 4 == 0);
ets_sha_update(&ctx, data, data_len, false);
}
void bootloader_sha256_finish(bootloader_sha256_handle_t handle, uint8_t *digest)
{
assert(handle != NULL);
if (digest == NULL) {
bzero(&ctx, sizeof(ctx));
return;
}
ets_sha_finish(&ctx, digest);
}

View File

@ -1,41 +0,0 @@
/*
* SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
void bootloader_ana_super_wdt_reset_config(bool enable)
{
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_SUPER_WDT_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_CLR_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
}
}
void bootloader_ana_bod_reset_config(bool enable)
{
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOR_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);
} else {
REG_CLR_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);
}
}
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_GLITCH_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_ANA_CONF_REG, RTC_CNTL_GLITCH_RST_EN);
} else {
REG_CLR_BIT(RTC_CNTL_ANA_CONF_REG, RTC_CNTL_GLITCH_RST_EN);
}
}

View File

@ -1,59 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <strings.h>
#include "esp_flash_encrypt.h"
#include "esp_secure_boot.h"
#include "esp_efuse.h"
#include "esp_efuse_table.h"
#include "esp_log.h"
#include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "flash_encrypt";
esp_err_t esp_flash_encryption_enable_secure_features(void)
{
#ifndef CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_ENC
ESP_LOGI(TAG, "Disable UART bootloader encryption...");
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT);
#else
ESP_LOGW(TAG, "Not disabling UART bootloader encryption");
#endif
#ifndef CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_CACHE
ESP_LOGI(TAG, "Disable UART bootloader cache...");
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DOWNLOAD_ICACHE);
#else
ESP_LOGW(TAG, "Not disabling UART bootloader cache - SECURITY COMPROMISED");
#endif
#ifndef CONFIG_SECURE_BOOT_ALLOW_JTAG
ESP_LOGI(TAG, "Disable JTAG...");
esp_efuse_write_field_bit(ESP_EFUSE_DIS_PAD_JTAG);
esp_efuse_write_field_bit(ESP_EFUSE_DIS_USB_JTAG);
#else
ESP_LOGW(TAG, "Not disabling JTAG - SECURITY COMPROMISED");
#endif
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DIRECT_BOOT);
#if defined(CONFIG_SECURE_BOOT_V2_ENABLED) && !defined(CONFIG_SECURE_BOOT_V2_ALLOW_EFUSE_RD_DIS)
// This bit is set when enabling Secure Boot V2, but we can't enable it until this later point in the first boot
// otherwise the Flash Encryption key cannot be read protected
esp_efuse_write_field_bit(ESP_EFUSE_WR_DIS_RD_DIS);
#endif
#ifndef CONFIG_SECURE_FLASH_SKIP_WRITE_PROTECTION_CACHE
// Set write-protection for DIS_ICACHE to prevent bricking chip in case it will be set accidentally.
// esp32h4 has DIS_ICACHE. Write-protection bit = 2.
// List of eFuses with the same write protection bit:
// DIS_ICACHE, DIS_USB_JTAG, POWERGLITCH_EN, DIS_FORCE_DOWNLOAD, SPI_DOWNLOAD_MSPI_DIS,
// DIS_TWAI, JTAG_SEL_ENABLE, DIS_PAD_JTAG, DIS_DOWNLOAD_MANUAL_ENCRYPT
esp_efuse_write_field_bit(ESP_EFUSE_WR_DIS_DIS_ICACHE);
#endif
return ESP_OK;
}

View File

@ -1,70 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <strings.h>
#include "esp_flash_encrypt.h"
#include "esp_secure_boot.h"
#include "esp_efuse.h"
#include "esp_efuse_table.h"
#include "esp_log.h"
#include "sdkconfig.h"
static __attribute__((unused)) const char *TAG = "secure_boot";
esp_err_t esp_secure_boot_enable_secure_features(void)
{
esp_efuse_write_field_bit(ESP_EFUSE_DIS_DIRECT_BOOT);
#ifdef CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE
ESP_LOGI(TAG, "Enabling Security download mode...");
esp_err_t err = esp_efuse_enable_rom_secure_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not enable Security download mode...");
return err;
}
#elif CONFIG_SECURE_DISABLE_ROM_DL_MODE
ESP_LOGI(TAG, "Disable ROM Download mode...");
esp_err_t err = esp_efuse_disable_rom_download_mode();
if (err != ESP_OK) {
ESP_LOGE(TAG, "Could not disable ROM Download mode...");
return err;
}
#else
ESP_LOGW(TAG, "UART ROM Download mode kept enabled - SECURITY COMPROMISED");
#endif
#ifndef CONFIG_SECURE_BOOT_ALLOW_JTAG
ESP_LOGI(TAG, "Disable hardware & software JTAG...");
esp_efuse_write_field_bit(ESP_EFUSE_DIS_PAD_JTAG);
esp_efuse_write_field_bit(ESP_EFUSE_DIS_USB_JTAG);
esp_efuse_write_field_cnt(ESP_EFUSE_SOFT_DIS_JTAG, ESP_EFUSE_SOFT_DIS_JTAG[0]->bit_count);
#else
ESP_LOGW(TAG, "Not disabling JTAG - SECURITY COMPROMISED");
#endif
#ifdef CONFIG_SECURE_BOOT_ENABLE_AGGRESSIVE_KEY_REVOKE
esp_efuse_write_field_bit(ESP_EFUSE_SECURE_BOOT_AGGRESSIVE_REVOKE);
#endif
esp_efuse_write_field_bit(ESP_EFUSE_SECURE_BOOT_EN);
#ifndef CONFIG_SECURE_BOOT_V2_ALLOW_EFUSE_RD_DIS
bool rd_dis_now = true;
#ifdef CONFIG_SECURE_FLASH_ENC_ENABLED
/* If flash encryption is not enabled yet then don't read-disable efuses yet, do it later in the boot
when Flash Encryption is being enabled */
rd_dis_now = esp_flash_encryption_enabled();
#endif
if (rd_dis_now) {
ESP_LOGI(TAG, "Prevent read disabling of additional efuses...");
esp_efuse_write_field_bit(ESP_EFUSE_WR_DIS_RD_DIS);
}
#else
ESP_LOGW(TAG, "Allowing read disabling of additional efuses - SECURITY COMPROMISED");
#endif
return ESP_OK;
}

View File

@ -3,18 +3,10 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdbool.h>
void bootloader_ana_super_wdt_reset_config(bool enable)
{
(void)enable;
}
void bootloader_ana_bod_reset_config(bool enable)
{
(void)enable;
}
//Not supported but common bootloader calls the function. Do nothing
void bootloader_ana_clock_glitch_reset_config(bool enable)
{
(void)enable;

View File

@ -130,7 +130,7 @@ static void bootloader_super_wdt_auto_feed(void)
static inline void bootloader_ana_reset_config(void)
{
//Enable WDT, BOR, and GLITCH reset
//Enable WDT, BOD, and GLITCH reset
bootloader_ana_super_wdt_reset_config(true);
bootloader_ana_bod_reset_config(true);
bootloader_ana_clock_glitch_reset_config(true);

View File

@ -12,15 +12,15 @@ void bootloader_ana_super_wdt_reset_config(bool enable)
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_SUPER_WDT_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_CLR_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
} else {
REG_SET_BIT(RTC_CNTL_SWD_CONF_REG, RTC_CNTL_SWD_BYPASS_RST);
}
}
void bootloader_ana_bod_reset_config(bool enable)
{
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOR_RST);
REG_CLR_BIT(RTC_CNTL_FIB_SEL_REG, RTC_CNTL_FIB_BOD_RST);
if (enable) {
REG_SET_BIT(RTC_CNTL_BROWN_OUT_REG, RTC_CNTL_BROWN_OUT_ANA_RST_EN);

View File

@ -29,8 +29,6 @@
#include "esp32s3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32H4
#include "esp32h4/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/rtc.h"
#include "esp32c2/rom/secure_boot.h"

View File

@ -13,8 +13,6 @@
#include "esp32c3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32H4
#include "esp32h4/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C2
#include "esp32c2/rom/secure_boot.h"
#elif CONFIG_IDF_TARGET_ESP32C6

View File

@ -4,8 +4,7 @@ cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers")
list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults")
list(PREPEND SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers" "sdkconfig.defaults")
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
set(COMPONENTS main)

View File

@ -4,8 +4,7 @@ cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers")
list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults")
list(PREPEND SDKCONFIG_DEFAULTS "$ENV{IDF_PATH}/tools/test_apps/configs/sdkconfig.debug_helpers" "sdkconfig.defaults")
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
set(COMPONENTS main)

View File

@ -9,6 +9,7 @@ from pytest_embedded import Dut
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32c6
@pytest.mark.esp32h2
@pytest.mark.esp32s2
@pytest.mark.esp32s3
def test_rtc_reserved_memory(dut: Dut) -> None:

View File

@ -17,10 +17,6 @@ if(CONFIG_BT_ENABLED)
list(APPEND srcs "controller/esp32c3/bt.c")
list(APPEND include_dirs include/esp32c3/include)
elseif(CONFIG_IDF_TARGET_ESP32H4)
list(APPEND srcs "controller/esp32h4/bt.c")
list(APPEND include_dirs include/esp32h4/include)
elseif(CONFIG_IDF_TARGET_ESP32C2)
list(APPEND srcs "controller/esp32c2/bt.c")
list(APPEND include_dirs include/esp32c2/include)
@ -532,9 +528,11 @@ if(CONFIG_BT_ENABLED)
host/nimble/nimble/nimble/host/services/gap/include
host/nimble/nimble/nimble/host/services/gatt/include
host/nimble/nimble/nimble/host/services/hr/include
host/nimble/nimble/nimble/host/services/htp/include
host/nimble/nimble/nimble/host/services/ias/include
host/nimble/nimble/nimble/host/services/ipss/include
host/nimble/nimble/nimble/host/services/lls/include
host/nimble/nimble/nimble/host/services/prox/include
host/nimble/nimble/nimble/host/services/tps/include
host/nimble/nimble/nimble/host/util/include
host/nimble/nimble/nimble/host/store/ram/include
@ -549,10 +547,12 @@ if(CONFIG_BT_ENABLED)
"host/nimble/nimble/nimble/host/services/ipss/src/ble_svc_ipss.c"
"host/nimble/nimble/nimble/host/services/ans/src/ble_svc_ans.c"
"host/nimble/nimble/nimble/host/services/hr/src/ble_svc_hr.c"
"host/nimble/nimble/nimble/host/services/htp/src/ble_svc_htp.c"
"host/nimble/nimble/nimble/host/services/gap/src/ble_svc_gap.c"
"host/nimble/nimble/nimble/host/services/bas/src/ble_svc_bas.c"
"host/nimble/nimble/nimble/host/services/dis/src/ble_svc_dis.c"
"host/nimble/nimble/nimble/host/services/lls/src/ble_svc_lls.c"
"host/nimble/nimble/nimble/host/services/prox/src/ble_svc_prox.c"
"host/nimble/nimble/nimble/host/src/ble_hs_conn.c"
"host/nimble/nimble/nimble/host/src/ble_store_util.c"
"host/nimble/nimble/nimble/host/src/ble_sm.c"
@ -716,15 +716,6 @@ if(CONFIG_BT_ENABLED)
target_link_directories(${COMPONENT_LIB} INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c3_family/esp32s3")
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
elseif(CONFIG_IDF_TARGET_ESP32H4)
if(CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_1)
# TODO: rename esp32h2 to esp32h4 [BT-2875]
add_prebuilt_library(libble_app "controller/lib_esp32h2/esp32h2-bt-lib/beta1/libble_app.a")
elseif(CONFIG_IDF_TARGET_ESP32H4_BETA_VERSION_2)
# TODO: rename esp32h2 to esp32h4 [BT-2875]
add_prebuilt_library(libble_app "controller/lib_esp32h2/esp32h2-bt-lib/beta2/libble_app.a")
endif()
target_link_libraries(${COMPONENT_LIB} PRIVATE libble_app)
elseif(CONFIG_IDF_TARGET_ESP32C2)
add_prebuilt_library(libble_app "controller/lib_esp32c2/esp32c2-bt-lib/libble_app.a")
target_link_libraries(${COMPONENT_LIB} PRIVATE libble_app)

View File

@ -111,7 +111,6 @@ typedef struct {
typedef struct {
void *handle;
void *storage;
} btdm_queue_item_t;
/* OSI function */
@ -555,17 +554,8 @@ static void *semphr_create_wrapper(uint32_t max, uint32_t init)
void *handle = NULL;
#if !CONFIG_SPIRAM_USE_MALLOC
/* IDF FreeRTOS guarantees that all dynamic memory allocation goes to internal RAM. */
handle = (void *)xSemaphoreCreateCounting(max, init);
#else
StaticQueue_t *queue_buffer = NULL;
queue_buffer = heap_caps_malloc(sizeof(StaticQueue_t), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(queue_buffer);
semphr->storage = queue_buffer;
handle = (void *)xSemaphoreCreateCountingStatic(max, init, queue_buffer);
#endif
assert(handle);
#if CONFIG_BTDM_CTRL_HLI
@ -601,11 +591,6 @@ static void semphr_delete_wrapper(void *semphr)
if (handle) {
vSemaphoreDelete(handle);
}
#ifdef CONFIG_SPIRAM_USE_MALLOC
if (semphr_item->storage) {
free(semphr_item->storage);
}
#endif
free(semphr);
}
@ -691,18 +676,9 @@ static void *queue_create_wrapper(uint32_t queue_len, uint32_t item_size)
queue = (btdm_queue_item_t*)heap_caps_malloc(sizeof(btdm_queue_item_t), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(queue);
#if CONFIG_SPIRAM_USE_MALLOC
queue->storage = heap_caps_calloc(1, sizeof(StaticQueue_t) + (queue_len*item_size), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(queue->storage);
queue->handle = xQueueCreateStatic( queue_len, item_size, ((uint8_t*)(queue->storage)) + sizeof(StaticQueue_t), (StaticQueue_t*)(queue->storage));
assert(queue->handle);
#else
/* IDF FreeRTOS guarantees that all dynamic memory allocation goes to internal RAM. */
queue->handle = xQueueCreate( queue_len, item_size);
assert(queue->handle);
#endif
return queue;
}
@ -714,13 +690,6 @@ static void queue_delete_wrapper(void *queue)
if(queue_item->handle){
vQueueDelete(queue_item->handle);
}
#if CONFIG_SPIRAM_USE_MALLOC
if (queue_item->storage) {
free(queue_item->storage);
}
#endif
free(queue_item);
}
}
@ -895,7 +864,11 @@ static void *malloc_internal_wrapper(size_t size)
static int32_t IRAM_ATTR read_mac_wrapper(uint8_t mac[6])
{
return esp_read_mac(mac, ESP_MAC_BT);
int ret = esp_read_mac(mac, ESP_MAC_BT);
ESP_LOGI(BTDM_LOG_TAG, "Bluetooth MAC: %02x:%02x:%02x:%02x:%02x:%02x",
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
return ret;
}
static void IRAM_ATTR srand_wrapper(unsigned int seed)

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -54,6 +54,8 @@
#include "soc/syscon_reg.h"
#include "soc/dport_access.h"
#include "hal/efuse_ll.h"
/* Macro definition
************************************************************************
*/
@ -139,6 +141,7 @@ extern int ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv);
extern int ble_txpwr_set(esp_ble_enhanced_power_type_t power_type, uint16_t handle, int power_level);
extern int ble_txpwr_get(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
extern int ble_get_npl_element_info(esp_bt_controller_config_t *cfg, ble_npl_count_info_t * npl_info);
extern void bt_track_pll_cap(void);
extern uint32_t _bt_bss_start;
extern uint32_t _bt_bss_end;
extern uint32_t _nimble_bss_start;
@ -170,7 +173,9 @@ static int esp_intr_free_wrapper(void **ret_handle);
static void osi_assert_wrapper(const uint32_t ln, const char *fn, uint32_t param1, uint32_t param2);
static uint32_t osi_random_wrapper(void);
static void esp_reset_rpa_moudle(void);
static int esp_ecc_gen_key_pair(uint8_t *pub, uint8_t *priv);
static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey);
/* Local variable definition
***************************************************************************
*/
@ -223,9 +228,10 @@ struct ext_funcs_t ext_funcs_ro = {
._task_delete = task_delete_wrapper,
._osi_assert = osi_assert_wrapper,
._os_random = osi_random_wrapper,
._ecc_gen_key_pair = ble_sm_alg_gen_key_pair,
._ecc_gen_dh_key = ble_sm_alg_gen_dhkey,
._ecc_gen_key_pair = esp_ecc_gen_key_pair,
._ecc_gen_dh_key = esp_ecc_gen_dh_key,
._esp_reset_rpa_moudle = esp_reset_rpa_moudle,
._esp_bt_track_pll_cap = bt_track_pll_cap,
.magic = EXT_FUNC_MAGIC_VALUE,
};
@ -348,6 +354,25 @@ static void task_delete_wrapper(void *task_handle)
vTaskDelete(task_handle);
}
static int esp_ecc_gen_key_pair(uint8_t *pub, uint8_t *priv)
{
int rc = -1;
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
rc = ble_sm_alg_gen_key_pair(pub, priv);
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
return rc;
}
static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey)
{
int rc = -1;
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
rc = ble_sm_alg_gen_dhkey(peer_pub_key_x, peer_pub_key_y, our_priv_key, out_dhkey);
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
return rc;
}
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
static void hci_uart_start_tx_wrapper(int uart_no)
{
@ -815,8 +840,8 @@ esp_err_t esp_bt_mem_release(esp_bt_mode_t mode)
{
intptr_t mem_start, mem_end;
if (mode == ESP_BT_MODE_BLE) {
mem_start = (intptr_t)&_bt_bss_start;
if (mode & ESP_BT_MODE_BLE) {
mem_start = (intptr_t)&_bt_bss_start;
mem_end = (intptr_t)&_bt_bss_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release BT BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
@ -831,18 +856,18 @@ esp_err_t esp_bt_mem_release(esp_bt_mode_t mode)
}
mem_start = (intptr_t)&_nimble_bss_start;
mem_end = (intptr_t)&_nimble_bss_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
mem_end = (intptr_t)&_nimble_bss_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE BSS [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
mem_start = (intptr_t)&_nimble_data_start;
mem_end = (intptr_t)&_nimble_data_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE Data [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
mem_start = (intptr_t)&_nimble_data_start;
mem_end = (intptr_t)&_nimble_data_end;
if (mem_start != mem_end) {
ESP_LOGD(NIMBLE_PORT_LOG_TAG, "Release NimBLE Data [0x%08x] - [0x%08x]", mem_start, mem_end);
ESP_ERROR_CHECK(try_heap_caps_add_region(mem_start, mem_end));
}
}
return ESP_OK;
@ -970,6 +995,11 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
return (esp_power_level_t)tx_level;
}
uint8_t esp_ble_get_chip_rev_version(void)
{
return efuse_ll_get_chip_wafer_version_minor();
}
#if (!CONFIG_BT_NIMBLE_ENABLED) && (CONFIG_BT_CONTROLLER_ENABLED == true)

View File

@ -135,7 +135,6 @@ typedef struct vhci_host_callback {
typedef struct {
void *handle;
void *storage;
} btdm_queue_item_t;
typedef void (* osi_intr_handler)(void);
@ -511,16 +510,10 @@ static void *semphr_create_wrapper(uint32_t max, uint32_t init)
btdm_queue_item_t *semphr = heap_caps_calloc(1, sizeof(btdm_queue_item_t), MALLOC_CAP_8BIT|MALLOC_CAP_INTERNAL);
assert(semphr);
#if !CONFIG_SPIRAM_USE_MALLOC
/* IDF FreeRTOS guarantees that all dynamic memory allocation goes to internal RAM. */
semphr->handle = (void *)xSemaphoreCreateCounting(max, init);
#else
semphr->storage = heap_caps_malloc(sizeof(StaticQueue_t), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(semphr->storage);
semphr->handle = (void *)xSemaphoreCreateCountingStatic(max, init, semphr->storage);
#endif
assert(semphr->handle);
return semphr;
}
@ -535,11 +528,6 @@ static void semphr_delete_wrapper(void *semphr)
if (semphr_item->handle) {
vSemaphoreDelete(semphr_item->handle);
}
#ifdef CONFIG_SPIRAM_USE_MALLOC
if (semphr_item->storage) {
free(semphr_item->storage);
}
#endif
free(semphr);
}
@ -595,18 +583,9 @@ static void *queue_create_wrapper(uint32_t queue_len, uint32_t item_size)
queue = (btdm_queue_item_t*)heap_caps_malloc(sizeof(btdm_queue_item_t), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(queue);
#if CONFIG_SPIRAM_USE_MALLOC
queue->storage = heap_caps_calloc(1, sizeof(StaticQueue_t) + (queue_len*item_size), MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
assert(queue->storage);
queue->handle = xQueueCreateStatic( queue_len, item_size, ((uint8_t*)(queue->storage)) + sizeof(StaticQueue_t), (StaticQueue_t*)(queue->storage));
assert(queue->handle);
#else
/* IDF FreeRTOS guarantees that all dynamic memory allocation goes to internal RAM. */
queue->handle = xQueueCreate( queue_len, item_size);
assert(queue->handle);
#endif
return queue;
}
@ -618,13 +597,6 @@ static void queue_delete_wrapper(void *queue)
if(queue_item->handle){
vQueueDelete(queue_item->handle);
}
#if CONFIG_SPIRAM_USE_MALLOC
if (queue_item->storage) {
free(queue_item->storage);
}
#endif
free(queue_item);
}
}

View File

@ -260,6 +260,19 @@ config BT_LE_CONTROLLER_TASK_STACK_SIZE
help
This configures stack size of NimBLE controller task
config BT_LE_CONTROLLER_LOG_ENABLED
bool "Controller log enable"
default n
help
Enable controller log module
config BT_LE_CONTROLLER_LOG_DUMP_ONLY
bool "Controller log dump mode only"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default y
help
Only operate in dump mode
config BT_LE_LL_RESOLV_LIST_SIZE
int "BLE LL Resolving list size"
range 1 5
@ -340,7 +353,7 @@ config BT_LE_LL_SCA
config BT_LE_MAX_CONNECTIONS
int "Maximum number of concurrent connections"
depends on !BT_NIMBLE_ENABLED
range 1 9
range 1 70
default 3
help
Defines maximum number of concurrent BLE connections. For ESP32, user
@ -395,6 +408,26 @@ choice BT_LE_WAKEUP_SOURCE
Use BLE rtc timer to wakeup CPU
endchoice
choice BT_LE_LP_CLK_SRC
prompt "BLE low power clock source"
default BT_LE_LP_CLK_SRC_MAIN_XTAL
config BT_LE_LP_CLK_SRC_MAIN_XTAL
bool "Use main XTAL as RTC clock source"
help
User main XTAL as RTC clock source.
This option is recommended if external 32.768k XTAL is not available.
Using the external 32.768 kHz XTAL will have lower current consumption
in light sleep compared to using the main XTAL.
config BT_LE_LP_CLK_SRC_DEFAULT
bool "Use system RTC slow clock source"
help
Use the same slow clock source as system RTC
Using any clock source other than external 32.768 kHz XTAL supports only
legacy ADV and SCAN due to low clock accuracy.
endchoice
config BT_LE_USE_ESP_TIMER
bool "Enable Esp Timer for Callout"
depends on !BT_NIMBLE_ENABLED
@ -402,3 +435,74 @@ config BT_LE_USE_ESP_TIMER
help
Set this option to use Esp Timer which has higher priority timer
instead of FreeRTOS timer
config BT_LE_SCAN_DUPL
bool "BLE Scan Duplicate Options"
default y
help
This select enables parameters setting of BLE scan duplicate.
choice BT_LE_SCAN_DUPL_TYPE
prompt "Scan Duplicate Type"
default BT_LE_SCAN_DUPL_TYPE_DEVICE
depends on BT_LE_SCAN_DUPL
help
Scan duplicate have three ways. one is "Scan Duplicate By Device Address", This way is to use
advertiser address filtering. The adv packet of the same address is only allowed to be reported once.
Another way is "Scan Duplicate By Device Address And Advertising Data". This way is to use advertising
data and device address filtering. All different adv packets with the same address are allowed to be
reported. The last way is "Scan Duplicate By Advertising Data". This way is to use advertising data
filtering. All same advertising data only allow to be reported once even though they are from
different devices.
config BT_LE_SCAN_DUPL_TYPE_DEVICE
bool "Scan Duplicate By Device Address"
help
This way is to use advertiser address filtering. The adv packet of the same address is only
allowed to be reported once
config BT_LE_SCAN_DUPL_TYPE_DATA
bool "Scan Duplicate By Advertising Data"
help
This way is to use advertising data filtering. All same advertising data only allow to be reported
once even though they are from different devices.
config BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE
bool "Scan Duplicate By Device Address And Advertising Data"
help
This way is to use advertising data and device address filtering. All different adv packets with
the same address are allowed to be reported.
endchoice
config BT_LE_SCAN_DUPL_TYPE
int
depends on BT_LE_SCAN_DUPL
default 0 if BT_LE_SCAN_DUPL_TYPE_DEVICE
default 1 if BT_LE_SCAN_DUPL_TYPE_DATA
default 2 if BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE
default 0
config BT_LE_SCAN_DUPL_CACHE_SIZE
int "Maximum number of devices in scan duplicate filter"
depends on BT_LE_SCAN_DUPL
range 10 1000
default 100
help
Maximum number of devices which can be recorded in scan duplicate filter.
When the maximum amount of device in the filter is reached, the cache will be refreshed.
config BT_LE_SCAN_DUPL_CACHE_REFRESH_PERIOD
int "Duplicate scan list refresh period (seconds)"
depends on BT_LE_SCAN_DUPL
range 0 1000
default 0
help
If the period value is non-zero, the controller will periodically clear the device information
stored in the scan duuplicate filter. If it is 0, the scan duuplicate filter will not be cleared
until the scanning is disabled. Duplicate advertisements for this period should not be sent to the
Host in advertising report events.
There are two scenarios where the ADV packet will be repeatedly reported:
1. The duplicate scan cache is full, the controller will delete the oldest device information and
add new device information.
2. When the refresh period is up, the controller will clear all device information and start filtering
again.

View File

@ -40,6 +40,10 @@
#include "hci_uart.h"
#include "bt_osi_mem.h"
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#include "esp_private/sleep_retention.h"
#endif
#ifdef CONFIG_BT_BLUEDROID_ENABLED
#include "hci/hci_hal.h"
#endif // CONFIG_BT_BLUEDROID_ENABLED
@ -50,6 +54,8 @@
#include "esp_private/periph_ctrl.h"
#include "esp_sleep.h"
#include "hal/efuse_hal.h"
/* Macro definition
************************************************************************
*/
@ -104,12 +110,20 @@ struct ext_funcs_t {
uint32_t magic;
};
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
typedef void (*interface_func_t) (uint32_t len, const uint8_t*addr, bool end);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
/* External functions or variables
************************************************************************
*/
extern int ble_osi_coex_funcs_register(struct osi_coex_funcs_t *coex_funcs);
extern int ble_controller_init(esp_bt_controller_config_t *cfg);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
extern int ble_log_init_async(interface_func_t bt_controller_log_interface, bool task_create);
extern int ble_log_deinit_async(void);
extern void ble_log_async_output_dump_all(bool output);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
extern int ble_controller_deinit(void);
extern int ble_controller_enable(uint8_t mode);
extern int ble_controller_disable(void);
@ -124,7 +138,10 @@ extern uint32_t r_os_cputime_get32(void);
extern uint32_t r_os_cputime_ticks_to_usecs(uint32_t ticks);
extern void ble_lll_rfmgmt_set_sleep_cb(void *s_cb, void *w_cb, void *s_arg,
void *w_arg, uint32_t us_to_enabled);
extern void ble_rtc_wake_up_state_clr(void);
extern void r_ble_rtc_wake_up_state_clr(void);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
extern const sleep_retention_entries_config_t *esp_ble_mac_retention_link_get(uint8_t *size, uint8_t extra);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
extern int os_msys_init(void);
extern void os_msys_buf_free(void);
extern int ble_sm_alg_gen_dhkey(const uint8_t *peer_pub_key_x,
@ -167,7 +184,12 @@ static int esp_intr_free_wrapper(void **ret_handle);
static void osi_assert_wrapper(const uint32_t ln, const char *fn, uint32_t param1, uint32_t param2);
static uint32_t osi_random_wrapper(void);
static void esp_reset_rpa_moudle(void);
static int esp_ecc_gen_key_pair(uint8_t *pub, uint8_t *priv);
static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, bool end);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
/* Local variable definition
***************************************************************************
*/
@ -175,6 +197,10 @@ static void esp_reset_rpa_moudle(void);
static DRAM_ATTR esp_bt_controller_status_t ble_controller_status = ESP_BT_CONTROLLER_STATUS_IDLE;
/* This variable tells if BLE is running */
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
static bool s_ble_backed_up = false;
#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE
static bool s_ble_active = false;
#ifdef CONFIG_PM_ENABLE
static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL;
@ -182,11 +208,13 @@ static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL;
#endif // CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#define BLE_RTC_DELAY_US (1100)
#define BLE_RTC_DELAY_US_LIGHT_SLEEP (2500)
#define BLE_RTC_DELAY_US_MODEM_SLEEP (500)
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#define BLE_RTC_DELAY_US (0)
#define BLE_RTC_DELAY_US_LIGHT_SLEEP (2000)
#define BLE_RTC_DELAY_US_MODEM_SLEEP (0)
static void ble_sleep_timer_callback(void *arg);
static DRAM_ATTR esp_timer_handle_t s_ble_sleep_timer = NULL;
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
@ -218,8 +246,8 @@ struct ext_funcs_t ext_funcs_ro = {
._task_delete = task_delete_wrapper,
._osi_assert = osi_assert_wrapper,
._os_random = osi_random_wrapper,
._ecc_gen_key_pair = ble_sm_alg_gen_key_pair,
._ecc_gen_dh_key = ble_sm_alg_gen_dhkey,
._ecc_gen_key_pair = esp_ecc_gen_key_pair,
._ecc_gen_dh_key = esp_ecc_gen_dh_key,
._esp_reset_rpa_moudle = esp_reset_rpa_moudle,
.magic = EXT_FUNC_MAGIC_VALUE,
};
@ -335,6 +363,42 @@ static void task_delete_wrapper(void *task_handle)
vTaskDelete(task_handle);
}
static int esp_ecc_gen_key_pair(uint8_t *pub, uint8_t *priv)
{
int rc = -1;
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
rc = ble_sm_alg_gen_key_pair(pub, priv);
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
return rc;
}
static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey)
{
int rc = -1;
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
rc = ble_sm_alg_gen_dhkey(peer_pub_key_x, peer_pub_key_y, our_priv_key, out_dhkey);
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
return rc;
}
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, bool end)
{
if (!end) {
for (int i = 0; i < len; i++) {
esp_rom_printf("%02x,", addr[i]);
}
} else {
for (int i = 0; i < len; i++) {
esp_rom_printf("%02x,", addr[i]);
}
esp_rom_printf("\n");
}
}
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
static void hci_uart_start_tx_wrapper(int uart_no)
{
@ -406,8 +470,7 @@ IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
if (!s_ble_active) {
return;
}
#ifdef CONFIG_PM_ENABLE
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
uint32_t delta_tick;
uint32_t us_to_sleep;
@ -428,7 +491,7 @@ IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
esp_err_t err = esp_timer_start_once(s_ble_sleep_timer,
us_to_sleep - BTDM_MIN_TIMER_UNCERTAINTY_US);
if (err != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ESP timer start failed\n");
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ESP timer start failed");
return;
}
}
@ -437,11 +500,15 @@ IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
r_ble_rtc_wake_up_state_clr();
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#if SOC_PM_RETENTION_HAS_CLOCK_BUG
sleep_retention_do_extra_retention(true);
s_ble_backed_up = true;
#endif // SOC_PM_RETENTION_HAS_CLOCK_BUG
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
esp_phy_disable();
#ifdef CONFIG_PM_ENABLE
esp_pm_lock_release(s_pm_lock);
#endif // CONFIG_PM_ENABLE
esp_phy_disable();
s_ble_active = false;
}
@ -450,37 +517,58 @@ IRAM_ATTR void controller_wakeup_cb(void *arg)
if (s_ble_active) {
return;
}
esp_phy_enable();
#ifdef CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_pm_lock_acquire(s_pm_lock);
r_ble_rtc_wake_up_state_clr();
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE && SOC_PM_RETENTION_HAS_CLOCK_BUG
sleep_retention_do_extra_retention(false);
s_ble_backed_up = false;
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE && SOC_PM_RETENTION_HAS_CLOCK_BUG */
#endif //CONFIG_PM_ENABLE
esp_phy_enable();
s_ble_active = true;
}
#ifdef CONFIG_PM_ENABLE
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
static void ble_sleep_timer_callback(void * arg)
{
esp_pm_lock_acquire(s_pm_lock);
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
esp_err_t sleep_modem_ble_mac_modem_state_init(uint8_t extra)
{
uint8_t size;
const sleep_retention_entries_config_t *ble_mac_modem_config = esp_ble_mac_retention_link_get(&size, extra);
esp_err_t err = sleep_retention_entries_create(ble_mac_modem_config, size, REGDMA_LINK_PRI_5, SLEEP_RETENTION_MODULE_BLE_MAC);
if (err == ESP_OK) {
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Modem BLE MAC retention initialization");
}
return err;
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#endif // CONFIG_PM_ENABLE
static void sleep_modem_ble_mac_modem_state_deinit(void)
{
sleep_retention_entries_destroy(SLEEP_RETENTION_MODULE_BLE_MAC);
}
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
esp_err_t controller_sleep_init(void)
{
esp_err_t rc = 0;
#ifdef CONFIG_BT_LE_SLEEP_ENABLE
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled\n");
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled");
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
500 + BLE_RTC_DELAY_US);
#ifdef CONFIG_PM_ENABLE
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_ON);
#endif // CONFIG_PM_ENABLE
BLE_RTC_DELAY_US_LIGHT_SLEEP);
#else
ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
BLE_RTC_DELAY_US_MODEM_SLEEP);
#endif /* FREERTOS_USE_TICKLESS_IDLE */
#endif // CONFIG_BT_LE_SLEEP_ENABLE
#ifdef CONFIG_PM_ENABLE
@ -489,7 +577,7 @@ esp_err_t controller_sleep_init(void)
goto error;
}
esp_pm_lock_acquire(s_pm_lock);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
esp_timer_create_args_t create_args = {
.callback = ble_sleep_timer_callback,
@ -503,20 +591,23 @@ esp_err_t controller_sleep_init(void)
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is ESP timer");
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
/* Create a new regdma link for BLE related register restoration */
rc = sleep_modem_ble_mac_modem_state_init(1);
assert(rc == 0);
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_enable_bt_wakeup();
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is BLE timer");
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
return rc;
error:
/*lock should release first and then delete*/
if (s_pm_lock != NULL) {
esp_pm_lock_release(s_pm_lock);
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
}
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_disable_bt_wakeup();
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
if (s_ble_sleep_timer != NULL) {
esp_timer_stop(s_ble_sleep_timer);
@ -524,34 +615,30 @@ error:
s_ble_sleep_timer = NULL;
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_disable_bt_wakeup();
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#endif //CONFIG_PM_ENABLE
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
/*lock should release first and then delete*/
if (s_pm_lock != NULL) {
esp_pm_lock_release(s_pm_lock);
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
}
#endif // CONFIG_PM_ENABLE
return rc;
}
void controller_sleep_deinit(void)
{
#ifdef CONFIG_PM_ENABLE
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
if (s_ble_backed_up) {
sleep_retention_module_deinit();
s_ble_backed_up = false;
}
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
r_ble_rtc_wake_up_state_clr();
esp_sleep_disable_bt_wakeup();
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_AUTO);
/* lock should be released first */
if (s_ble_active) {
esp_pm_lock_release(s_pm_lock);
}
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
sleep_modem_ble_mac_modem_state_deinit();
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
if (s_ble_sleep_timer != NULL) {
esp_timer_stop(s_ble_sleep_timer);
@ -559,9 +646,83 @@ void controller_sleep_deinit(void)
s_ble_sleep_timer = NULL;
}
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#ifdef CONFIG_PM_ENABLE
/* lock should be released first */
esp_pm_lock_release(s_pm_lock);
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
#endif //CONFIG_PM_ENABLE
}
typedef enum {
FILTER_DUPLICATE_PDUTYPE = BIT(0),
FILTER_DUPLICATE_LENGTH = BIT(1),
FILTER_DUPLICATE_ADDRESS = BIT(2),
FILTER_DUPLICATE_ADVDATA = BIT(3),
FILTER_DUPLICATE_DEFAULT = FILTER_DUPLICATE_PDUTYPE | FILTER_DUPLICATE_ADDRESS,
FILTER_DUPLICATE_PDU_ALL = 0xF,
FILTER_DUPLICATE_EXCEPTION_FOR_MESH = BIT(4),
FILTER_DUPLICATE_AD_TYPE = BIT(5),
}disc_duplicate_mode_t;
extern void filter_duplicate_mode_enable(disc_duplicate_mode_t mode);
extern void filter_duplicate_mode_disable(disc_duplicate_mode_t mode);
extern void filter_duplicate_set_ring_list_max_num(uint32_t max_num);
extern void scan_duplicate_cache_refresh_set_time(uint32_t period_time);
int
ble_vhci_disc_duplicate_mode_enable(int mode)
{
// TODO: use vendor hci to update
filter_duplicate_mode_enable(mode);
return true;
}
int
ble_vhci_disc_duplicate_mode_disable(int mode)
{
// TODO: use vendor hci to update
filter_duplicate_mode_disable(mode);
return true;
}
int ble_vhci_disc_duplicate_set_max_cache_size(int max_cache_size){
// TODO: use vendor hci to update
filter_duplicate_set_ring_list_max_num(max_cache_size);
return true;
}
int ble_vhci_disc_duplicate_set_period_refresh_time(int refresh_period_time){
// TODO: use vendor hci to update
scan_duplicate_cache_refresh_set_time(refresh_period_time);
return true;
}
/**
* @brief Config scan duplicate option mode from menuconfig (Adapt to the old configuration method.)
*/
void ble_controller_scan_duplicate_config(void)
{
uint32_t duplicate_mode = FILTER_DUPLICATE_DEFAULT;
uint32_t cache_size = CONFIG_BT_LE_SCAN_DUPL_CACHE_SIZE;
if (CONFIG_BT_LE_SCAN_DUPL_TYPE == 0) {
duplicate_mode = FILTER_DUPLICATE_ADDRESS | FILTER_DUPLICATE_PDUTYPE;
} else if (CONFIG_BT_LE_SCAN_DUPL_TYPE == 1) {
duplicate_mode = FILTER_DUPLICATE_ADVDATA;
} else if (CONFIG_BT_LE_SCAN_DUPL_TYPE == 2) {
duplicate_mode = FILTER_DUPLICATE_ADDRESS | FILTER_DUPLICATE_ADVDATA;
}
duplicate_mode |= FILTER_DUPLICATE_EXCEPTION_FOR_MESH;
ble_vhci_disc_duplicate_mode_disable(0xFFFFFFFF);
ble_vhci_disc_duplicate_mode_enable(duplicate_mode);
ble_vhci_disc_duplicate_set_max_cache_size(cache_size);
ble_vhci_disc_duplicate_set_period_refresh_time(CONFIG_BT_LE_SCAN_DUPL_CACHE_REFRESH_PERIOD);
}
esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
{
uint8_t mac[6];
@ -623,10 +784,36 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
*/
ble_npl_eventq_init(nimble_port_get_dflt_eventq());
#endif // CONFIG_BT_NIMBLE_ENABLED
/* Enable BT-related clocks */
modem_clock_module_enable(PERIPH_BT_MODULE);
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL, 249);
/* Select slow clock source for BT momdule */
#if CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using main XTAL as clock source");
uint32_t chip_version = efuse_hal_chip_revision();
if (chip_version == 0) {
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL, (400 - 1));
} else{
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL, (5 - 1));
}
#else
#if CONFIG_RTC_CLK_SRC_INT_RC
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using 136 kHz RC as clock source, can only run legacy ADV or SCAN due to low clock accuracy!");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_RC_SLOW, (5 - 1));
#elif CONFIG_RTC_CLK_SRC_EXT_CRYS
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using external 32.768 kHz XTAL as clock source");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_XTAL32K, (1 - 1));
#elif CONFIG_RTC_CLK_SRC_INT_RC32K
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using 32 kHz RC as clock source, can only run legacy ADV or SCAN due to low clock accuracy!");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_RC32K, (1 - 1));
#elif CONFIG_RTC_CLK_SRC_EXT_OSC
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using 32 kHz oscillator as clock source, can only run legacy ADV or SCAN due to low clock accuracy!");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_EXT32K, (1 - 1));
#else
ESP_LOGE(NIMBLE_PORT_LOG_TAG, "Unsupported clock source");
assert(0);
#endif
#endif /* CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL */
esp_phy_modem_init();
esp_phy_enable();
esp_btbb_enable();
@ -648,12 +835,27 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
goto free_controller;
}
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
interface_func_t bt_controller_log_interface;
bt_controller_log_interface = esp_bt_controller_log_interface;
#if CONFIG_BT_LE_CONTROLLER_LOG_DUMP_ONLY
ret = ble_log_init_async(bt_controller_log_interface, false);
#else
ret = ble_log_init_async(bt_controller_log_interface, true);
#endif // CONFIG_BT_CONTROLLER_LOG_DUMP
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_log_init failed %d", ret);
goto free_controller;
}
#endif // CONFIG_BT_CONTROLLER_LOG_ENABLED
ble_controller_scan_duplicate_config();
ret = controller_sleep_init();
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "controller_sleep_init failed %d", ret);
goto free_controller;
}
ESP_ERROR_CHECK(esp_read_mac((uint8_t *)mac, ESP_MAC_BT));
swap_in_place(mac, 6);
esp_ble_ll_set_public_addr(mac);
@ -666,6 +868,9 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
free_controller:
controller_sleep_deinit();
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_controller_deinit();
esp_btbb_disable();
esp_phy_disable();
@ -704,6 +909,9 @@ esp_err_t esp_bt_controller_deinit(void)
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
modem_clock_module_disable(PERIPH_BT_MODULE);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_controller_deinit();
#if CONFIG_BT_NIMBLE_ENABLED
@ -983,6 +1191,13 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
return (esp_power_level_t)tx_level;
}
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
void esp_ble_controller_log_dump_all(bool output)
{
ble_log_async_output_dump_all(output);
}
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
#if (!CONFIG_BT_NIMBLE_ENABLED) && (CONFIG_BT_CONTROLLER_ENABLED == true)
#define BLE_SM_KEY_ERR 0x17

View File

@ -260,6 +260,19 @@ config BT_LE_CONTROLLER_TASK_STACK_SIZE
help
This configures stack size of NimBLE controller task
config BT_LE_CONTROLLER_LOG_ENABLED
bool "Controller log enable"
default n
help
Enable controller log module
config BT_LE_CONTROLLER_LOG_DUMP_ONLY
bool "Controller log dump mode only"
depends on BT_LE_CONTROLLER_LOG_ENABLED
default y
help
Only operate in dump mode
config BT_LE_LL_RESOLV_LIST_SIZE
int "BLE LL Resolving list size"
range 1 5
@ -340,7 +353,7 @@ config BT_LE_LL_SCA
config BT_LE_MAX_CONNECTIONS
int "Maximum number of concurrent connections"
depends on !BT_NIMBLE_ENABLED
range 1 9
range 1 35
default 3
help
Defines maximum number of concurrent BLE connections. For ESP32, user
@ -395,6 +408,26 @@ choice BT_LE_WAKEUP_SOURCE
Use BLE rtc timer to wakeup CPU
endchoice
choice BT_LE_LP_CLK_SRC
prompt "BLE low power clock source"
default BT_LE_LP_CLK_SRC_MAIN_XTAL
config BT_LE_LP_CLK_SRC_MAIN_XTAL
bool "Use main XTAL as RTC clock source"
help
User main XTAL as RTC clock source.
This option is recommended if external 32.768k XTAL is not available.
Using the external 32.768 kHz XTAL will have lower current consumption
in light sleep compared to using the main XTAL.
config BT_LE_LP_CLK_SRC_DEFAULT
bool "Use system RTC slow clock source"
help
Use the same slow clock source as system RTC
Using any clock source other than external 32.768 kHz XTAL supports only
legacy ADV and SCAN due to low clock accuracy.
endchoice
config BT_LE_USE_ESP_TIMER
bool "Enable Esp Timer for Callout"
depends on !BT_NIMBLE_ENABLED
@ -402,3 +435,75 @@ config BT_LE_USE_ESP_TIMER
help
Set this option to use Esp Timer which has higher priority timer
instead of FreeRTOS timer
config BT_LE_SCAN_DUPL
bool "BLE Scan Duplicate Options"
default y
help
This select enables parameters setting of BLE scan duplicate.
choice BT_LE_SCAN_DUPL_TYPE
prompt "Scan Duplicate Type"
default BT_LE_SCAN_DUPL_TYPE_DEVICE
depends on BT_LE_SCAN_DUPL
help
Scan duplicate have three ways. one is "Scan Duplicate By Device Address", This way is to use
advertiser address filtering. The adv packet of the same address is only allowed to be reported once.
Another way is "Scan Duplicate By Device Address And Advertising Data". This way is to use advertising
data and device address filtering. All different adv packets with the same address are allowed to be
reported. The last way is "Scan Duplicate By Advertising Data". This way is to use advertising data
filtering. All same advertising data only allow to be reported once even though they are from
different devices.
config BT_LE_SCAN_DUPL_TYPE_DEVICE
bool "Scan Duplicate By Device Address"
help
This way is to use advertiser address filtering. The adv packet of the same address is only
allowed to be reported once
config BT_LE_SCAN_DUPL_TYPE_DATA
bool "Scan Duplicate By Advertising Data"
help
This way is to use advertising data filtering. All same advertising data only allow to be reported
once even though they are from different devices.
config BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE
bool "Scan Duplicate By Device Address And Advertising Data"
help
This way is to use advertising data and device address filtering. All different adv packets with
the same address are allowed to be reported.
endchoice
config BT_LE_SCAN_DUPL_TYPE
int
depends on BT_LE_SCAN_DUPL
default 0 if BT_LE_SCAN_DUPL_TYPE_DEVICE
default 1 if BT_LE_SCAN_DUPL_TYPE_DATA
default 2 if BT_LE_SCAN_DUPL_TYPE_DATA_DEVICE
default 0
config BT_LE_SCAN_DUPL_CACHE_SIZE
int "Maximum number of devices in scan duplicate filter"
depends on BT_LE_SCAN_DUPL
range 10 1000
default 100
help
Maximum number of devices which can be recorded in scan duplicate filter.
When the maximum amount of device in the filter is reached, the cache will be refreshed.
config BT_LE_SCAN_DUPL_CACHE_REFRESH_PERIOD
int "Duplicate scan list refresh period (seconds)"
depends on BT_LE_SCAN_DUPL
range 0 1000
default 0
help
If the period value is non-zero, the controller will periodically clear the device information
stored in the scan duuplicate filter. If it is 0, the scan duuplicate filter will not be cleared
until the scanning is disabled. Duplicate advertisements for this period should not be sent to the
Host in advertising report events.
There are two scenarios where the ADV packet will be repeatedly reported:
1. The duplicate scan cache is full, the controller will delete the oldest device information and
add new device information.
2. When the refresh period is up, the controller will clear all device information and start filtering
again.

View File

@ -40,6 +40,10 @@
#include "hci_uart.h"
#include "bt_osi_mem.h"
#if SOC_PM_RETENTION_HAS_CLOCK_BUG
#include "esp_private/sleep_retention.h"
#endif
#ifdef CONFIG_BT_BLUEDROID_ENABLED
#include "hci/hci_hal.h"
#endif // CONFIG_BT_BLUEDROID_ENABLED
@ -49,7 +53,6 @@
#include "esp_private/periph_ctrl.h"
#include "esp_sleep.h"
/* Macro definition
************************************************************************
*/
@ -104,12 +107,19 @@ struct ext_funcs_t {
uint32_t magic;
};
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
typedef void (*interface_func_t) (uint32_t len, const uint8_t*addr, bool end);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
/* External functions or variables
************************************************************************
*/
extern int ble_osi_coex_funcs_register(struct osi_coex_funcs_t *coex_funcs);
extern int ble_controller_init(esp_bt_controller_config_t *cfg);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
extern int ble_log_init_async(interface_func_t bt_controller_log_interface, bool task_create);
extern int ble_log_deinit_async(void);
extern void ble_log_async_output_dump_all(bool output);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
extern int ble_controller_deinit(void);
extern int ble_controller_enable(uint8_t mode);
extern int ble_controller_disable(void);
@ -122,9 +132,12 @@ extern void npl_freertos_mempool_deinit(void);
extern int os_msys_buf_alloc(void);
extern uint32_t r_os_cputime_get32(void);
extern uint32_t r_os_cputime_ticks_to_usecs(uint32_t ticks);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
extern const sleep_retention_entries_config_t *esp_ble_mac_retention_link_get(uint8_t *size, uint8_t extra);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
extern void ble_lll_rfmgmt_set_sleep_cb(void *s_cb, void *w_cb, void *s_arg,
void *w_arg, uint32_t us_to_enabled);
extern void ble_rtc_wake_up_state_clr(void);
extern void r_ble_rtc_wake_up_state_clr(void);
extern int os_msys_init(void);
extern void os_msys_buf_free(void);
extern int ble_sm_alg_gen_dhkey(const uint8_t *peer_pub_key_x,
@ -167,7 +180,12 @@ static int esp_intr_free_wrapper(void **ret_handle);
static void osi_assert_wrapper(const uint32_t ln, const char *fn, uint32_t param1, uint32_t param2);
static uint32_t osi_random_wrapper(void);
static void esp_reset_rpa_moudle(void);
static int esp_ecc_gen_key_pair(uint8_t *pub, uint8_t *priv);
static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, bool end);
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
/* Local variable definition
***************************************************************************
*/
@ -182,11 +200,13 @@ static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL;
#endif // CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#define BLE_RTC_DELAY_US (1100)
#define BLE_RTC_DELAY_US_LIGHT_SLEEP (5100)
#define BLE_RTC_DELAY_US_MODEM_SLEEP (1500)
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#define BLE_RTC_DELAY_US (0)
#define BLE_RTC_DELAY_US_LIGHT_SLEEP (2000)
#define BLE_RTC_DELAY_US_MODEM_SLEEP (0)
static void ble_sleep_timer_callback(void *arg);
static DRAM_ATTR esp_timer_handle_t s_ble_sleep_timer = NULL;
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
@ -218,8 +238,8 @@ struct ext_funcs_t ext_funcs_ro = {
._task_delete = task_delete_wrapper,
._osi_assert = osi_assert_wrapper,
._os_random = osi_random_wrapper,
._ecc_gen_key_pair = ble_sm_alg_gen_key_pair,
._ecc_gen_dh_key = ble_sm_alg_gen_dhkey,
._ecc_gen_key_pair = esp_ecc_gen_key_pair,
._ecc_gen_dh_key = esp_ecc_gen_dh_key,
._esp_reset_rpa_moudle = esp_reset_rpa_moudle,
.magic = EXT_FUNC_MAGIC_VALUE,
};
@ -335,6 +355,42 @@ static void task_delete_wrapper(void *task_handle)
vTaskDelete(task_handle);
}
static int esp_ecc_gen_key_pair(uint8_t *pub, uint8_t *priv)
{
int rc = -1;
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
rc = ble_sm_alg_gen_key_pair(pub, priv);
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
return rc;
}
static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer_pub_key_y,
const uint8_t *our_priv_key, uint8_t *out_dhkey)
{
int rc = -1;
#if CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
rc = ble_sm_alg_gen_dhkey(peer_pub_key_x, peer_pub_key_y, our_priv_key, out_dhkey);
#endif // CONFIG_BT_LE_SM_LEGACY || CONFIG_BT_LE_SM_SC
return rc;
}
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
static void esp_bt_controller_log_interface(uint32_t len, const uint8_t *addr, bool end)
{
if (!end) {
for (int i = 0; i < len; i++) {
esp_rom_printf("%02x,", addr[i]);
}
} else {
for (int i = 0; i < len; i++) {
esp_rom_printf("%02x,", addr[i]);
}
esp_rom_printf("\n");
}
}
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
static void hci_uart_start_tx_wrapper(int uart_no)
{
@ -406,8 +462,7 @@ IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
if (!s_ble_active) {
return;
}
#ifdef CONFIG_PM_ENABLE
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
uint32_t delta_tick;
uint32_t us_to_sleep;
@ -437,11 +492,14 @@ IRAM_ATTR void controller_sleep_cb(uint32_t enable_tick, void *arg)
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
r_ble_rtc_wake_up_state_clr();
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#if SOC_PM_RETENTION_HAS_CLOCK_BUG
sleep_retention_do_extra_retention(true);
#endif // SOC_PM_RETENTION_HAS_CLOCK_BUG
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
esp_phy_disable();
#ifdef CONFIG_PM_ENABLE
esp_pm_lock_release(s_pm_lock);
#endif // CONFIG_PM_ENABLE
esp_phy_disable();
s_ble_active = false;
}
@ -450,37 +508,58 @@ IRAM_ATTR void controller_wakeup_cb(void *arg)
if (s_ble_active) {
return;
}
esp_phy_enable();
#ifdef CONFIG_PM_ENABLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_pm_lock_acquire(s_pm_lock);
r_ble_rtc_wake_up_state_clr();
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE && SOC_PM_RETENTION_HAS_CLOCK_BUG
sleep_retention_do_extra_retention(false);
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE && SOC_PM_RETENTION_HAS_CLOCK_BUG */
#endif //CONFIG_PM_ENABLE
esp_phy_enable();
s_ble_active = true;
}
#ifdef CONFIG_PM_ENABLE
#ifdef CONFIG_FREERTOS_USE_TICKLESS_IDLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
static void ble_sleep_timer_callback(void * arg)
{
esp_pm_lock_acquire(s_pm_lock);
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
static esp_err_t sleep_modem_ble_mac_modem_state_init(uint8_t extra)
{
uint8_t size;
const sleep_retention_entries_config_t *ble_mac_modem_config = esp_ble_mac_retention_link_get(&size, extra);
esp_err_t err = sleep_retention_entries_create(ble_mac_modem_config, size, REGDMA_LINK_PRI_5, SLEEP_RETENTION_MODULE_BLE_MAC);
if (err == ESP_OK) {
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Modem BLE MAC retention initialization");
}
return err;
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#endif // CONFIG_PM_ENABLE
static void sleep_modem_ble_mac_modem_state_deinit(void)
{
sleep_retention_entries_destroy(SLEEP_RETENTION_MODULE_BLE_MAC);
}
#endif // CONFIG_FREERTOS_USE_TICKLESS_IDLE
esp_err_t controller_sleep_init(void)
{
esp_err_t rc = 0;
#ifdef CONFIG_BT_LE_SLEEP_ENABLE
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled\n");
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled");
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
500 + BLE_RTC_DELAY_US);
#ifdef CONFIG_PM_ENABLE
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_ON);
#endif // CONFIG_PM_ENABLE
BLE_RTC_DELAY_US_LIGHT_SLEEP);
#else
ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
BLE_RTC_DELAY_US_MODEM_SLEEP);
#endif /* FREERTOS_USE_TICKLESS_IDLE */
#endif // CONFIG_BT_LE_SLEEP_ENABLE
#ifdef CONFIG_PM_ENABLE
@ -489,7 +568,7 @@ esp_err_t controller_sleep_init(void)
goto error;
}
esp_pm_lock_acquire(s_pm_lock);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
esp_timer_create_args_t create_args = {
.callback = ble_sleep_timer_callback,
@ -503,20 +582,23 @@ esp_err_t controller_sleep_init(void)
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is ESP timer");
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
/* Create a new regdma link for BLE related register restoration */
rc = sleep_modem_ble_mac_modem_state_init(1);
assert(rc == 0);
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_enable_bt_wakeup();
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "Enable light sleep, the wake up source is BLE timer");
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
return rc;
error:
/*lock should release first and then delete*/
if (s_pm_lock != NULL) {
esp_pm_lock_release(s_pm_lock);
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
}
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_disable_bt_wakeup();
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
if (s_ble_sleep_timer != NULL) {
esp_timer_stop(s_ble_sleep_timer);
@ -524,34 +606,26 @@ error:
s_ble_sleep_timer = NULL;
}
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_disable_bt_wakeup();
#endif // CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
#endif //CONFIG_PM_ENABLE
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
/*lock should release first and then delete*/
if (s_pm_lock != NULL) {
esp_pm_lock_release(s_pm_lock);
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
}
#endif // CONFIG_PM_ENABLE
return rc;
}
void controller_sleep_deinit(void)
{
#ifdef CONFIG_PM_ENABLE
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
r_ble_rtc_wake_up_state_clr();
esp_sleep_disable_bt_wakeup();
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_BLE_RTC_TIMER
esp_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_AUTO);
/* lock should be released first */
if (s_ble_active) {
esp_pm_lock_release(s_pm_lock);
}
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
sleep_modem_ble_mac_modem_state_deinit();
#ifdef CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
if (s_ble_sleep_timer != NULL) {
esp_timer_stop(s_ble_sleep_timer);
@ -559,33 +633,81 @@ void controller_sleep_deinit(void)
s_ble_sleep_timer = NULL;
}
#endif //CONFIG_BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE */
#ifdef CONFIG_PM_ENABLE
/* lock should be released first */
esp_pm_lock_release(s_pm_lock);
esp_pm_lock_delete(s_pm_lock);
s_pm_lock = NULL;
#endif //CONFIG_PM_ENABLE
}
#define REG_MODEM_SYSCON_BASE 0x600A5400
#define REG_MODEM_LPCON_BASE 0x600AD000
#define DR_REG_MODEM_SYSCON_BASE REG_MODEM_SYSCON_BASE
typedef enum {
FILTER_DUPLICATE_PDUTYPE = BIT(0),
FILTER_DUPLICATE_LENGTH = BIT(1),
FILTER_DUPLICATE_ADDRESS = BIT(2),
FILTER_DUPLICATE_ADVDATA = BIT(3),
FILTER_DUPLICATE_DEFAULT = FILTER_DUPLICATE_PDUTYPE | FILTER_DUPLICATE_ADDRESS,
FILTER_DUPLICATE_PDU_ALL = 0xF,
FILTER_DUPLICATE_EXCEPTION_FOR_MESH = BIT(4),
FILTER_DUPLICATE_AD_TYPE = BIT(5),
}disc_duplicate_mode_t;
#define MODEM_SYSCON_CLK_CONF_REG (DR_REG_MODEM_SYSCON_BASE + 0x4)
#define MODEM_SYSCON_CLK_CONF1_REG (DR_REG_MODEM_SYSCON_BASE + 0x10)
#define MODEM_LPCON_CLK_CONF_REG (REG_MODEM_LPCON_BASE + 0x0008)
#define MODEM_LPCON_CLK_CONF_FORCE_ON_REG (REG_MODEM_LPCON_BASE + 0x000C)
#include "hal/clk_tree_ll.h"
extern void filter_duplicate_mode_enable(disc_duplicate_mode_t mode);
extern void filter_duplicate_mode_disable(disc_duplicate_mode_t mode);
extern void filter_duplicate_set_ring_list_max_num(uint32_t max_num);
extern void scan_duplicate_cache_refresh_set_time(uint32_t period_time);
static void enable_chip_clk(void)
int
ble_vhci_disc_duplicate_mode_enable(int mode)
{
WRITE_PERI_REG(MODEM_SYSCON_CLK_CONF_REG,0xFFFFFFFF);
WRITE_PERI_REG(MODEM_SYSCON_CLK_CONF1_REG,0xFFFFFFFF);
WRITE_PERI_REG(MODEM_LPCON_CLK_CONF_REG ,0xFFFFFFFF);
// SET BIT for BLE RTC clk
SET_PERI_REG_MASK(PMU_HP_SLEEP_LP_CK_POWER_REG,PMU_HP_SLEEP_XPD_XTAL32K);
// REG_SET_FIELD(LP_CLKRST_LPPERI_REG,LP_CLKRST_LP_SEL_XTAL32K,1);
// REG_SET_FIELD(LP_CLKRST_LPPERI_REG,LP_CLKRST_LP_BLETIMER_DIV_NUM,0);
// TODO: use vendor hci to update
filter_duplicate_mode_enable(mode);
return true;
}
/* For chip */
WRITE_PERI_REG(MODEM_LPCON_CLK_CONF_REG ,0xFFFFFFFF);
WRITE_PERI_REG(MODEM_LPCON_CLK_CONF_FORCE_ON_REG ,0xFFFFFFFF);
int
ble_vhci_disc_duplicate_mode_disable(int mode)
{
// TODO: use vendor hci to update
filter_duplicate_mode_disable(mode);
return true;
}
int ble_vhci_disc_duplicate_set_max_cache_size(int max_cache_size){
// TODO: use vendor hci to update
filter_duplicate_set_ring_list_max_num(max_cache_size);
return true;
}
int ble_vhci_disc_duplicate_set_period_refresh_time(int refresh_period_time){
// TODO: use vendor hci to update
scan_duplicate_cache_refresh_set_time(refresh_period_time);
return true;
}
/**
* @brief Config scan duplicate option mode from menuconfig (Adapt to the old configuration method.)
*/
void ble_controller_scan_duplicate_config(void)
{
uint32_t duplicate_mode = FILTER_DUPLICATE_DEFAULT;
uint32_t cache_size = CONFIG_BT_LE_SCAN_DUPL_CACHE_SIZE;
if (CONFIG_BT_LE_SCAN_DUPL_TYPE == 0) {
duplicate_mode = FILTER_DUPLICATE_ADDRESS | FILTER_DUPLICATE_PDUTYPE;
} else if (CONFIG_BT_LE_SCAN_DUPL_TYPE == 1) {
duplicate_mode = FILTER_DUPLICATE_ADVDATA;
} else if (CONFIG_BT_LE_SCAN_DUPL_TYPE == 2) {
duplicate_mode = FILTER_DUPLICATE_ADDRESS | FILTER_DUPLICATE_ADVDATA;
}
duplicate_mode |= FILTER_DUPLICATE_EXCEPTION_FOR_MESH;
ble_vhci_disc_duplicate_mode_disable(0xFFFFFFFF);
ble_vhci_disc_duplicate_mode_enable(duplicate_mode);
ble_vhci_disc_duplicate_set_max_cache_size(cache_size);
ble_vhci_disc_duplicate_set_period_refresh_time(CONFIG_BT_LE_SCAN_DUPL_CACHE_REFRESH_PERIOD);
}
esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
@ -612,8 +734,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
return ret;
}
enable_chip_clk();
/* Initialize the function pointers for OS porting */
npl_freertos_funcs_init();
struct npl_funcs_t *p_npl_funcs = npl_freertos_funcs_get();
@ -653,9 +773,28 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
#endif // CONFIG_BT_NIMBLE_ENABLED
/* Enable BT-related clocks */
// modem_clock_module_enable(PERIPH_BT_MODULE);
// modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL, 249);
// esp_phy_modem_init();
modem_clock_module_enable(PERIPH_BT_MODULE);
#if CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using main XTAL as clock source");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL, (320 - 1));
#else
#if CONFIG_RTC_CLK_SRC_INT_RC
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using 136 kHz RC as clock source, can only run legacy ADV or SCAN due to low clock accuracy!");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_RC_SLOW, (5 - 1));
#elif CONFIG_RTC_CLK_SRC_EXT_CRYS
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using external 32.768 kHz XTAL as clock source");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_XTAL32K, (1 - 1));
#elif CONFIG_RTC_CLK_SRC_INT_RC32K
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using 32 kHz RC as clock source, can only run legacy ADV or SCAN due to low clock accuracy!");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_RC32K, (1 - 1));
#elif CONFIG_RTC_CLK_SRC_EXT_OSC
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using 32 kHz oscillator as clock source, can only run legacy ADV or SCAN due to low clock accuracy!");
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_EXT32K, (1 - 1));
#else
ESP_LOGE(NIMBLE_PORT_LOG_TAG, "Unsupported clock source");
assert(0);
#endif
#endif /* CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL */
esp_phy_enable();
esp_btbb_enable();
s_ble_active = true;
@ -676,6 +815,22 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
goto free_controller;
}
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
interface_func_t bt_controller_log_interface;
bt_controller_log_interface = esp_bt_controller_log_interface;
#if CONFIG_BT_LE_CONTROLLER_LOG_DUMP_ONLY
ret = ble_log_init_async(bt_controller_log_interface, false);
#else
ret = ble_log_init_async(bt_controller_log_interface, true);
#endif // CONFIG_BT_CONTROLLER_LOG_DUMP
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_log_init failed %d", ret);
goto free_controller;
}
#endif // CONFIG_BT_CONTROLLER_LOG_ENABLED
ble_controller_scan_duplicate_config();
ret = controller_sleep_init();
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "controller_sleep_init failed %d", ret);
@ -694,12 +849,14 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
free_controller:
controller_sleep_deinit();
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_controller_deinit();
esp_btbb_disable();
esp_phy_disable();
// esp_phy_modem_deinit();
// modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
// modem_clock_module_disable(PERIPH_BT_MODULE);
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
modem_clock_module_disable(PERIPH_BT_MODULE);
#if CONFIG_BT_NIMBLE_ENABLED
ble_npl_eventq_deinit(nimble_port_get_dflt_eventq());
#endif // CONFIG_BT_NIMBLE_ENABLED
@ -728,10 +885,12 @@ esp_err_t esp_bt_controller_deinit(void)
esp_phy_disable();
s_ble_active = false;
}
// esp_phy_modem_deinit();
// modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
// modem_clock_module_disable(PERIPH_BT_MODULE);
modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
modem_clock_module_disable(PERIPH_BT_MODULE);
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_log_deinit_async();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
ble_controller_deinit();
#if CONFIG_BT_NIMBLE_ENABLED
@ -1011,6 +1170,13 @@ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t po
return (esp_power_level_t)tx_level;
}
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
void esp_ble_controller_log_dump_all(bool output)
{
ble_log_async_output_dump_all(output);
}
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
#if (!CONFIG_BT_NIMBLE_ENABLED) && (CONFIG_BT_CONTROLLER_ENABLED == true)
#define BLE_SM_KEY_ERR 0x17

View File

@ -1,392 +0,0 @@
menu "HCI Config"
choice BT_LE_HCI_INTERFACE
prompt "Select HCI interface"
default BT_LE_HCI_INTERFACE_USE_RAM
config BT_LE_HCI_INTERFACE_USE_RAM
bool "ram"
help
Use RAM as HCI interface
config BT_LE_HCI_INTERFACE_USE_UART
bool "uart"
help
Use UART as HCI interface
endchoice
config BT_LE_HCI_UART_PORT
int "HCI UART port"
depends on BT_LE_HCI_INTERFACE_USE_UART
default 1
help
Set the port number of HCI UART
config BT_LE_HCI_UART_FLOWCTRL
bool "HCI uart Hardware Flow ctrl"
depends on BT_LE_HCI_INTERFACE_USE_UART
default n
config BT_LE_HCI_UART_TX_PIN
int "HCI uart Tx gpio"
depends on BT_LE_HCI_INTERFACE_USE_UART
default 19
config BT_LE_HCI_UART_RX_PIN
int "HCI uart Rx gpio"
depends on BT_LE_HCI_INTERFACE_USE_UART
default 10
config BT_LE_HCI_UART_RTS_PIN
int "HCI uart RTS gpio"
depends on BT_LE_HCI_UART_FLOWCTRL
default 4
config BT_LE_HCI_UART_CTS_PIN
int "HCI uart CTS gpio"
depends on BT_LE_HCI_UART_FLOWCTRL
default 5
config BT_LE_HCI_UART_BAUD
int "HCI uart baudrate"
depends on BT_LE_HCI_INTERFACE_USE_UART
default 921600
help
HCI uart baud rate 115200 ~ 1000000
choice BT_LE_HCI_UART_PARITY
prompt "select uart parity"
depends on BT_LE_HCI_INTERFACE_USE_UART
default BT_LE_HCI_UART_UART_PARITY_DISABLE
config BT_LE_HCI_UART_UART_PARITY_DISABLE
bool "PARITY_DISABLE"
help
UART_PARITY_DISABLE
config BT_LE_HCI_UART_UART_PARITY_EVEN
bool "PARITY_EVEN"
help
UART_PARITY_EVEN
config BT_LE_HCI_UART_UART_PARITY_ODD
bool "PARITY_ODD"
help
UART_PARITY_ODD
endchoice
config BT_LE_HCI_UART_TASK_STACK_SIZE
int "HCI uart task stack size"
depends on BT_LE_HCI_INTERFACE_USE_UART
default 1000
help
Set the size of uart task stack
endmenu
config BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT
bool
default y
help
Enable NPL porting for controller.
menuconfig BT_LE_50_FEATURE_SUPPORT
bool "Enable BLE 5 feature"
depends on !BT_NIMBLE_ENABLED
default y
help
Enable BLE 5 feature
config BT_LE_LL_CFG_FEAT_LE_2M_PHY
bool "Enable 2M Phy"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable 2M-PHY
config BT_LE_LL_CFG_FEAT_LE_CODED_PHY
bool "Enable coded Phy"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable coded-PHY
config BT_LE_EXT_ADV
bool "Enable extended advertising"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
Enable this option to do extended advertising. Extended advertising
will be supported from BLE 5.0 onwards.
if BT_LE_EXT_ADV
config BT_LE_MAX_EXT_ADV_INSTANCES
int "Maximum number of extended advertising instances."
range 0 4
default 1
depends on BT_LE_EXT_ADV
help
Change this option to set maximum number of extended advertising
instances. Minimum there is always one instance of
advertising. Enter how many more advertising instances you
want.
Each extended advertising instance will take about 0.5k DRAM.
config BT_LE_EXT_ADV_MAX_SIZE
int "Maximum length of the advertising data."
range 0 1650
default 1650
depends on BT_LE_EXT_ADV
help
Defines the length of the extended adv data. The value should not
exceed 1650.
config BT_LE_ENABLE_PERIODIC_ADV
bool "Enable periodic advertisement."
default y
depends on BT_LE_EXT_ADV
help
Enable this option to start periodic advertisement.
config BT_LE_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable Transer Sync Events"
depends on BT_LE_ENABLE_PERIODIC_ADV
default y
help
This enables controller transfer periodic sync events to host
endif
config BT_LE_MAX_PERIODIC_SYNCS
int "Maximum number of periodic advertising syncs"
depends on BT_LE_50_FEATURE_SUPPORT && !BT_NIMBLE_ENABLED
range 0 8
default 1 if BT_LE_ENABLE_PERIODIC_ADV
default 0
help
Set this option to set the upper limit for number of periodic sync
connections. This should be less than maximum connections allowed by
controller.
config BT_LE_MAX_PERIODIC_ADVERTISER_LIST
int "Maximum number of periodic advertiser list"
depends on BT_LE_50_FEATURE_SUPPORT && !BT_NIMBLE_ENABLED
range 1 5
default 5
help
Set this option to set the upper limit for number of periodic advertiser list.
menu "Memory Settings"
depends on !BT_NIMBLE_ENABLED
config BT_LE_MSYS_1_BLOCK_COUNT
int "MSYS_1 Block Count"
default 12
help
MSYS is a system level mbuf registry. For prepare write & prepare
responses MBUFs are allocated out of msys_1 pool. For NIMBLE_MESH
enabled cases, this block count is increased by 8 than user defined
count.
config BT_LE_MSYS_1_BLOCK_SIZE
int "MSYS_1 Block Size"
default 256
help
Dynamic memory size of block 1
config BT_LE_MSYS_2_BLOCK_COUNT
int "MSYS_2 Block Count"
default 24
help
Dynamic memory count
config BT_LE_MSYS_2_BLOCK_SIZE
int "MSYS_2 Block Size"
default 320
help
Dynamic memory size of block 2
config BT_LE_ACL_BUF_COUNT
int "ACL Buffer count"
default 10
help
The number of ACL data buffers.
config BT_LE_ACL_BUF_SIZE
int "ACL Buffer size"
default 517
help
This is the maximum size of the data portion of HCI ACL data packets.
It does not include the HCI data header (of 4 bytes)
config BT_LE_HCI_EVT_BUF_SIZE
int "HCI Event Buffer size"
default 257 if BT_LE_EXT_ADV
default 70
help
This is the size of each HCI event buffer in bytes. In case of
extended advertising, packets can be fragmented. 257 bytes is the
maximum size of a packet.
config BT_LE_HCI_EVT_HI_BUF_COUNT
int "High Priority HCI Event Buffer count"
default 30
help
This is the high priority HCI events' buffer size. High-priority
event buffers are for everything except advertising reports. If there
are no free high-priority event buffers then host will try to allocate a
low-priority buffer instead
config BT_LE_HCI_EVT_LO_BUF_COUNT
int "Low Priority HCI Event Buffer count"
default 8
help
This is the low priority HCI events' buffer size. Low-priority event
buffers are only used for advertising reports. If there are no free
low-priority event buffers, then an incoming advertising report will
get dropped
endmenu
config BT_LE_CONTROLLER_TASK_STACK_SIZE
int "Controller task stack size"
default 5120 if BLE_MESH
default 4096
help
This configures stack size of NimBLE controller task
config BT_LE_LL_RESOLV_LIST_SIZE
int "BLE LL Resolving list size"
range 1 5
default 4
help
Configure the size of resolving list used in link layer.
menuconfig BT_LE_SECURITY_ENABLE
bool "Enable BLE SM feature"
depends on !BT_NIMBLE_ENABLED
default y
help
Enable BLE sm feature
config BT_LE_SM_LEGACY
bool "Security manager legacy pairing"
depends on BT_LE_SECURITY_ENABLE
default y
help
Enable security manager legacy pairing
config BT_LE_SM_SC
bool "Security manager secure connections (4.2)"
depends on BT_LE_SECURITY_ENABLE
default y
help
Enable security manager secure connections
config BT_LE_SM_SC_DEBUG_KEYS
bool "Use predefined public-private key pair"
default n
depends on BT_LE_SECURITY_ENABLE && BT_LE_SM_SC
help
If this option is enabled, SM uses predefined DH key pair as described
in Core Specification, Vol. 3, Part H, 2.3.5.6.1. This allows to
decrypt air traffic easily and thus should only be used for debugging.
config BT_LE_LL_CFG_FEAT_LE_ENCRYPTION
bool "Enable LE encryption"
depends on BT_LE_SECURITY_ENABLE
default y
help
Enable encryption connection
config BT_LE_CRYPTO_STACK_MBEDTLS
bool "Override TinyCrypt with mbedTLS for crypto computations"
default y
depends on !BT_NIMBLE_ENABLED
select MBEDTLS_ECP_RESTARTABLE
select MBEDTLS_CMAC_C
help
Enable this option to choose mbedTLS instead of TinyCrypt for crypto
computations.
config BT_LE_WHITELIST_SIZE
int "BLE white list size"
range 1 15
default 12
depends on !BT_NIMBLE_ENABLED
help
BLE list size
config BT_LE_LL_DUP_SCAN_LIST_COUNT
int "BLE duplicate scan list count"
range 1 100
default 20
help
config the max count of duplicate scan list
config BT_LE_LL_SCA
int "BLE Sleep clock accuracy"
range 0 500
default 60
help
Sleep clock accuracy of our device (in ppm)
config BT_LE_MAX_CONNECTIONS
int "Maximum number of concurrent connections"
depends on !BT_NIMBLE_ENABLED
range 1 9
default 3
help
Defines maximum number of concurrent BLE connections. For ESP32, user
is expected to configure BTDM_CTRL_BLE_MAX_CONN from controller menu
along with this option. Similarly for ESP32-C3 or ESP32-S3, user is expected to
configure BT_CTRL_BLE_MAX_ACT from controller menu.
Each connection will take about 1k DRAM.
choice BT_LE_COEX_PHY_CODED_TX_RX_TLIM
prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
default BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
depends on !BT_NIMBLE_ENABLED
help
When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
better avoid dramatic performance deterioration of Wi-Fi.
config BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EN
bool "Force Enable"
help
Always enable the limitation on max tx/rx time for Coded-PHY connection
config BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
bool "Force Disable"
help
Disable the limitation on max tx/rx time for Coded-PHY connection
endchoice
config BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
int
depends on !BT_NIMBLE_ENABLED
default 1 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EN
default 0 if BT_LE_COEX_PHY_CODED_TX_RX_TLIM_DIS
config BT_LE_SLEEP_ENABLE
bool "Enable BLE sleep"
default n
help
Enable BLE sleep
choice BT_LE_WAKEUP_SOURCE
prompt "BLE light sleep wakeup source"
depends on BT_LE_SLEEP_ENABLE
default BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
config BT_LE_WAKEUP_SOURCE_CPU_RTC_TIMER
bool "Use ESP timer to wakeup CPU"
help
Use esp timer to wakeup CPU
endchoice
config BT_LE_USE_ESP_TIMER
bool "Use Esp Timer for callout"
depends on !BT_NIMBLE_ENABLED
default y
help
Set this option to use Esp Timer which has higher priority timer
instead of FreeRTOS timer

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,8 @@ if BLE_MESH
select BTDM_BLE_MESH_SCAN_DUPL_EN if IDF_TARGET_ESP32
select BT_CTRL_BLE_SCAN_DUPL if IDF_TARGET_ESP32C3
select BT_CTRL_BLE_MESH_SCAN_DUPL_EN if IDF_TARGET_ESP32C3
select BT_LE_SCAN_DUPL if IDF_TARGET_ESP32C6
select BT_LE_SCAN_DUPL if IDF_TARGET_ESP32H2
default y
help
Enable this option to allow using specific duplicate scan filter

View File

@ -502,7 +502,7 @@ int bt_le_update_white_list(struct bt_mesh_white_list *wl)
}
if (BTM_BleUpdateAdvWhitelist(wl->add_remove, wl->remote_bda,
wl->addr_type, (tBTM_ADD_WHITELIST_CBACK *)wl->update_wl_comp_cb) == false) {
wl->addr_type, (tBTM_UPDATE_WHITELIST_CBACK *)wl->update_wl_comp_cb) == false) {
return -EIO;
}

View File

@ -197,6 +197,8 @@ static bool prov_bearers_valid(bt_mesh_prov_bearer_t bearers)
int bt_mesh_prov_enable(bt_mesh_prov_bearer_t bearers)
{
int err = 0;
if (bt_mesh_is_provisioned()) {
BT_WARN("%s, Already", __func__);
return -EALREADY;
@ -232,7 +234,11 @@ int bt_mesh_prov_enable(bt_mesh_prov_bearer_t bearers)
if (IS_ENABLED(CONFIG_BLE_MESH_PB_ADV) &&
(bearers & BLE_MESH_PROV_ADV)) {
/* Make sure we're scanning for provisioning invitations */
bt_mesh_scan_enable();
err = bt_mesh_scan_enable();
if (err) {
return err;
}
/* Enable unprovisioned beacon sending */
bt_mesh_beacon_enable();
}
@ -637,7 +643,10 @@ int bt_mesh_provisioner_enable(bt_mesh_prov_bearer_t bearers)
bt_mesh_beacon_enable();
}
bt_mesh_scan_enable();
err = bt_mesh_scan_enable();
if (err) {
return err;
}
return 0;
}

View File

@ -1547,13 +1547,8 @@ int bt_mesh_provisioner_store_node_info(struct bt_mesh_node *node)
#define HEARTBEAT_FILTER_ADD 0x00
#define HEARTBEAT_FILTER_REMOVE 0x01
#define HEARTBEAT_FILTER_WITH_SRC BIT(0)
#define HEARTBEAT_FILTER_WITH_DST BIT(1)
#define HEARTBEAT_FILTER_WITH_BOTH (BIT(1) | BIT(0))
static struct heartbeat_recv {
struct heartbeat_filter {
uint8_t type; /* Indicate if using src or dst or both to filter heartbeat messages */
uint16_t src; /* Heartbeat source address (unicast address) */
uint16_t dst; /* Heartbeat destination address (unicast address or group address) */
} filter[CONFIG_BLE_MESH_PROVISIONER_RECV_HB_FILTER_SIZE];
@ -1590,19 +1585,6 @@ int bt_mesh_provisioner_set_heartbeat_filter_type(uint8_t type)
return 0;
}
static inline uint8_t get_filter_addr_type(uint16_t src, uint16_t dst)
{
if (BLE_MESH_ADDR_IS_UNICAST(src)) {
if (BLE_MESH_ADDR_IS_UNICAST(dst) || BLE_MESH_ADDR_IS_GROUP(dst)) {
return HEARTBEAT_FILTER_WITH_BOTH;
} else {
return HEARTBEAT_FILTER_WITH_SRC;
}
} else {
return HEARTBEAT_FILTER_WITH_DST;
}
}
static int hb_filter_alloc(uint16_t src, uint16_t dst)
{
int i;
@ -1612,7 +1594,6 @@ static int hb_filter_alloc(uint16_t src, uint16_t dst)
if (filter->src == BLE_MESH_ADDR_UNASSIGNED &&
filter->dst == BLE_MESH_ADDR_UNASSIGNED) {
filter->type = get_filter_addr_type(src, dst);
filter->src = src;
filter->dst = dst;
return 0;
@ -1627,8 +1608,8 @@ static int hb_filter_add(uint16_t src, uint16_t dst)
{
int i;
if (!BLE_MESH_ADDR_IS_UNICAST(src) &&
!BLE_MESH_ADDR_IS_UNICAST(dst) && !BLE_MESH_ADDR_IS_GROUP(dst)) {
if (!(BLE_MESH_ADDR_IS_UNICAST(src) &&
(BLE_MESH_ADDR_IS_UNICAST(dst) || BLE_MESH_ADDR_IS_GROUP(dst)))) {
BT_ERR("Invalid filter address, src 0x%04x, dst 0x%04x", src, dst);
return -EINVAL;
}
@ -1637,10 +1618,9 @@ static int hb_filter_add(uint16_t src, uint16_t dst)
for (i = 0; i < ARRAY_SIZE(hb_rx.filter); i++) {
struct heartbeat_filter *filter = &hb_rx.filter[i];
if ((BLE_MESH_ADDR_IS_UNICAST(src) && filter->src == src) ||
((BLE_MESH_ADDR_IS_UNICAST(dst) || BLE_MESH_ADDR_IS_GROUP(dst)) &&
filter->dst == dst)) {
memset(filter, 0, sizeof(struct heartbeat_filter));
if (filter->src == src && filter->dst == dst) {
BT_WARN("Filter already exists, src 0x%04x dst 0x%04x", filter->src, filter->dst);
return 0;
}
}
@ -1651,8 +1631,8 @@ static int hb_filter_remove(uint16_t src, uint16_t dst)
{
int i;
if (!BLE_MESH_ADDR_IS_UNICAST(src) &&
!BLE_MESH_ADDR_IS_UNICAST(dst) && !BLE_MESH_ADDR_IS_GROUP(dst)) {
if (!(BLE_MESH_ADDR_IS_UNICAST(src) &&
(BLE_MESH_ADDR_IS_UNICAST(dst) || BLE_MESH_ADDR_IS_GROUP(dst)))) {
BT_ERR("Invalid filter address, src 0x%04x, dst 0x%04x", src, dst);
return -EINVAL;
}
@ -1660,9 +1640,7 @@ static int hb_filter_remove(uint16_t src, uint16_t dst)
for (i = 0; i < ARRAY_SIZE(hb_rx.filter); i++) {
struct heartbeat_filter *filter = &hb_rx.filter[i];
if ((BLE_MESH_ADDR_IS_UNICAST(src) && filter->src == src) ||
((BLE_MESH_ADDR_IS_UNICAST(dst) || BLE_MESH_ADDR_IS_GROUP(dst)) &&
filter->dst == dst)) {
if (filter->src == src && filter->dst == dst) {
memset(filter, 0, sizeof(struct heartbeat_filter));
}
}
@ -1689,26 +1667,8 @@ static bool filter_with_rejectlist(uint16_t hb_src, uint16_t hb_dst)
for (i = 0; i < ARRAY_SIZE(hb_rx.filter); i++) {
struct heartbeat_filter *filter = &hb_rx.filter[i];
switch (filter->type) {
case HEARTBEAT_FILTER_WITH_SRC:
if (hb_src == filter->src) {
return true;
}
break;
case HEARTBEAT_FILTER_WITH_DST:
if (hb_dst == filter->dst) {
return true;
}
break;
case HEARTBEAT_FILTER_WITH_BOTH:
if (hb_src == filter->src && hb_dst == filter->dst) {
return true;
}
break;
default:
BT_DBG("Unknown filter addr type 0x%02x", filter->type);
break;
if (hb_src == filter->src && hb_dst == filter->dst) {
return true;
}
}
@ -1721,26 +1681,8 @@ static bool filter_with_acceptlist(uint16_t hb_src, uint16_t hb_dst)
for (i = 0; i < ARRAY_SIZE(hb_rx.filter); i++) {
struct heartbeat_filter *filter = &hb_rx.filter[i];
switch (filter->type) {
case HEARTBEAT_FILTER_WITH_SRC:
if (hb_src == filter->src) {
return false;
}
break;
case HEARTBEAT_FILTER_WITH_DST:
if (hb_dst == filter->dst) {
return false;
}
break;
case HEARTBEAT_FILTER_WITH_BOTH:
if (hb_src == filter->src && hb_dst == filter->dst) {
return false;
}
break;
default:
BT_DBG("Unknown filter addr type 0x%02x", filter->type);
break;
if (hb_src == filter->src && hb_dst == filter->dst) {
return false;
}
}

View File

@ -3470,7 +3470,7 @@ void bt_mesh_provisioner_unprov_beacon_recv(struct net_buf_simple *buf, int8_t r
uint16_t oob_info = 0U;
if (!(prov_ctx.bearers & BLE_MESH_PROV_ADV)) {
BT_WARN("Not support PB-ADV bearer");
BT_INFO("Not support PB-ADV bearer");
return;
}
@ -3506,7 +3506,7 @@ void bt_mesh_provisioner_prov_adv_recv(struct net_buf_simple *buf,
uint16_t oob_info = 0U;
if (!(prov_ctx.bearers & BLE_MESH_PROV_GATT)) {
BT_WARN("Not support PB-GATT bearer");
BT_INFO("Not support PB-GATT bearer");
return;
}

View File

@ -431,8 +431,7 @@ esp_err_t esp_ble_gap_config_adv_data_raw(uint8_t *raw_data, uint32_t raw_data_l
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
if (raw_data == NULL
|| (raw_data_len <= 0 || raw_data_len > ESP_BLE_ADV_DATA_LEN_MAX)) {
if ((raw_data_len != 0 && raw_data == NULL) || raw_data_len > ESP_BLE_ADV_DATA_LEN_MAX) {
return ESP_ERR_INVALID_ARG;
}

View File

@ -650,6 +650,7 @@ typedef enum {
typedef enum{
ESP_BLE_WHITELIST_REMOVE = 0X00, /*!< remove mac from whitelist */
ESP_BLE_WHITELIST_ADD = 0X01, /*!< add address to whitelist */
ESP_BLE_WHITELIST_CLEAR = 0x02, /*!< clear all device in whitelist */
} esp_ble_wl_operation_t;
#if (BLE_42_FEATURE_SUPPORT == TRUE)
typedef enum {

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*
@ -16,6 +16,7 @@
extern "C" {
#endif
/// maximum size of HID Device report descriptor
#define BTHH_MAX_DSC_LEN 884
/**
@ -26,34 +27,33 @@ typedef enum {
ESP_HIDH_CONN_STATE_CONNECTING, /*!< connecting state */
ESP_HIDH_CONN_STATE_DISCONNECTED, /*!< disconnected state */
ESP_HIDH_CONN_STATE_DISCONNECTING, /*!< disconnecting state */
ESP_HIDH_CONN_STATE_UNKNOWN /*!< unknown state(initial state) */
ESP_HIDH_CONN_STATE_UNKNOWN /*!< unknown state (initial state) */
} esp_hidh_connection_state_t;
/**
* @brief HID handshake error code and vendor-defined result code
*/
typedef enum {
ESP_HIDH_OK,
ESP_HIDH_HS_HID_NOT_READY, /*!< handshake error : device not ready */
ESP_HIDH_HS_INVALID_RPT_ID, /*!< handshake error : invalid report ID */
ESP_HIDH_HS_TRANS_NOT_SPT, /*!< handshake error : transaction not spt */
ESP_HIDH_HS_INVALID_PARAM, /*!< handshake error : invalid paremeter */
ESP_HIDH_HS_ERROR, /*!< handshake error : unspecified HS error */
ESP_HIDH_ERR, /*!< general ESP HH error */
ESP_HIDH_OK, /*!< successful */
ESP_HIDH_HS_HID_NOT_READY, /*!< handshake error: device not ready */
ESP_HIDH_HS_INVALID_RPT_ID, /*!< handshake error: invalid report ID */
ESP_HIDH_HS_TRANS_NOT_SPT, /*!< handshake error: HID device does not support the request */
ESP_HIDH_HS_INVALID_PARAM, /*!< handshake error: parameter value does not meet the expected criteria of called function or API */
ESP_HIDH_HS_ERROR, /*!< handshake error: HID device could not identify the error condition */
ESP_HIDH_ERR, /*!< general ESP HID Host error */
ESP_HIDH_ERR_SDP, /*!< SDP error */
ESP_HIDH_ERR_PROTO, /*!< SET_Protocol error,
only used in ESP_HIDH_OPEN_EVT callback */
ESP_HIDH_ERR_DB_FULL, /*!< device database full error, used in
ESP_HIDH_OPEN_EVT/ESP_HIDH_ADD_DEV_EVT */
ESP_HIDH_ERR_PROTO, /*!< SET_PROTOCOL error, only used in ESP_HIDH_OPEN_EVT callback */
ESP_HIDH_ERR_DB_FULL, /*!< device database full, used in ESP_HIDH_OPEN_EVT/ESP_HIDH_ADD_DEV_EVT */
ESP_HIDH_ERR_TOD_UNSPT, /*!< type of device not supported */
ESP_HIDH_ERR_NO_RES, /*!< out of system resources */
ESP_HIDH_ERR_AUTH_FAILED, /*!< authentication fail */
ESP_HIDH_ERR_HDL, /*!< connection handle error */
ESP_HIDH_ERR_SEC, /*!< encryption error */
// self_defined
ESP_HIDH_BUSY, /*!< Temporarily can not handle this request. */
ESP_HIDH_NO_DATA, /*!< No data. */
ESP_HIDH_NEED_INIT, /*!< HIDH module shall init first */
ESP_HIDH_NEED_DEINIT, /*!< HIDH module shall deinit first */
ESP_HIDH_NO_CONNECTION, /*!< connection may have been closed */
ESP_HIDH_BUSY, /*!< vendor-defined: temporarily can not handle this request */
ESP_HIDH_NO_DATA, /*!< vendor-defined: no data. */
ESP_HIDH_NEED_INIT, /*!< vendor-defined: HIDH module shall initialize first */
ESP_HIDH_NEED_DEINIT, /*!< vendor-defined: HIDH module shall de-deinitialize first */
ESP_HIDH_NO_CONNECTION, /*!< vendor-defined: connection may have been closed */
} esp_hidh_status_t;
/**
@ -79,35 +79,58 @@ typedef enum {
* @brief HID host callback function events
*/
typedef enum {
ESP_HIDH_INIT_EVT = 0, /*!< When HID host is initialized, the event comes */
ESP_HIDH_DEINIT_EVT, /*!< When HID host is deinitialized, the event comes */
ESP_HIDH_OPEN_EVT, /*!< When HID host connection opened, the event comes */
ESP_HIDH_CLOSE_EVT, /*!< When HID host connection closed, the event comes */
ESP_HIDH_GET_RPT_EVT, /*!< When Get_Report command is called, the event comes */
ESP_HIDH_SET_RPT_EVT, /*!< When Set_Report command is called, the event comes */
ESP_HIDH_GET_PROTO_EVT, /*!< When Get_Protocol command is called, the event comes */
ESP_HIDH_SET_PROTO_EVT, /*!< When Set_Protocol command is called, the event comes */
ESP_HIDH_GET_IDLE_EVT, /*!< When Get_Idle command is called, the event comes */
ESP_HIDH_SET_IDLE_EVT, /*!< When Set_Idle command is called, the event comes */
ESP_HIDH_GET_DSCP_EVT, /*!< When HIDH is initialized, the event comes */
ESP_HIDH_ADD_DEV_EVT, /*!< When a device is added, the event comes */
ESP_HIDH_RMV_DEV_EVT, /*!< When a device is removed, the event comes */
ESP_HIDH_VC_UNPLUG_EVT, /*!< When virtually unplugged, the event comes */
ESP_HIDH_DATA_EVT, /*!< When send data on interrupt channel, the event comes */
ESP_HIDH_DATA_IND_EVT, /*!< When receive data on interrupt channel, the event comes */
ESP_HIDH_SET_INFO_EVT /*!< When set the HID device descriptor, the event comes */
ESP_HIDH_INIT_EVT = 0, /*!< when HID host is initialized, the event comes */
ESP_HIDH_DEINIT_EVT, /*!< when HID host is deinitialized, the event comes */
ESP_HIDH_OPEN_EVT, /*!< when HID host connection opened, the event comes */
ESP_HIDH_CLOSE_EVT, /*!< when HID host connection closed, the event comes */
ESP_HIDH_GET_RPT_EVT, /*!< when Get_Report command is called, the event comes */
ESP_HIDH_SET_RPT_EVT, /*!< when Set_Report command is called, the event comes */
ESP_HIDH_GET_PROTO_EVT, /*!< when Get_Protocol command is called, the event comes */
ESP_HIDH_SET_PROTO_EVT, /*!< when Set_Protocol command is called, the event comes */
ESP_HIDH_GET_IDLE_EVT, /*!< when Get_Idle command is called, the event comes */
ESP_HIDH_SET_IDLE_EVT, /*!< when Set_Idle command is called, the event comes */
ESP_HIDH_GET_DSCP_EVT, /*!< when HIDH is initialized, the event comes */
ESP_HIDH_ADD_DEV_EVT, /*!< when a device is added, the event comes */
ESP_HIDH_RMV_DEV_EVT, /*!< when a device is removed, the event comes */
ESP_HIDH_VC_UNPLUG_EVT, /*!< when virtually unplugged, the event comes */
ESP_HIDH_DATA_EVT, /*!< when send data on interrupt channel, the event comes */
ESP_HIDH_DATA_IND_EVT, /*!< when receive data on interrupt channel, the event comes */
ESP_HIDH_SET_INFO_EVT /*!< when set the HID device descriptor, the event comes */
} esp_hidh_cb_event_t;
/**
* @brief HID device information from HID Device Service Record and Device ID Service Record
*/
typedef enum {
ESP_HIDH_DEV_ATTR_VIRTUAL_CABLE = 0x0001, /*!< whether Virtual Cables is supported */
ESP_HIDH_DEV_ATTR_NORMALLY_CONNECTABLE = 0x0002, /*!< whether device is in Page Scan mode when there is no active connection */
ESP_HIDH_DEV_ATTR_RECONNECT_INITIATE = 0x0004, /*!< whether the HID device inititates the reconnection process */
} esp_hidh_dev_attr_t;
/**
* @brief application ID(non-zero) for each type of device
*/
typedef enum {
ESP_HIDH_APP_ID_MOUSE = 1, /*!< pointing device */
ESP_HIDH_APP_ID_KEYBOARD = 2, /*!< keyboard */
ESP_HIDH_APP_ID_REMOTE_CONTROL = 3, /*!< remote control */
ESP_HIDH_APP_ID_JOYSTICK = 5, /*!< joystick */
ESP_HIDH_APP_ID_GAMEPAD = 6, /*!< gamepad*/
} esp_hidh_dev_app_id_t;
/**
* @brief HID device information from HID Device Service Record and Device ID Service Record
*/
typedef struct {
int attr_mask;
uint8_t sub_class;
uint8_t app_id;
int vendor_id;
int product_id;
int version;
uint8_t ctry_code;
int dl_len;
uint8_t dsc_list[BTHH_MAX_DSC_LEN];
int attr_mask; /*!< device attribute bit mask, refer to esp_hidh_dev_attr_t */
uint8_t sub_class; /*!< HID device subclass */
uint8_t app_id; /*!< application ID, refer to esp_hidh_dev_app_id_t */
int vendor_id; /*!< Device ID information: vendor ID */
int product_id; /*!< Device ID information: product ID */
int version; /*!< Device ID information: version */
uint8_t ctry_code; /*!< SDP attrbutes of HID devices: HID country code (https://www.usb.org/sites/default/files/hid1_11.pdf) */
int dl_len; /*!< SDP attrbutes of HID devices: HID device descriptor length */
uint8_t dsc_list[BTHH_MAX_DSC_LEN]; /*!< SDP attrbutes of HID devices: HID device descriptor definition */
} esp_hidh_hid_info_t;
/**
@ -258,8 +281,8 @@ typedef union {
uint16_t vendor_id; /*!< Vendor ID */
uint16_t product_id; /*!< Product ID */
uint16_t version; /*!< Version */
uint16_t ssr_max_latency; /*!< SSR max latency */
uint16_t ssr_min_tout; /*!< SSR min timeout */
uint16_t ssr_max_latency; /*!< SSR max latency in slots */
uint16_t ssr_min_tout; /*!< SSR min timeout in slots */
uint8_t ctry_code; /*!< Country Code */
uint16_t dl_len; /*!< Device descriptor length */
uint8_t *dsc_list; /*!< Device descriptor pointer */
@ -315,7 +338,7 @@ esp_err_t esp_bt_hid_host_init(void);
esp_err_t esp_bt_hid_host_deinit(void);
/**
* @brief Connect to hid device. When the operation is complete the callback
* @brief Connect to HID device. When the operation is complete the callback
* function will be called with ESP_HIDH_OPEN_EVT.
*
* @param[in] bd_addr: Remote device bluetooth device address.
@ -326,7 +349,7 @@ esp_err_t esp_bt_hid_host_deinit(void);
esp_err_t esp_bt_hid_host_connect(esp_bd_addr_t bd_addr);
/**
* @brief Disconnect from hid device. When the operation is complete the callback
* @brief Disconnect from HID device. When the operation is complete the callback
* function will be called with ESP_HIDH_CLOSE_EVT.
*
* @param[in] bd_addr: Remote device bluetooth device address.

View File

@ -232,7 +232,7 @@ void bta_ar_dereg_avct(tBTA_SYS_ID sys_id)
**
******************************************************************************/
void bta_ar_reg_avrc(UINT16 service_uuid, char *service_name, char *provider_name,
UINT16 categories, tBTA_SYS_ID sys_id)
UINT16 categories, tBTA_SYS_ID sys_id, BOOLEAN browsing_en)
{
UINT8 mask = bta_ar_id (sys_id);
UINT8 temp[8], *p;
@ -245,7 +245,7 @@ void bta_ar_reg_avrc(UINT16 service_uuid, char *service_name, char *provider_nam
if (bta_ar_cb.sdp_tg_handle == 0) {
bta_ar_cb.tg_registered = mask;
bta_ar_cb.sdp_tg_handle = SDP_CreateRecord();
AVRC_AddRecord(service_uuid, service_name, provider_name, categories, bta_ar_cb.sdp_tg_handle);
AVRC_AddRecord(service_uuid, service_name, provider_name, categories, bta_ar_cb.sdp_tg_handle, browsing_en);
bta_sys_add_uuid(service_uuid);
}
/* only one TG is allowed (first-come, first-served).
@ -255,7 +255,7 @@ void bta_ar_reg_avrc(UINT16 service_uuid, char *service_name, char *provider_nam
categories = bta_ar_cb.ct_categories[0] | bta_ar_cb.ct_categories[1];
if (bta_ar_cb.sdp_ct_handle == 0) {
bta_ar_cb.sdp_ct_handle = SDP_CreateRecord();
AVRC_AddRecord(service_uuid, service_name, provider_name, categories, bta_ar_cb.sdp_ct_handle);
AVRC_AddRecord(service_uuid, service_name, provider_name, categories, bta_ar_cb.sdp_ct_handle, browsing_en);
bta_sys_add_uuid(service_uuid);
} else {
/* multiple CTs are allowed.

View File

@ -1299,11 +1299,11 @@ void bta_av_setconfig_rsp (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data)
if (p_scb->codec_type == BTA_AV_CODEC_SBC || num > 1) {
/* if SBC is used by the SNK as INT, discover req is not sent in bta_av_config_ind.
* call disc_res now */
* call cfg_res now */
/* this is called in A2DP SRC path only, In case of SINK we don't need it */
if (local_sep == AVDT_TSEP_SRC) {
p_scb->p_cos->disc_res(p_scb->hndl, num, num, 0, p_scb->peer_addr,
UUID_SERVCLASS_AUDIO_SOURCE);
p_scb->p_cos->cfg_res(p_scb->hndl, num, num, 0, p_scb->peer_addr,
UUID_SERVCLASS_AUDIO_SOURCE);
}
} else {
/* we do not know the peer device and it is using non-SBC codec

View File

@ -1861,8 +1861,8 @@ void bta_av_dereg_comp(tBTA_AV_DATA *p_data)
bta_sys_remove_uuid(UUID_SERVCLASS_VIDEO_SOURCE);
}
/* make sure that the timer is not active */
bta_sys_stop_timer(&p_scb->timer);
/* free the delay timer for AVRC CT */
bta_sys_free_timer(&p_scb->timer);
list_free(p_scb->a2d_list);
p_scb->a2d_list = NULL;
utl_freebuf((void **)&p_cb->p_scb[p_scb->hdi]);

View File

@ -94,7 +94,8 @@ const tBTA_AV_CFG bta_av_cfg = {
6, /* AVDTP audio channel max data queue size */
BTA_AV_MAX_VDP_MTU, /* AVDTP video transport channel MTU at L2CAP */
600, /* AVDTP video transport channel flush timeout */
FALSE, /* TRUE, to accept AVRC 1.3 group nevigation command */
FALSE, /* TRUE, to accept AVRC 1.3 group nevigation command */
FALSE, /* FALSE, does not support browsing channel */
2, /* company id count in p_meta_co_ids */
BTA_AV_RC_PASS_RSP_CODE,/* the default response code for pass through commands */
bta_av_meta_caps_co_ids,/* the metadata Get Capabilities response for company id */

View File

@ -585,10 +585,10 @@ static void bta_av_api_register(tBTA_AV_DATA *p_data)
(UINT8)(bta_av_cb.sec_mask & (~BTA_SEC_AUTHORIZE)), BTA_ID_AV);
if (p_data->api_reg.tsep == AVDT_TSEP_SRC) {
bta_ar_reg_avrc(UUID_SERVCLASS_AV_REM_CTRL_TARGET, "AV Remote Control Target\n", NULL,
p_bta_av_cfg->avrc_src_tg_cat, BTA_ID_AV);
p_bta_av_cfg->avrc_src_tg_cat, BTA_ID_AV, p_bta_av_cfg->avrc_br);
} else {
bta_ar_reg_avrc(UUID_SERVCLASS_AV_REM_CTRL_TARGET, "AV Remote Control Target\n", NULL,
p_bta_av_cfg->avrc_snk_tg_cat, BTA_ID_AV);
p_bta_av_cfg->avrc_snk_tg_cat, BTA_ID_AV, p_bta_av_cfg->avrc_br);
}
#endif
}
@ -721,10 +721,10 @@ static void bta_av_api_register(tBTA_AV_DATA *p_data)
/* create an SDP record as AVRC CT. */
if (p_data->api_reg.tsep == AVDT_TSEP_SRC) {
bta_ar_reg_avrc(UUID_SERVCLASS_AV_REMOTE_CONTROL, "AV Remote Control Controller\n", NULL,
p_bta_av_cfg->avrc_src_ct_cat, BTA_ID_AV);
p_bta_av_cfg->avrc_src_ct_cat, BTA_ID_AV, p_bta_av_cfg->avrc_br);
} else {
bta_ar_reg_avrc(UUID_SERVCLASS_AV_REMOTE_CONTROL, "AV Remote Control Controller\n", NULL,
p_bta_av_cfg->avrc_snk_ct_cat, BTA_ID_AV);
p_bta_av_cfg->avrc_snk_ct_cat, BTA_ID_AV, p_bta_av_cfg->avrc_br);
}
#endif
}
@ -1251,9 +1251,11 @@ BOOLEAN bta_av_hdl_event(BT_HDR *p_msg)
} else {
APPL_TRACE_VERBOSE("handle=0x%x\n", p_msg->layer_specific);
tBTA_AV_SCB *p_scb = bta_av_hndl_to_scb(p_msg->layer_specific);
p_scb->disc_rsn = p_msg->offset;
/* stream state machine events */
bta_av_ssm_execute(p_scb, p_msg->event, (tBTA_AV_DATA *) p_msg);
if (p_scb) {
p_scb->disc_rsn = p_msg->offset;
/* stream state machine events */
bta_av_ssm_execute(p_scb, p_msg->event, (tBTA_AV_DATA *) p_msg);
}
}
return TRUE;
}

View File

@ -845,14 +845,14 @@ void bta_dm_ble_set_channels (tBTA_DM_MSG *p_data)
void bta_dm_update_white_list(tBTA_DM_MSG *p_data)
{
#if (BLE_INCLUDED == TRUE)
BTM_BleUpdateAdvWhitelist(p_data->white_list.add_remove, p_data->white_list.remote_addr, p_data->white_list.addr_type, p_data->white_list.add_wl_cb);
BTM_BleUpdateAdvWhitelist(p_data->white_list.add_remove, p_data->white_list.remote_addr, p_data->white_list.addr_type, p_data->white_list.update_wl_cb);
#endif ///BLE_INCLUDED == TRUE
}
void bta_dm_clear_white_list(tBTA_DM_MSG *p_data)
{
#if (BLE_INCLUDED == TRUE)
BTM_BleClearWhitelist();
BTM_BleClearWhitelist(p_data->white_list.update_wl_cb);
#endif
}
@ -982,10 +982,6 @@ static void bta_dm_process_remove_device(BD_ADDR bd_addr, tBT_TRANSPORT transpor
BTM_SecDeleteDevice(bd_addr, transport);
#if (BLE_INCLUDED == TRUE && GATTC_INCLUDED == TRUE)
/* remove all cached GATT information */
BTA_GATTC_Refresh(bd_addr, false);
#endif
if (bta_dm_cb.p_sec_cback) {
tBTA_DM_SEC sec_event;
bdcpy(sec_event.link_down.bd_addr, bd_addr);
@ -1140,8 +1136,6 @@ void bta_dm_close_acl(tBTA_DM_MSG *p_data)
#if (BLE_INCLUDED == TRUE && GATTC_INCLUDED == TRUE)
/* need to remove all pending background connection if any */
BTA_GATTC_CancelOpen(0, p_remove_acl->bd_addr, FALSE);
/* remove all cached GATT information */
BTA_GATTC_Refresh(p_remove_acl->bd_addr, false);
#endif
}
/* otherwise, no action needed */
@ -3670,8 +3664,6 @@ void bta_dm_acl_change(tBTA_DM_MSG *p_data)
#if (BLE_INCLUDED == TRUE && GATTC_INCLUDED == TRUE)
/* need to remove all pending background connection */
BTA_GATTC_CancelOpen(0, p_bda, FALSE);
/* remove all cached GATT information */
BTA_GATTC_Refresh(p_bda, false);
#endif
}
@ -3849,8 +3841,6 @@ static BOOLEAN bta_dm_remove_sec_dev_entry(BD_ADDR remote_bd_addr)
#if (BLE_INCLUDED == TRUE && GATTC_INCLUDED == TRUE)
/* need to remove all pending background connection */
BTA_GATTC_CancelOpen(0, remote_bd_addr, FALSE);
/* remove all cached GATT information */
BTA_GATTC_Refresh(remote_bd_addr, false);
#endif
}
return is_device_deleted;

View File

@ -324,26 +324,26 @@ void BTA_DmBleSetChannels(const uint8_t *channels, tBTA_CMPL_CB *set_channels_c
}
void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr, tBLE_ADDR_TYPE addr_type, tBTA_ADD_WHITELIST_CBACK *add_wl_cb)
void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr, tBLE_ADDR_TYPE addr_type, tBTA_UPDATE_WHITELIST_CBACK *update_wl_cb)
{
tBTA_DM_API_UPDATE_WHITE_LIST *p_msg;
if ((p_msg = (tBTA_DM_API_UPDATE_WHITE_LIST *)osi_malloc(sizeof(tBTA_DM_API_UPDATE_WHITE_LIST))) != NULL) {
p_msg->hdr.event = BTA_DM_API_UPDATE_WHITE_LIST_EVT;
p_msg->add_remove = add_remove;
p_msg->addr_type = addr_type;
p_msg->add_wl_cb = add_wl_cb;
p_msg->update_wl_cb = update_wl_cb;
memcpy(p_msg->remote_addr, remote_addr, sizeof(BD_ADDR));
bta_sys_sendmsg(p_msg);
}
}
void BTA_DmClearWhiteList(void)
void BTA_DmClearWhiteList(tBTA_UPDATE_WHITELIST_CBACK *update_wl_cb)
{
tBTA_DM_API_ENABLE *p_msg;
if ((p_msg = (tBTA_DM_API_ENABLE *)osi_malloc(sizeof(tBTA_DM_API_ENABLE))) != NULL) {
tBTA_DM_API_UPDATE_WHITE_LIST *p_msg;
if ((p_msg = (tBTA_DM_API_UPDATE_WHITE_LIST *)osi_malloc(sizeof(tBTA_DM_API_UPDATE_WHITE_LIST))) != NULL) {
p_msg->hdr.event = BTA_DM_API_CLEAR_WHITE_LIST_EVT;
p_msg->p_sec_cback = NULL;
p_msg->update_wl_cb = update_wl_cb;
bta_sys_sendmsg(p_msg);
}

View File

@ -389,7 +389,7 @@ void bta_dm_co_ble_set_init_key_req(UINT8 init_key)
{
#if (SMP_INCLUDED == TRUE)
init_key &= 0x0f; // 4~7bit reservd, only used the 0~3bit
bte_appl_cfg.ble_init_key &= init_key;
bte_appl_cfg.ble_init_key = init_key;
#endif ///SMP_INCLUDED == TRUE
}
@ -397,7 +397,7 @@ void bta_dm_co_ble_set_rsp_key_req(UINT8 rsp_key)
{
#if (SMP_INCLUDED == TRUE)
rsp_key &= 0x0f; // 4~7bit reservd, only used the 0~3bit
bte_appl_cfg.ble_resp_key &= rsp_key;
bte_appl_cfg.ble_resp_key = rsp_key;
#endif ///SMP_INCLUDED == TRUE
}

View File

@ -279,7 +279,7 @@ typedef struct {
BOOLEAN add_remove;
BD_ADDR remote_addr;
tBLE_ADDR_TYPE addr_type;
tBTA_ADD_WHITELIST_CBACK *add_wl_cb;
tBTA_UPDATE_WHITELIST_CBACK *update_wl_cb;
}tBTA_DM_API_UPDATE_WHITE_LIST;
typedef struct {

View File

@ -823,8 +823,6 @@ void bta_gattc_close(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
bta_sys_conn_close( BTA_ID_GATTC , BTA_ALL_APP_ID, p_clcb->bda);
}
bta_gattc_clcb_dealloc(p_clcb);
if (p_data->hdr.event == BTA_GATTC_API_CLOSE_EVT) {
cb_data.close.status = GATT_Disconnect(p_data->hdr.layer_specific);
} else if (p_data->hdr.event == BTA_GATTC_INT_DISCONN_EVT) {

View File

@ -517,8 +517,8 @@ void bta_gattc_co_get_addr_list(BD_ADDR *addr_list)
void bta_gattc_co_cache_addr_save(BD_ADDR bd_addr, hash_key_t hash_key)
{
esp_err_t err_code;
UINT8 num = ++cache_env->num_addr;
UINT8 index = 0;
UINT8 new_index = cache_env->num_addr;
UINT8 *p_buf = osi_malloc(MAX_ADDR_LIST_CACHE_BUF);
// check the address list has the same hash key or not
if (bta_gattc_co_find_hash_in_cache(hash_key) != INVALID_ADDR_NUM) {
@ -530,20 +530,22 @@ void bta_gattc_co_cache_addr_save(BD_ADDR bd_addr, hash_key_t hash_key)
memcpy(cache_env->cache_addr[index].hash_key, hash_key, sizeof(hash_key_t));
} else {
//if the bd_addr didn't in the address list, added the bd_addr to the last of the address list.
memcpy(cache_env->cache_addr[num - 1].hash_key, hash_key, sizeof(hash_key_t));
memcpy(cache_env->cache_addr[num - 1].addr, bd_addr, sizeof(BD_ADDR));
memcpy(cache_env->cache_addr[new_index].hash_key, hash_key, sizeof(hash_key_t));
memcpy(cache_env->cache_addr[new_index].addr, bd_addr, sizeof(BD_ADDR));
cache_env->num_addr++;
}
} else {
APPL_TRACE_DEBUG("%s(), num = %d", __func__, num);
memcpy(cache_env->cache_addr[num - 1].addr, bd_addr, sizeof(BD_ADDR));
memcpy(cache_env->cache_addr[num - 1].hash_key, hash_key, sizeof(hash_key_t));
APPL_TRACE_DEBUG("%s(), num = %d", __func__, new_index + 1);
memcpy(cache_env->cache_addr[new_index].addr, bd_addr, sizeof(BD_ADDR));
memcpy(cache_env->cache_addr[new_index].hash_key, hash_key, sizeof(hash_key_t));
cache_env->num_addr++;
}
nvs_handle_t *fp = &cache_env->addr_fp;
UINT16 length = num*(sizeof(BD_ADDR) + sizeof(hash_key_t));
UINT16 length = cache_env->num_addr * (sizeof(BD_ADDR) + sizeof(hash_key_t));
for (UINT8 i = 0; i < num; i++) {
for (UINT8 i = 0; i < cache_env->num_addr; i++) {
//copy the address to the buffer.
memcpy(p_buf + i*(sizeof(BD_ADDR) + sizeof(hash_key_t)), cache_env->cache_addr[i].addr, sizeof(BD_ADDR));
//copy the hash key to the buffer.

View File

@ -322,6 +322,15 @@ void bta_gattc_clcb_dealloc(tBTA_GATTC_CLCB *p_clcb)
}
}
void bta_gattc_clcb_dealloc_by_conn_id(UINT16 conn_id)
{
tBTA_GATTC_CLCB *p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id);
if (p_clcb) {
bta_gattc_clcb_dealloc(p_clcb);
}
}
/*******************************************************************************
**
** Function bta_gattc_find_srcb
@ -421,6 +430,7 @@ tBTA_GATTC_SERV *bta_gattc_srcb_alloc(BD_ADDR bda)
{
if (p_tcb->p_srvc_cache != NULL) {
list_free(p_tcb->p_srvc_cache);
p_tcb->p_srvc_cache = NULL;
}
osi_free(p_tcb->p_srvc_list);
p_tcb->p_srvc_list = NULL;

View File

@ -94,7 +94,7 @@ static void bta_ag_cback_open(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data, tBTA_AG_
/* call app callback with open event */
open.hdr.handle = bta_ag_scb_to_idx(p_scb);
open.hdr.app_id = p_scb->app_id;
open.status = status;
open.hdr.status = status;
open.service_id = bta_ag_svc_id[p_scb->conn_service];
if (p_data) {
/* if p_data is provided then we need to pick the bd address from the open api structure */
@ -131,7 +131,7 @@ void bta_ag_register(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
/* call app callback with register event */
reg.hdr.handle = bta_ag_scb_to_idx(p_scb);
reg.hdr.app_id = p_scb->app_id;
reg.status = BTA_AG_SUCCESS;
reg.hdr.status = BTA_AG_SUCCESS;
(*bta_ag_cb.p_cback)(BTA_AG_REGISTER_EVT, (tBTA_AG *) &reg);
}

View File

@ -461,11 +461,11 @@ void bta_ag_scb_dealloc(tBTA_AG_SCB *p_scb)
APPL_TRACE_DEBUG("bta_ag_scb_dealloc %d", bta_ag_scb_to_idx(p_scb));
/* stop timers */
bta_sys_stop_timer(&p_scb->act_timer);
bta_sys_free_timer(&p_scb->act_timer);
#if (BTM_WBS_INCLUDED == TRUE)
bta_sys_stop_timer(&p_scb->cn_timer);
bta_sys_free_timer(&p_scb->cn_timer);
#endif
bta_sys_stop_timer(&p_scb->colli_timer);
bta_sys_free_timer(&p_scb->colli_timer);
/* initialize control block */
memset(p_scb, 0, sizeof(tBTA_AG_SCB));
@ -831,7 +831,7 @@ static void bta_ag_api_register(tBTA_AG_DATA *p_data)
APPL_TRACE_DEBUG("bta_ag_api_register: p_scb 0x%08x ", (unsigned int)p_scb);
bta_ag_sm_execute(p_scb, p_data->hdr.event, p_data);
} else {
reg.status = BTA_AG_FAIL_RESOURCES;
reg.hdr.status = BTA_AG_FAIL_RESOURCES;
(*bta_ag_cb.p_cback)(BTA_AG_REGISTER_EVT, (tBTA_AG *) &reg);
}
}

View File

@ -82,15 +82,13 @@ static const tBTM_ESCO_PARAMS bta_ag_esco_params[BTA_AG_NUM_CODECS] =
{
BTM_64KBITS_RATE, /* TX Bandwidth (64 kbits/sec) */
BTM_64KBITS_RATE, /* RX Bandwidth (64 kbits/sec) */
10, /* 10 ms (HS/HF can use EV3, 2-EV3, 3-EV3) */
10, /* 10 ms (HS/HF can use EV3, 2-EV3) */
BTM_VOICE_SETTING_CVSD, /* Inp Linear, Air CVSD, 2s Comp, 16bit */
(BTM_SCO_PKT_TYPES_MASK_HV1 + /* Packet Types */
BTM_SCO_PKT_TYPES_MASK_HV2 +
BTM_SCO_PKT_TYPES_MASK_HV3 +
BTM_SCO_PKT_TYPES_MASK_EV3 +
BTM_SCO_PKT_TYPES_MASK_EV4 +
BTM_SCO_PKT_TYPES_MASK_EV5 +
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 +
(BTM_SCO_PKT_TYPES_MASK_HV1 | /* Packet Types */
BTM_SCO_PKT_TYPES_MASK_HV3 |
BTM_SCO_PKT_TYPES_MASK_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5),
BTM_ESCO_RETRANS_POWER /* Retransmission effort */
},
@ -100,7 +98,7 @@ static const tBTM_ESCO_PARAMS bta_ag_esco_params[BTA_AG_NUM_CODECS] =
BTM_64KBITS_RATE, /* RX Bandwidth (64 kbits/sec), 8000 */
8, /* 8 ms */
BTM_VOICE_SETTING_TRANS, /* Inp Linear, Transparent, 2s Comp, 16bit */
(BTM_SCO_PKT_TYPES_MASK_EV3 | /* Packet Types : EV3 + NO_2_EV3 */
(BTM_SCO_PKT_TYPES_MASK_EV3 | /* Packet Types : EV3 */
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5 |
@ -113,8 +111,7 @@ static const tBTM_ESCO_PARAMS bta_ag_esco_params[BTA_AG_NUM_CODECS] =
BTM_64KBITS_RATE, /* RX Bandwidth (64 kbits/sec), 8000 */
13, /* 13 ms */
BTM_VOICE_SETTING_TRANS, /* Inp Linear, Transparent, 2s Comp, 16bit */
(BTM_SCO_PKT_TYPES_MASK_EV3 | /* Packet Types : EV3 + 2-EV3 */
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
(BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 | /* Packet Types : 2-EV3 */
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5),
BTM_ESCO_RETRANS_QUALITY /* Retransmission effort */
@ -124,11 +121,11 @@ static const tBTM_ESCO_PARAMS bta_ag_esco_params[BTA_AG_NUM_CODECS] =
{
BTM_64KBITS_RATE, /* TX Bandwidth (64 kbits/sec) */
BTM_64KBITS_RATE, /* RX Bandwidth (64 kbits/sec) */
12, /* 12 ms (HS/HF can use EV3, 2-EV3) */
12, /* 12 ms (HS/HF can use 2-EV3) */
BTM_VOICE_SETTING_CVSD, /* Inp Linear, Air CVSD, 2s Comp, 16bit */
(BTM_SCO_LINK_ALL_PKT_MASK |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5),
(BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 | /* Packet Types : 2-EV3 */
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5),
BTM_ESCO_RETRANS_QUALITY /* Retransmission effort */
}
};
@ -143,15 +140,13 @@ static const tBTM_ESCO_PARAMS bta_ag_esco_params[] =
{
BTM_64KBITS_RATE, /* TX Bandwidth (64 kbits/sec) */
BTM_64KBITS_RATE, /* RX Bandwidth (64 kbits/sec) */
10, /* 10 ms (HS/HF can use EV3, 2-EV3, 3-EV3) */
10, /* 10 ms (HS/HF can use EV3, 2-EV3) */
BTM_VOICE_SETTING_CVSD, /* Inp Linear, Air CVSD, 2s Comp, 16bit */
(BTM_SCO_PKT_TYPES_MASK_HV1 + /* Packet Types */
BTM_SCO_PKT_TYPES_MASK_HV2 +
BTM_SCO_PKT_TYPES_MASK_HV3 +
BTM_SCO_PKT_TYPES_MASK_EV3 +
BTM_SCO_PKT_TYPES_MASK_EV4 +
BTM_SCO_PKT_TYPES_MASK_EV5 +
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 +
(BTM_SCO_PKT_TYPES_MASK_HV1 | /* Packet Types */
BTM_SCO_PKT_TYPES_MASK_HV3 |
BTM_SCO_PKT_TYPES_MASK_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5),
BTM_ESCO_RETRANS_POWER /* Retransmission effort */
},
@ -160,11 +155,11 @@ static const tBTM_ESCO_PARAMS bta_ag_esco_params[] =
{
BTM_64KBITS_RATE, /* TX Bandwidth (64 kbits/sec) */
BTM_64KBITS_RATE, /* RX Bandwidth (64 kbits/sec) */
12, /* 12 ms (HS/HF can use EV3, 2-EV3) */
12, /* 12 ms (HS/HF can use 2-EV3) */
BTM_VOICE_SETTING_CVSD, /* Inp Linear, Air CVSD, 2s Comp, 16bit */
(BTM_SCO_LINK_ALL_PKT_MASK |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5),
(BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5),
BTM_ESCO_RETRANS_QUALITY /* Retransmission effort */
}
};
@ -1659,7 +1654,8 @@ void bta_ag_sco_conn_rsp(tBTA_AG_SCB *p_scb, tBTM_ESCO_CONN_REQ_EVT_DATA *p_data
if (p_data->link_type == BTM_LINK_TYPE_SCO)
{
resp.retrans_effort = BTM_ESCO_RETRANS_OFF;
resp.packet_types = (BTM_SCO_LINK_ONLY_MASK |
resp.packet_types = (BTM_SCO_PKT_TYPES_MASK_HV1 |
BTM_SCO_PKT_TYPES_MASK_HV3 |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
@ -1674,8 +1670,9 @@ void bta_ag_sco_conn_rsp(tBTA_AG_SCB *p_scb, tBTM_ESCO_CONN_REQ_EVT_DATA *p_data
resp.retrans_effort = BTM_ESCO_RETRANS_QUALITY;
}
resp.packet_types = (BTM_SCO_LINK_ALL_PKT_MASK |
resp.packet_types = (BTM_SCO_PKT_TYPES_MASK_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5);
}
}

View File

@ -427,7 +427,8 @@ static void bta_hf_client_handle_ciev(UINT32 index, UINT32 value)
APPL_TRACE_DEBUG("%s index: %u value: %u", __FUNCTION__, index, value);
if (index >= BTA_HF_CLIENT_AT_INDICATOR_COUNT) {
if (index == 0 || index > BTA_HF_CLIENT_AT_INDICATOR_COUNT) {
APPL_TRACE_WARNING("%s: Invalid index %d", __FUNCTION__, index);
return;
}
@ -435,7 +436,7 @@ static void bta_hf_client_handle_ciev(UINT32 index, UINT32 value)
service_availability = value == 0 ? FALSE : TRUE;
}
realind = bta_hf_client_cb.scb.at_cb.indicator_lookup[index];
realind = bta_hf_client_cb.scb.at_cb.indicator_lookup[index - 1];
if (realind >= 0 && realind < BTA_HF_CLIENT_AT_SUPPORTED_INDICATOR_COUNT) {
/* get the real in-array index from lookup table by index it comes at */

View File

@ -47,7 +47,8 @@ static const tBTM_ESCO_PARAMS bta_hf_client_esco_params[] = {
.tx_bw = BTM_64KBITS_RATE,
.max_latency = 10,
.voice_contfmt = BTM_VOICE_SETTING_CVSD,
.packet_types = (BTM_SCO_LINK_ONLY_MASK |
.packet_types = (BTM_SCO_PKT_TYPES_MASK_HV1 |
BTM_SCO_PKT_TYPES_MASK_HV3 |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
@ -60,9 +61,9 @@ static const tBTM_ESCO_PARAMS bta_hf_client_esco_params[] = {
.tx_bw = BTM_64KBITS_RATE,
.max_latency = 10,
.voice_contfmt = BTM_VOICE_SETTING_CVSD,
/* Allow controller to use all types available except 5-slot EDR */
.packet_types = (BTM_SCO_LINK_ALL_PKT_MASK |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
/* Packet Types : 2-EV3 */
.packet_types = (BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5),
.retrans_effort = BTM_ESCO_RETRANS_POWER,
},
@ -72,10 +73,9 @@ static const tBTM_ESCO_PARAMS bta_hf_client_esco_params[] = {
.tx_bw = BTM_64KBITS_RATE,
.max_latency = 13,
.voice_contfmt = BTM_VOICE_SETTING_TRANS,
/* Packet Types : EV3 + 2-EV3 */
.packet_types = (BTM_SCO_PKT_TYPES_MASK_EV3 |
/* Packet Types : 2-EV3 */
.packet_types = (BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5),
.retrans_effort = BTM_ESCO_RETRANS_QUALITY,
},
@ -86,9 +86,9 @@ static const tBTM_ESCO_PARAMS bta_hf_client_esco_params[] = {
.tx_bw = BTM_64KBITS_RATE,
.max_latency = 12,
.voice_contfmt = BTM_VOICE_SETTING_CVSD,
/* Allow controller to use all types available except 5-slot EDR */
.packet_types = (BTM_SCO_LINK_ALL_PKT_MASK |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
/* Packet Types : 2-EV3 */
.packet_types = (BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5),
.retrans_effort = BTM_ESCO_RETRANS_QUALITY,
}

View File

@ -333,8 +333,6 @@ typedef struct
typedef struct
{
tBTA_AG_HDR hdr;
UINT16 handle;
tBTA_AG_STATUS status;
} tBTA_AG_REGISTER;
/* data associated with BTA_AG_OPEN_EVT */
@ -343,7 +341,6 @@ typedef struct
tBTA_AG_HDR hdr;
BD_ADDR bd_addr;
tBTA_SERVICE_ID service_id;
tBTA_AG_STATUS status;
} tBTA_AG_OPEN;
/* data associated with BTA_AG_CLOSE_EVT */

View File

@ -420,7 +420,7 @@ typedef tBTM_START_ADV_CMPL_CBACK tBTA_START_ADV_CMPL_CBACK;
typedef tBTM_START_STOP_ADV_CMPL_CBACK tBTA_START_STOP_ADV_CMPL_CBACK;
typedef tBTM_ADD_WHITELIST_CBACK tBTA_ADD_WHITELIST_CBACK;
typedef tBTM_UPDATE_WHITELIST_CBACK tBTA_UPDATE_WHITELIST_CBACK;
typedef tBTM_SET_PKT_DATA_LENGTH_CBACK tBTA_SET_PKT_DATA_LENGTH_CBACK;
@ -1756,9 +1756,9 @@ void BTA_DmSetQos(BD_ADDR bd_addr, UINT32 t_poll, tBTM_CMPL_CB *p_cb);
*******************************************************************************/
void BTA_DmBleSetChannels(const uint8_t *channels, tBTA_CMPL_CB *set_channels_cb);
extern void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr, tBLE_ADDR_TYPE addr_type, tBTA_ADD_WHITELIST_CBACK *add_wl_cb);
extern void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr, tBLE_ADDR_TYPE addr_type, tBTA_UPDATE_WHITELIST_CBACK *update_wl_cb);
extern void BTA_DmClearWhiteList(void);
extern void BTA_DmClearWhiteList(tBTA_UPDATE_WHITELIST_CBACK *update_wl_cb);
extern void BTA_DmBleReadAdvTxPower(tBTA_CMPL_CB *cmpl_cb);
#endif ///BLE_INCLUDED == TRUE

View File

@ -120,8 +120,8 @@ extern void bta_ar_dereg_avct(tBTA_SYS_ID sys_id);
** Returns void
**
******************************************************************************/
extern void bta_ar_reg_avrc(UINT16 service_uuid, char *p_service_name,
char *p_provider_name, UINT16 categories, tBTA_SYS_ID sys_id);
extern void bta_ar_reg_avrc(UINT16 service_uuid, char *p_service_name, char *p_provider_name,
UINT16 categories, tBTA_SYS_ID sys_id, BOOLEAN browsing_en);
/******************************************************************************
**

Some files were not shown because too many files have changed in this diff Show More