Compare commits

...

378 Commits

Author SHA1 Message Date
443e1cfd11 change(version): Update version to 5.4.0 2024-12-23 11:22:27 +08:00
497858f8d9 Merge branch 'docs/add_html_download_link_v5.4' into 'release/v5.4'
feat(docs): Replace PDF download link with HTML zip download link (v5.4)

See merge request espressif/esp-idf!35832
2024-12-23 09:21:18 +08:00
50948285c1 feat(docs): Replace PDF download link with HTML zip download link
PDF build would randomly fail after S3 docs grew to a certain size.

At 3k+ pages PDF is not very usable anyways.
For offline use an HTML archive makes more sense.
2024-12-20 10:27:09 +08:00
034245938c Merge branch 'ci/docs_master_build_v5.4' into 'release/v5.4'
ci(docs): revert d98e77a4a7 to simplify CI (v5.4)

See merge request espressif/esp-idf!35684
2024-12-18 11:08:35 +08:00
66c456ab59 ci(docs): revert d98e77a4a7 to simplify CI 2024-12-17 10:08:44 +08:00
9dcd2990a7 Merge branch 'feat/vfs_ops_make_all_op_pointers_const_v5.4' into 'release/v5.4'
feat(storage/vfs): make all member pointer of vfs_ops struct const (v5.4)

See merge request espressif/esp-idf!35624
2024-12-13 18:03:24 +08:00
bd0fc67f13 Merge branch 'feature/std_filesystem_supported_v5.4' into 'release/v5.4'
storage: make std::filesystem supported (v5.4)

See merge request espressif/esp-idf!35430
2024-12-13 17:56:42 +08:00
e8e8e2bc2a Merge branch 'bugfix/periph_clk_init_p4_v5.4' into 'release/v5.4'
fix(esp_system): hp periph clk should not be gated on core/system reset (v5.4)

See merge request espressif/esp-idf!35403
2024-12-13 13:55:16 +08:00
829419cef9 Merge branch 'fix/fix_esp32c2eco4_wifi_deinit_crash_issue_v54' into 'release/v5.4'
fix(wifi): fix esp32c2eco4 wifi deinit crash issue v54

See merge request espressif/esp-idf!35391
2024-12-13 13:48:50 +08:00
77e88f98cd fix(esp_system): still gate hp periph clk on core/system reset for power saving
Leaving only hp periph clk source should not be gated on core/system reset
2024-12-12 21:03:37 +08:00
192f01c65f fix(esp_system): hp periph clk should not be gated on core/system reset 2024-12-12 21:03:37 +08:00
d6d4de0907 feat(storage/vfs): make all member pointer of vfs_ops struct const 2024-12-12 13:49:46 +01:00
a0a85db5f5 Merge branch 'fix/adc_monitor_not_work_v5.4' into 'release/v5.4'
fix(esp_adc): fixed adc continue monitor don't work issue (v5.4)

See merge request espressif/esp-idf!35165
2024-12-12 16:55:04 +08:00
944329fff4 Merge branch 'fix/enhance_i2c_slave_test_stability_v5.4' into 'release/v5.4'
fix(i2c): Fix i2c read from fifo issue when enabling bt/wifi/uart, etc... (backport v5.4)

See merge request espressif/esp-idf!35434
2024-12-12 11:16:24 +08:00
0f1bec184d Merge branch 'bugfix/warn_rc32k_use_in_kconfig_v5.4' into 'release/v5.4'
fix(clk): add an inevitable kconfig option to be selected to use rc32k (v5.4)

See merge request espressif/esp-idf!35285
2024-12-11 23:39:34 +08:00
183834a82c Merge branch 'feat/add_pcnt_gpio_input_config_v5.4' into 'release/v5.4'
docs(pcnt): add gpio input mode documentation (v5.4)

See merge request espressif/esp-idf!35518
2024-12-11 22:09:10 +08:00
714c7738cd Merge branch 'fix/fix_esp32_pico_v3_psram_not_ignored_issue_v5.4' into 'release/v5.4'
psram: fixed esp32p pico-v3 psram init not ignored issue (v5.4)

See merge request espressif/esp-idf!35377
2024-12-11 22:07:25 +08:00
25346eb694 Merge branch 'fix/fix_tg_retention_failure_v5.4' into 'release/v5.4'
fix(esp_driver_gptimer): do gptimer retention by timer unit rather than timer group (v5.4)

See merge request espressif/esp-idf!35354
2024-12-11 20:55:15 +08:00
b3f2e1957b Merge branch 'bugfix/access_null_in_hf_cb_v5.4' into 'release/v5.4'
fix(bt/bluedroid): fixed access NULL in HFP callback handler (v5.4)

See merge request espressif/esp-idf!35407
2024-12-11 20:54:38 +08:00
5703a780af fix(esp_adc): fixed adc continue monitor don't work issue
Closes https://github.com/espressif/esp-idf/issues/14769
Closes https://github.com/espressif/esp-idf/issues/14814
2024-12-11 17:36:57 +08:00
b06209230c Merge branch 'bugfix/fix_ble_create_conn_params_copy_v5.4' into 'release/v5.4'
fix(bt/bluedroid): Fixed connection params copying when creating LE connection (v5.4)

See merge request espressif/esp-idf!35406
2024-12-11 14:27:20 +08:00
9b112e2a70 docs(pcnt): add pullup and pulldown documentation
Closes https://github.com/espressif/esp-idf/issues/14277
2024-12-09 20:23:06 +08:00
37101f5e0f fix(i2c): Fix some issue in programming guide,
Closes https://github.com/espressif/esp-idf/issues/14794
2024-12-05 13:22:51 +08:00
82903b0bc6 fix(i2c): Add bus handle check so that it will not be panic when there is no free bus,
Closes https://github.com/espressif/esp-idf/issues/14819
2024-12-05 13:22:43 +08:00
e7e7605d22 fix(bt/bluedroid): fixed access NULL in HFP callback handler 2024-12-05 13:20:50 +08:00
36834f34cd fix(i2c_slave): Fix the wrong semaphore take in isr 2024-12-04 19:29:05 +08:00
2ab0921a80 fix(i2c): Fix lose byte during data reading in i2c master on esp32,
Closes https://github.com/espressif/esp-idf/issues/12860
2024-12-04 19:28:43 +08:00
2803aed082 fix(i2c): Enhance lp clock source and avoid deadlock,
Closes https://github.com/espressif/esp-idf/issues/14908,
Closes https://github.com/espressif/esp-idf/issues/14906
2024-12-04 19:28:18 +08:00
122b579024 test(i2c): Enhance the stability for i2c tests 2024-12-04 19:28:10 +08:00
da2c883622 docs(cxx): add a section about std::filesystem limitations
Co-authored-by: Shen Meng Jing <shenmengjing@espressif.com>
2024-12-04 11:22:02 +01:00
e3f5a5a347 feat(storage): add a test app for std::filesystem features 2024-12-04 11:22:02 +01:00
80d4c75b89 feat(fatfs): add support for a few fcntl commands 2024-12-04 11:22:02 +01:00
7a214c1fab feat(newlib): add dummy implementations of pathconf, chmod, dirfd
Closes https://github.com/espressif/esp-idf/issues/14174
2024-12-04 11:22:02 +01:00
d79c4f7e28 docs(cxx): mark std::filesystem as generally supported (#5003)
Closes https://github.com/espressif/esp-idf/pull/13736
2024-12-04 11:22:01 +01:00
526e1b6970 fix(bt/bluedroid): Fixed connection params copying when creating LE connection 2024-12-03 17:52:49 +08:00
84bd87231d fix(wifi): fix esp32c2eco4 wifi deinit crash issue 2024-12-03 16:02:07 +08:00
a5eb720a9f fix(psram): fixed esp32p pico-v3 psram init not ignored issue
Closes https://github.com/espressif/esp-idf/issues/14970
2024-12-03 15:21:05 +08:00
afa697bd74 fix(esp_driver_gptimer): do gptimer retention by timer unit rather than timer group 2024-12-02 19:07:50 +08:00
4db067f8dc fix(esp_hw_support): remove p4 wdt retention on entry2 2024-12-02 19:05:04 +08:00
6f13d341c6 fix(esp_hw_support): fix retention link dump helper functions 2024-12-02 19:04:06 +08:00
623351e791 fix(clk): add an inevitable kconfig option to be selected to use rc32k 2024-12-02 11:15:17 +08:00
daf465c038 Merge branch 'bugfix/pm-215_pm-259_v5.4' into 'release/v5.4'
fix(Power Management): fix_esp32c5_and_esp32c61_ext1_wakeup_failed_after_changing_io

See merge request espressif/esp-idf!35276
2024-11-30 11:24:47 +08:00
fb271d25d2 Merge branch 'fix/ulp_riscv_interrupt_bug_v5.4' into 'release/v5.4'
fix(ulp): fix ULP RISC-V interrupt handler corrupting the stack (backport v5.4)

See merge request espressif/esp-idf!35225
2024-11-30 10:51:31 +08:00
e767502c6a Merge branch 'bugfix/esp_ringbuf_static_analyzer_v5.4' into 'release/v5.4'
fix(ringbuf): fixed logic errors when compiling with CONFIG_COMPILER_STATIC_ANALYZER (v5.4)

See merge request espressif/esp-idf!35300
2024-11-30 10:37:00 +08:00
25039926a6 Merge branch 'fix/duplicated_enc_restart_request_when_change_key_type_v5.4' into 'release/v5.4'
fix(bt): fixed some issues in esp32 bt controller(backport v5.4)

See merge request espressif/esp-idf!35295
2024-11-30 01:57:46 +08:00
1b4e4d7f83 Merge branch 'backport/backport_some_changes_to_v5.4' into 'release/v5.4'
backport some changes to release/v5.4

See merge request espressif/esp-idf!35283
2024-11-30 01:57:25 +08:00
3f63fd91ec Merge branch 'bugfix/fix_ble_creat_conn_fail_enh_v5.4' into 'release/v5.4'
fix(ble/bluedroid): Fixed BLE create connection fail because of invalid own address type (v5.4)

See merge request espressif/esp-idf!35019
2024-11-29 23:40:55 +08:00
7d4af9aedd fix(Power Management): fix_esp32c5_and_esp32c61_ext1_wakeup_failed_after_changing_io 2024-11-29 23:37:52 +08:00
0af23ceb2b fix(wifi): fix esp32c5 schan and nchan not take effect on 2.4G 2024-11-29 23:36:51 +08:00
bd21db34b2 fix(wifi): fix esp32c6 can receive data frames where the SA (Source Address) matches its own address 2024-11-29 23:36:51 +08:00
8886dba9d1 change(wifi): change softap default dtim period to 1 2024-11-29 23:36:51 +08:00
bbdcabe250 Merge branch 'fix/sdmmc_test_various_cmds_sdmmc_test_sd_skip_if_board_incompatible_emmc_parameter' into 'release/v5.4'
fix: Add missing parameter to a function in sdmmc_tests

See merge request espressif/esp-idf!35294
2024-11-29 22:22:01 +08:00
a47b17e4e0 Merge branch 'fix/lwip_dhcp_timeout_u32_v5.4' into 'release/v5.4'
fix(lwip): Fix DHCP lease overlow using u32 type (v5.4)

See merge request espressif/esp-idf!35274
2024-11-29 18:27:51 +08:00
0f24828900 Merge branch 'docs/update_vscode_extension_link_v5.4' into 'release/v5.4'
docs: Update vscode extension link in get started (v5.4)

See merge request espressif/esp-idf!35302
2024-11-29 18:14:26 +08:00
c166bf306f docs: Update vscode extension link in get started 2024-11-29 16:06:18 +08:00
2a04297e64 fix(ringbuf): fixed logic errors when compiling with CONFIG_COMPILER_STATIC_ANALYZER
ESP_STATIC_ANALYZER_CHECK was added to remove some static analyzer warning about
null pointer dereferences that should never happen, but the logic was wrong.

We return pdFALSE if prvReceiveGeneric was called with any of the input pointers
as NULL, but pvItem2 and xItemSize2 will only be non-null for split buffers.

Closes https://github.com/espressif/esp-idf/issues/14905
2024-11-29 15:11:19 +08:00
a3774cae8a fix(bt): fixed some issues in esp32 bt controller
1: fix duplicated lc_enc_restart_req when new lk type is semi-permanent
   key
2: reset PreventEncEvt flag at the end of restart encryption procedure
2024-11-29 14:10:01 +08:00
da9e87a711 Merge branch 'feature/switch_to_new_vfs_api_v5.4' into 'release/v5.4'
feat(storage): switch to new VFS API (v5.4)

See merge request espressif/esp-idf!35282
2024-11-29 13:52:03 +08:00
34a35b9591 Merge branch 'fix/usb_device_msc_storage_example_backport_v5.4' into 'release/v5.4'
fix(tusb_msc): Added SD power supply configuration for p4 (backport v5.4)

See merge request espressif/esp-idf!35102
2024-11-29 13:49:46 +08:00
1bc92b46fd fix: Add missing parameter to a function in sdmmc_tests
In sdmmc_test_various_cmds.c in sdmmc_test_sd_skip_if_board_incompatible function
2024-11-29 04:10:10 +01:00
023d772d90 Merge branch 'bugfix/chip823_pll_bug_v5.4' into 'release/v5.4'
fix(H2):fix pll low temp bug(v5.4)

See merge request espressif/esp-idf!35242
2024-11-29 10:47:55 +08:00
20bd6add52 Merge branch 'feature/mmu_page_size_from_app_bin_v5.4' into 'release/v5.4'
feat(bootloader): add support to use MMU page size from app binary (v5.4)

See merge request espressif/esp-idf!35070
2024-11-29 10:44:26 +08:00
236affbff2 Merge branch 'fix/tusb_midi_task_stack_overflow_v5.4' into 'release/v5.4'
fix(examples): tusb_midi task stack overflow fix (v5.4)

See merge request espressif/esp-idf!34933
2024-11-29 10:42:21 +08:00
985090a453 Merge branch 'feature/adds_efuse_adc_calib_data2_v5.4' into 'release/v5.4'
feat(efuse): Adds efuse ADC calib data for P4 C5 C61 (v5.4)

See merge request espressif/esp-idf!35118
2024-11-29 10:41:33 +08:00
850d102ea5 Merge branch 'fix/ble_mesh_heartbeat_bug_v5.4' into 'release/v5.4'
fix(ble_mesh): fixed heartbeat issue (v5.4)

See merge request espressif/esp-idf!34966
2024-11-29 10:29:03 +08:00
def8b9b639 feat(storage/vfs): move semihost to new vfs API 2024-11-28 13:56:34 +01:00
7fe45180db feat(storage/vfs): move l2tap to new vfs API 2024-11-28 13:56:34 +01:00
0cd2e72dc1 feat(storage/esp_vfs_console): move console to new vfs API 2024-11-28 13:56:33 +01:00
4ff53bc9c7 feat(storage/vfs): move jtag driver to new vfs API 2024-11-28 13:56:33 +01:00
0aa10dcb43 feat(storage/vfs): move uart driver to new vfs API 2024-11-28 13:56:33 +01:00
906b3df54b feat(storage/vfs): move nullfs to new API 2024-11-28 13:56:32 +01:00
39197864a1 feat(storage/vfs): make part of nullfs API private 2024-11-28 13:56:32 +01:00
bb305bd109 feat(storage/esp_vfs_console): move cdcacm driver to new vfs API 2024-11-28 13:56:32 +01:00
e5ab487e3c feat(storage/vfs): update docs to new version of API 2024-11-28 13:56:31 +01:00
6b07039281 feat(storage/spiffs): move spiffs to new VFS API 2024-11-28 13:56:31 +01:00
09d222c38d feat(storage/fatfs): move fatfs to new VFS API 2024-11-28 13:56:31 +01:00
ced490fc6e feat(storage/vfs): make subcomponent pointers const 2024-11-28 13:56:26 +01:00
05b6d92042 Merge branch 'bugfix/esp32c3_eco7_usj_console_v5.4' into 'release/v5.4'
fix(esp_rom): fix esp32c3 eco7 console rom function address (v5.4)

See merge request espressif/esp-idf!34738
2024-11-28 19:55:38 +08:00
d85744af43 fix(lwip): Fix DHCP lease overlow using u32 type 2024-11-28 10:06:14 +01:00
5af12cf722 Merge branch 'bugfix/resolve_watchdog_crash_v5.4' into 'release/v5.4'
fix(nimble): Resolved watchdog due to memory exceed prints (v5.4)

See merge request espressif/esp-idf!35209
2024-11-28 14:46:54 +08:00
830d836fb1 Merge branch 'change/use_uart0_for_ram_app_c5_v5.4' into 'release/v5.4'
ci(ram_app): use uart0 config (v5.4)

See merge request espressif/esp-idf!35245
2024-11-28 11:23:55 +08:00
5e0fe45c25 Merge branch 'bugfix/add_aa_check_on_esp32c2_and_esp32c6_v5.4' into 'release/v5.4'
Bugfix/add aa check on esp32c2 and esp32c6 (v5.4)

See merge request espressif/esp-idf!35234
2024-11-28 11:02:34 +08:00
dac9e60690 Merge branch 'fix/enhance_wifi_connection_check_in_ot_ci_case_v5.4' into 'release/v5.4'
feat(openthread): enhance wifi connection check in openthread ci cases (Backport v5.4)

See merge request espressif/esp-idf!35164
2024-11-28 10:46:26 +08:00
138b3390c5 ci(ram_app): use uart0 config 2024-11-28 10:08:43 +08:00
60c561792c Merge branch 'fix/sdmmc_send_acmd22_after_multiple_write_cmd_v5.4' into 'release/v5.4'
fix(sdmmc): Send ACMD22 if CMD25 fails (v5.4)

See merge request espressif/esp-idf!34860
2024-11-28 02:11:25 +08:00
f48f07a418 Merge branch 'feature/storage_nvs_bootloader_v5.4' into 'release/v5.4'
feat(storage/nvs): NVS bootloader support (v5.4)

See merge request espressif/esp-idf!35249
2024-11-28 01:55:03 +08:00
b88913ca27 Merge branch 'feature/update-toolchain-to-esp-14.2.0_20241119_v5.4' into 'release/v5.4'
feat(tools): update toolchain version to esp-14.2.0_20241119 (v5.4)

See merge request espressif/esp-idf!35140
2024-11-27 22:26:47 +08:00
4e8bb8a082 feat(nvs_flash): Implemented basic nvs_flash support for bootloader 2024-11-27 15:22:46 +01:00
c2ae806661 Merge branch 'change/sysview_test_config_v5.4' into 'release/v5.4'
change(sysview): run heap_log tracing tests on existing cores (v5.4)

See merge request espressif/esp-idf!35195
2024-11-27 19:04:02 +08:00
2f6a7ec1ae fix(nimble): Resolved watchdog due to memory exceed prints 2024-11-27 18:00:37 +08:00
zlq
7a92f14df6 fix(H2):fix pll low temp bug 2024-11-27 17:46:10 +08:00
02cc012db5 feat(ble/bluedroid): Support setting connection params when creating connection 2024-11-27 17:13:21 +08:00
4ed30165d8 fix(ble/bluedroid): Optimize BLE API "esp_ble_gattc_enh_open" 2024-11-27 17:07:24 +08:00
719a2313be fix(ble/bluedroid): Fixed BLE create connection fail because of invalid own address type 2024-11-27 17:07:24 +08:00
315b1ec4ae Merge branch 'fix/littlefs_image_creation_windows_v5.4' into 'release/v5.4'
fix(littlefs): Allow LittleFS image generation on Windows + version bump (v5.4)

See merge request espressif/esp-idf!34915
2024-11-27 16:21:18 +08:00
079acc88a7 fix(ble): fixed the connect issue when rx error aa on ESP32-H2
(cherry picked from commit 093b65e27c)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-11-27 16:03:51 +08:00
903307b191 fix(ble): fixed the connect issue when rx error aa on ESP32-C6
(cherry picked from commit 69b535d422)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-11-27 16:03:49 +08:00
516e1131a7 feat(openthread): enhance wifi connection check in openthread ci cases 2024-11-27 15:53:37 +08:00
a516ca527d Merge branch 'bugfix/fix_bleqabr24_1646_v5.4' into 'release/v5.4'
Fixed BLE creating connection when the connection already exists on ESP32 (v5.4)

See merge request espressif/esp-idf!35047
2024-11-27 15:45:05 +08:00
ab4fa65d0d fix(ulp): fix ULP RISC-V interrupt handler corrupting the stack
* Closes https://github.com/espressif/esp-idf/issues/14930
2024-11-27 11:43:15 +08:00
409a75936a feat(efuse): Adds efuse ADC calib data for ESP32-C61 2024-11-26 22:17:23 +08:00
b1662f643a feat(efuse): Adds efuse ADC calib data for ESP32-C5 2024-11-26 22:17:23 +08:00
8f58a27418 Merge branch 'change/p4_sd_runner_no_use_usj_v5.4' into 'release/v5.4'
ci(sd): use uart0 as usj always serial noise on ci on p4 (v5.4)

See merge request espressif/esp-idf!35191
2024-11-26 18:01:10 +08:00
e5d377be8d fix(sysview): add prefix to the module desc to avoid stuck in Segger SystemView app
Closes https://github.com/espressif/esp-idf/issues/10483
2024-11-26 10:51:18 +01:00
688b86ba24 change(sysview): support single/dual core targets in heap_trace_log test 2024-11-26 08:49:30 +01:00
4cf553509e Merge branch 'feat/remove_unused_sdkconfig_in_ble_examples_v5.4' into 'release/v5.4'
fix(ble/example): Removed unused sdkconfig files (v5.4)

See merge request espressif/esp-idf!35189
2024-11-26 15:46:04 +08:00
ef3c64d006 Merge branch 'fix/fix_jpeg_decode_info_v5.4' into 'release/v5.4'
fix(jpeg_decoder): Fix jpeg decoder get picture information (backport v5.4)

See merge request espressif/esp-idf!35157
2024-11-26 15:36:37 +08:00
56ec6b8b66 test(emmc): disabled emmc tests on p4 2024-11-26 15:10:28 +08:00
fbbfa3bab3 ci(sd): use uart0 as usj always serial noise on ci on p4 2024-11-26 15:09:38 +08:00
5fdf844c0a test(sd): no uhs1 runner 2024-11-26 15:09:34 +08:00
76d90ba1ca Merge branch 'bugfix/disconn_sdp_upon_wrong_data_v5.4' into 'release/v5.4'
fix(bt/bluedroid): disconnect SDP connection on receiving incorrect response (v5.4)

See merge request espressif/esp-idf!35143
2024-11-26 15:00:07 +08:00
3eab76508e Merge branch 'feat/add_profile_state_event_v5.4' into 'release/v5.4'
feat(bt/bluedroid): added events to indicate the profile states of HFP (v5.4)

See merge request espressif/esp-idf!35148
2024-11-26 14:59:31 +08:00
c37e7ced7d fix(bt): Update bt lib for ESP32(c3082c4)
- Fixed BLE creating connection when the connection already exists
2024-11-26 14:46:02 +08:00
9e2decf7df Merge branch 'ci/fix_pytest_otatool_for_c2_v5.4' into 'release/v5.4'
fix(examples): Fix pytest_otatool for C2 (v5.4)

See merge request espressif/esp-idf!35116
2024-11-26 13:05:21 +08:00
8805bf97d3 feat(ble/example): Removed unused sdkconfig files
(cherry picked from commit 57b98f4e1e)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2024-11-26 12:05:37 +08:00
3915ea30f2 Merge branch 'bugfix/fix_c2_light_sleep_coex_v5.4' into 'release/v5.4'
fix(ble): fix ble light sleep error on esp32c2 (v5.4)

See merge request espressif/esp-idf!35056
2024-11-26 10:50:33 +08:00
9181ecabf8 Merge branch 'backport/openthread_related_feature_v54_20241125' into 'release/v5.4'
Backport openthread related features to 5.4

See merge request espressif/esp-idf!35172
2024-11-26 09:51:38 +08:00
37cb1521a1 Merge branch 'feat/add_activate_debug_information_v5.4' into 'release/v5.4'
feat(tools): Imporve activate.py debug information (v5.4)

See merge request espressif/esp-idf!35170
2024-11-25 17:41:59 +08:00
af5ddf0eb6 Merge branch 'contrib/github_pr_14767_v5.4' into 'release/v5.4'
fix(gptimer): race on FSM state in gptimer_start() (GitHub PR) (v5.4)

See merge request espressif/esp-idf!35134
2024-11-25 17:24:23 +08:00
2e2740d20b feat(tools): Imporve activate.py debug information 2024-11-25 10:13:02 +01:00
65ce617a8d fix(jpeg_decoder): Fix jpeg decoder get picture information 2024-11-25 14:37:06 +08:00
aa3e5d9832 feat(openthread): adjusted the default macro configurations of openthread 2024-11-25 14:31:28 +08:00
b813889b62 feat(openthread): support using custom header file 2024-11-25 12:29:56 +08:00
fe3bb073f9 Merge branch 'refactor/i2c_ll_trm_sync_v5.4' into 'release/v5.4'
refactor(i2c): rename some LL functions according to TRM descriptions (v5.4)

See merge request espressif/esp-idf!35107
2024-11-25 10:30:02 +08:00
e8c3b6418c feat(bt/bluedroid): added events to indicate the profile states of HFP 2024-11-25 10:21:55 +08:00
f22b03cd7e fix(bt/bluedroid): disconnect SDP connection on receiving incorrect response 2024-11-25 10:19:05 +08:00
bb72e51d6a feat(tools): update toolchain version to esp-14.2.0_20241119 2024-11-23 14:39:35 +07:00
fd89e9f144 fix(tools): fix adding tar.gz archive to tools.json if tar.xz is present 2024-11-23 14:39:35 +07:00
8a17f7f8c5 Merge branch 'fix/lwip_tcp_pcb_recycle_v5.4' into 'release/v5.4'
fix(lwip): Limit active TCP PCBs and recycle them faster (v5.4)

See merge request espressif/esp-idf!35092
2024-11-23 02:53:41 +08:00
7d9970590a fix(lwip): Limit active TCP PCBs and recycle them faster
Update submodule: git log --oneline c816f0ee..a587d929
  - test: Add tcp-pcb recycle test (espressif/esp-lwip@a587d929)
  - tcp: Apply faster PCB recycling in FIN_WAIT_1 or FIN_WAIT_2 state (espressif/esp-lwip@3bfc85d2)
  - test: Add tcp alloc limitation test (espressif/esp-lwip@0c9c39a9)
  - memp: Employ TCP-PCB allocation limit if libc malloc used (espressif/esp-lwip@9cb96ac1)
2024-11-22 14:45:36 +01:00
b1c4c9ae2f Merge branch 'fix/lwip_ping_ipv6only_v5.4' into 'release/v5.4'
fix(lwip): Fix IP6 raw socket checksum in IPv6-only configuration (v5.4)

See merge request espressif/esp-idf!35083
2024-11-22 21:38:49 +08:00
c122f727d1 Merge branch 'bugfix/lmp_trans_collision_v5.4' into 'release/v5.4'
fix(bt/controller): Fixed some controller bugs on ESP32 (v5.4)

See merge request espressif/esp-idf!34944
2024-11-22 19:15:02 +08:00
fa3cdccb18 fix(gptimer): race condition between start and stop
Merges https://github.com/espressif/esp-idf/pull/14767
2024-11-22 18:22:47 +08:00
438c0634af Merge branch 'feat/optimize_cble50y24_110_v5.4' into 'release/v5.4'
feat(bt/bluedroid): Added BLE 5.0 throughput examples (v5.4)

See merge request espressif/esp-idf!35010
2024-11-22 17:53:44 +08:00
94aa1c0d5d fix(sdmmc): Fix ACMD22 DMA buffer problem for ESP32-P4 2024-11-22 17:13:07 +08:00
2d5d2509fb test(sdmmc): Add test_apps test for sdmmc component 2024-11-22 17:13:07 +08:00
68c1423cf3 fix(sdmmc): Generalize waiting for card idle to a function 2024-11-22 17:13:07 +08:00
1f0931f6d1 fix(sdmmc): Send ACMD22 if CMD25 fails
Send the number of the written write blocks (ACMD22) after
write multiple blocks fails (CMD25)
2024-11-22 17:13:07 +08:00
47d0a913e0 Merge branch 'doc/vad_programming_guide_v5.4' into 'release/v5.4'
doc: lp_i2s and vad programming guide (v5.4)

See merge request espressif/esp-idf!35108
2024-11-22 15:48:31 +08:00
bc89933ad6 Merge branch 'bugfix/wps_ie_reset_v54' into 'release/v5.4'
fix(wifi): Remove WPS IEs once WPS succeeds (v5.4)

See merge request espressif/esp-idf!35071
2024-11-22 14:39:24 +08:00
b56ad1d633 Merge branch 'fix/ws_transport_head_fragments_v5.4' into 'release/v5.4'
fix(ws_transport): Fix reading WS header in fragments (v5.4)

See merge request espressif/esp-idf!35088
2024-11-22 13:43:19 +08:00
5e65f632a3 Merge branch 'feature/avoid_compiling_wifi_components_when_wifi_is_unsupported_v5.4' into 'release/v5.4'
feat(wifi): avoid compiling components related to wifi when wifi is not supported(Backport v5.4)

See merge request espressif/esp-idf!35062
2024-11-22 13:42:51 +08:00
31ef58d98e Merge branch 'fix/add_sbom_exception_v5.4' into 'release/v5.4'
Add an exception in wpa_supplicant sbom.yml (Backport v5.4)

See merge request espressif/esp-idf!35061
2024-11-22 13:41:52 +08:00
569f6c0213 Merge branch 'fix/fix_modem_module_clock_missing_after_ota_v5.4' into 'release/v5.4'
fix(esp_system): deselect all modem modules lp clock source selection before clk initialization (v5.4)

See merge request espressif/esp-idf!34923
2024-11-22 13:41:23 +08:00
7bba3dfe8a fix(esp_rom): fix esp32c3 eco7 console rom function address 2024-11-22 13:40:05 +08:00
ed5a540439 fix(examples): Fix pytest_otatool for C2
Test for C2 has to be run with flash_4mb
2024-11-22 07:09:03 +02:00
5cd5ede2f5 fix(bt/controller): Fixed some controller bugs on ESP32
- Fixed wrong logic in handling sniff transaction collision at slave
      side
    - Fixed the issue ACL is stopped too early before eSCO
2024-11-22 11:01:30 +08:00
dc6fc5a1f5 fix(bt): fix some issues in bt controller
1: Store local device name into NVDS when handling hci_wr_local_name_cmd.
2: Set default device name during link manager initialization.
3: Set the QoS value to the minimum value if the calculated QoS is less
   than the minumum.
2024-11-22 11:01:30 +08:00
5c722289b6 fix(bt/ble): Update esp32 libbtdm_app.a (17db8bd)
- Added a verification step for the Access Address within the CONNECT_IND PDU
2024-11-22 11:01:30 +08:00
f4f1d20c82 fix(bt/bluedroid): AG should send OK or other error codes to HF client
when it is driven by HF to initiate a call.
2024-11-22 11:01:30 +08:00
4207ec8b3b doc(vad): remove vad png 2024-11-22 10:47:05 +08:00
6aa6883af4 change(lp_i2d): use atomic fsm check 2024-11-22 10:46:53 +08:00
22f36bea53 change(vad): wakeup driver maitain necessary power domain 2024-11-22 10:46:49 +08:00
37d8e97a9d doc(lp_vad): lp vad programming guide 2024-11-22 10:46:43 +08:00
e4a9243517 doc(lp_i2s): lp i2s programming guide 2024-11-22 10:46:39 +08:00
e83fc30b67 fix(lp_i2s): added cbs iram check 2024-11-22 10:46:34 +08:00
85e86626ff refactor(i2c): rename some LL functions according to TRM descriptions 2024-11-22 10:14:22 +08:00
30f0c6f5db Merge branch 'docs/usb_host_ext_port_driver_backport_v5.4' into 'release/v5.4'
docs(ext_port): Maintainers Notes for the External Port Driver (backport v5.4)

See merge request espressif/esp-idf!35100
2024-11-22 10:06:15 +08:00
6048d26493 Merge branch 'fix/import_error_msg_v5.4' into 'release/v5.4'
fix(tools): re-raise ImportError without module name (v5.4)

See merge request espressif/esp-idf!35073
2024-11-22 01:37:20 +08:00
8fc6dad7ff fix(tusb_msc): Added SD power supply configuration for p4 2024-11-21 13:10:03 +01:00
adb468bade docs(ext_port): Maintainers Notes for the External Port Driver 2024-11-21 12:49:32 +01:00
e1c0ad9189 Merge branch 'fix/aes_cache_failure_when_l2_cache_line_size_greater_than_l1_cache_v5.4' into 'release/v5.4'
Fix memory corruption caused due to unaligned external memory buffers sync in AES (v5.4)

See merge request espressif/esp-idf!35064
2024-11-21 18:35:33 +08:00
2822cc671a fix(lwip): Fix ping_v6 receiving to accept only echo replies
This fixes a bug where we ping our own IP and the request itself
bounces back to the raw receive function and is incorrectly treated as
reply. (this bug was discovered when fixing ICMPv6 pings with incorrect
checksums, while the ping request was dropped in icmpv6.c due to wrong
checksum, but was also fed to raw layers where it was treated as
"correct" response, so the PINGv6 to ourselves still worked)
2024-11-21 11:24:46 +01:00
e390c17f99 fix(common_connect): Fix example's stdin/out to setup UART interrupt once
Function example_configure_stdin_stdout() was used for simple UART I/O
operation in CI to enter test env configuration (wifi ssid, IPs, etc).
It could be called multiple times, but didn't handle the situation where
we install UART interrupt from multiple source (e.g. in ICMP tests,
where we first need to enter wifi credentials of test AP and then we
start ping-cmd console to handle ping commands)
2024-11-21 11:24:46 +01:00
f75e399139 fix(lwip): Fix IP6 raw socket checksum in IPv6-only configuration
* Update submodule: git log --oneline f150e232..c816f0ee
  - sockets: Make IPv6 only netconn type IPv6 aware (espressif/esp-lwip@c816f0ee)
  - test: Make test application scalable (espressif/esp-lwip@3ec12c3b)
  - dns: Handle active DNS entries before clearing cache (espressif/esp-lwip@b15cd2de)
2024-11-21 11:24:30 +01:00
9d7a4e5917 change(bootloader): Map only the necessary length when fetching the app description struct 2024-11-21 15:12:55 +05:30
fbe93aa25e test: add configurable mmu page size test app
Test app to ensure that bootloader and application built with
different flash MMU page size are compatible. This is for the
SoCs that support configurable flash MMU page size.
2024-11-21 15:11:45 +05:30
07318a4987 feat(bootloader): add support to use MMU page size from app binary
For the SoCs that support configurable MMU page size, it is possible
that the bootloader and application are built with different MMU page
size configuration. This mismatch is not supported at the moment and
application verification fails (at bootup or during OTA update).

Configuring MMU page size helps to optimize the flash space by having
smaller alignment and padding (secure) requirements. Please note that
the MMU page size is tied with the flash size configuration at the
moment (`ESPTOOLPY_FLASHSIZE_XMB`).

This MR ensures that application verification happens using the MMU page
size configured in its binary header. Thus, bootloader and application
can now have different MMU page sizes and different combinations shall
be supported.
2024-11-21 15:11:38 +05:30
15636a2f14 fix(ws_transport): Unit test on reading WS data byte by byte
Closes https://github.com/espressif/esp-idf/issues/14704
Closes https://github.com/espressif/esp-protocols/issues/679
2024-11-21 10:39:23 +01:00
b8a7d96e98 fix(ws_transport): Fix reading WS header bytes
Correct split header bytes

When the underlying transport returns header,
length, or mask bytes early, again call the
underlying transport.

This solves the WS parser getting offset when
the server sends a burst of frames where the
last WS header is split across packet boundaries,
so fewer than the needed bytes may be available.

Merges https://github.com/espressif/esp-idf/pull/14706
2024-11-21 10:39:23 +01:00
2151f23f46 fix(tools): re-raise ImportError without module name
The ImportError or ModuleNotFoundError might be raised without
specifying a module name. In this not so common situation, re-raise the
exception to print all the information that could assist in identifying
the problem.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-21 09:37:12 +01:00
234dce0e7f fix(wifi): Remove WPS IEs once WPS succeeds 2024-11-21 13:42:29 +05:30
e0312feddb fix(mbedtls/aes): Fix external memory corruption caused due to unaligned length cache sync
Fixes the memory corruption issue that arises due to external memory cache sync of unaligned
length bytes when L2 cache line size is greater than the L1 cache line size
2024-11-21 12:15:57 +05:30
a34f1eb6f9 feat(wifi): avoid compiling components related to wifi when wifi is not supported 2024-11-21 14:18:41 +08:00
8580f9f622 fix(wpa_supplicant): Add an exception in wpa_supplicant sbom.yml 2024-11-21 11:48:19 +05:30
999b10d2d4 fix(ble): change ld for ble scan coex issue
(cherry picked from commit dd499d7b2e)

Co-authored-by: cjin <jinchen@espressif.com>
2024-11-21 11:03:55 +08:00
43cd3491c9 fix(ble): fix ble light sleep error on esp32c2
(cherry picked from commit 23f7e33a97)

Co-authored-by: cjin <jinchen@espressif.com>
2024-11-21 11:03:53 +08:00
9240757145 Merge branch 'fix/fix_a_naming_error_of_esp_radio_spinel_v54' into 'release/v5.4'
fix a naming error of esp radio spinel (backport to 5.4)

See merge request espressif/esp-idf!35041
2024-11-21 10:35:23 +08:00
914a4810a9 Merge branch 'bugfix/idf-11064_v5.4' into 'release/v5.4'
backport v5.4: fix some issues on esp32c5 eco1

See merge request espressif/esp-idf!34790
2024-11-20 19:38:13 +08:00
48ed77c9cc Merge branch 'bugfix/rx_invalid_cmd_err_code_v5.4' into 'release/v5.4'
fix(bt/bluedroid): Fixed the incorrect error code returned when receiving an invalid command(v5.4)

See merge request espressif/esp-idf!34987
2024-11-20 19:12:23 +08:00
a61663d63b Merge branch 'bugfix/crash_deauth_fix_5.4' into 'release/v5.4'
Fix for crash while receiving deauth in esp32c2 ECO4(v5.4)

See merge request espressif/esp-idf!34984
2024-11-20 19:10:59 +08:00
b5c02eb3d8 Merge branch 'bugfix/fix_classic_bt_build_fail_v5.4' into 'release/v5.4'
fix(bt/bluedroid): Fixed classic bt build fail when enable dynamic memory and disable BLE (v5.4)

See merge request espressif/esp-idf!34931
2024-11-20 18:05:49 +08:00
28bf5eacb9 Merge branch 'feature/support_moving_code_to_flash_v5.4' into 'release/v5.4'
feat(ble): Support for putting code in flash on ESP32-C2 (v5.4)

See merge request espressif/esp-idf!34786
2024-11-20 17:46:55 +08:00
8d4b04742c Merge branch 'fix/c61_h2_pmu_icg_csv_update_v5.4' into 'release/v5.4'
fix(pmu): c61 and h2 update pmu_icg_mapping.h (v5.4)

See merge request espressif/esp-idf!34795
2024-11-20 17:41:37 +08:00
a09d5747e1 Merge branch 'bugfix/esp_bt_wifi_bt_power_api_v5.4' into 'release/v5.4'
fix(bt): Move esp_wifi_bt_power_domain_on/off to esp_phy_init.h(v5.4)

See merge request espressif/esp-idf!34626
2024-11-20 16:27:01 +08:00
f70bec1cf8 fix(openthread): fix a naming error of esp radio spinel 2024-11-20 15:47:38 +08:00
4cc82c7d66 Merge branch 'feat/sleep_retention_expand_module_bitmap_v5.4' into 'release/v5.4'
backport v5.4: expand the number of sleep retention modules supported on different chips

See merge request espressif/esp-idf!34691
2024-11-20 14:50:52 +08:00
0e966ba0d6 Merge branch 'feat/mipi_dsi_underrun_error_v5.4' into 'release/v5.4'
feat(mipi_dsi): enable underrun error interrupt (v5.4)

See merge request espressif/esp-idf!34980
2024-11-20 14:47:09 +08:00
6abf54e150 fix(pmu): c61 and h2 update pmu_icg_mapping.h 2024-11-20 10:32:40 +08:00
9c2a5ac60e Merge branch 'fix/twai_io_init_glitch_v5.4' into 'release/v5.4'
fix(driver_twai): fixed bus-off when twai_init due to wrong gpio config (v5.4)

See merge request espressif/esp-idf!34815
2024-11-20 10:32:05 +08:00
fb52ad1d26 Merge branch 'fix/p4_spi_no_dma_polling_cache_fail_v5.4' into 'release/v5.4'
fix(driver_spi): fixed p4 no dma polling trans cache sync fail (v5.4)

See merge request espressif/esp-idf!34813
2024-11-20 10:18:33 +08:00
c46fe1fa4f Merge branch 'fix/add_network_reconnectin_in_ot_ci_case_v5.4' into 'release/v5.4'
feat(openthread): flush ipv6 addr in openthread ci cases(Backport v5.4)

See merge request espressif/esp-idf!34675
2024-11-20 10:15:49 +08:00
dfe11ebb47 Merge branch 'doc/isp_lsc_doc_v5.4' into 'release/v5.4'
isp: lsc doc (v5.4)

See merge request espressif/esp-idf!35021
2024-11-20 10:12:19 +08:00
0960a602f4 feat(mipi_dsi): enable underrun error interrupt 2024-11-19 21:42:47 +08:00
15202df249 Merge branch 'ci/fix_i2s_multi_dev_test_potential_overflow_v5.4' into 'release/v5.4'
ci(i2s): fix the potential overflow in multi_dev test (v5.4)

See merge request espressif/esp-idf!35022
2024-11-19 18:15:31 +08:00
5fef371bad fix(ble_mesh): fixed heartbeat issue
(cherry picked from commit 167cd4762b)

Co-authored-by: luoxu <luoxu@espressif.com>
2024-11-19 18:03:23 +08:00
be95e8e14b Merge branch 'bugfix/memory_issue_v5.4' into 'release/v5.4'
fix(nimble): Nimble Error logs in case of memory overflow/failure (v5.4)

See merge request espressif/esp-idf!34997
2024-11-19 16:56:40 +08:00
3ea47a6cf3 docs(i2s): update i2s cap overview 2024-11-19 15:57:26 +08:00
1a685b7e1c ci(i2s): fix the potential overflow in multi_dev test 2024-11-19 15:57:24 +08:00
cad2ff8de5 feat(openthread): flush ipv6 addr in openthread ci cases 2024-11-19 15:48:40 +08:00
17b7419786 Merge branch 'fix/update_ping_cmd_version_v5.4' into 'release/v5.4'
update: Update ping-cmd component to v1.0.0 (v5.4)

See merge request espressif/esp-idf!35012
2024-11-19 14:59:23 +08:00
69a9b17587 Merge branch 'backport/openthread_related_feature_v54_20241112' into 'release/v5.4'
Backport openthread related features to 5.4

See merge request espressif/esp-idf!34834
2024-11-19 14:54:03 +08:00
b873befcd8 doc(isp): isp lsc programming guide 2024-11-19 14:33:55 +08:00
10b3296085 change(sdmmc): simplify cmd11 enable code 2024-11-19 14:30:31 +08:00
b282c41954 fix(driver_spi): fixed p4 no dma polling trans cache sync fail 2024-11-19 11:50:47 +08:00
928b7f6efc fix(driver_twai): fixed bus-off when twai_init due to wrong gpio config
Closes https://github.com/espressif/esp-idf/issues/14548
2024-11-19 11:50:29 +08:00
e8f76a93a1 change: Update ping-cmd component to v1.0.0 2024-11-19 11:38:16 +08:00
91fe5d7fa8 feat(bt/bluedroid): Added BLE 5.0 throughput examples
(cherry picked from commit 6d3a82eecf)

Co-authored-by: zhangbowen <zhangbowen@espressif.com>
2024-11-19 10:33:44 +08:00
91c2390897 fix(bt): Move esp_wifi_bt_power_domain_on/off to esp_phy_init.h 2024-11-19 10:12:59 +08:00
52bcb74b67 fix(esp_hw_support): fix the issue of wifi rx packet loss when switchng soc root clock source 2024-11-18 21:52:00 +08:00
ea6dd7344d fix(esp_hw_support): fix the issue of mmu table content loss due to default sd signal 2024-11-18 21:52:00 +08:00
e422e12f17 Merge branch 'feat/dynamic_usb_hal_backport_v5.4' into 'release/v5.4'
feat(hal/usb): Make USB-DWC HAL&LL configuration independent backport v5.4

See merge request espressif/esp-idf!34812
2024-11-18 21:40:16 +08:00
16d7351cbc fix(nimble): Nimble Error logs in case of memory overflow/failure 2024-11-18 17:47:05 +08:00
71f83bd02b change(esp_hw_support): fix some sleep retention build error 2024-11-18 17:46:41 +08:00
4b0faf47b4 change(soc): define sleep retention module total number to 64 for esp32p4 2024-11-18 17:46:41 +08:00
a56249f631 change(esp_hw_support): update power domain pd allowed check logic 2024-11-18 17:46:41 +08:00
bde6b9141f change(esp_hw_support): update some modules sleep retention init dependency bitmap 2024-11-18 17:46:40 +08:00
06587938fb Merge branch 'feature/remove_min_max_def_v5.4' into 'release/v5.4'
fix(nimble): Removed min/max macro definition from os.h (v5.4)

See merge request espressif/esp-idf!34909
2024-11-18 17:07:25 +08:00
8480fb3c6f fix(bt/bluedroid): Fixed the incorrect error code returned
when receiving an invalid command
2024-11-18 16:49:54 +08:00
00a6f825b0 change(soc): add sleep retention module total number definition 2024-11-18 16:05:34 +08:00
78b272c092 feat(esp_hw_support): extend sleep retention module bitmap bit width 2024-11-18 15:57:42 +08:00
538b0fc180 Merge branch 'fix/fix_tsens_retention_p4_v5.4' into 'release/v5.4'
fix(temperature_sensor): Fix temperature sensor sleep retention on p4 (backport v5.4)

See merge request espressif/esp-idf!34979
2024-11-18 14:31:15 +08:00
853a944cd0 fix(esp_rom): Comment out unused function pointers in esp32c2 eco4 linker file 2024-11-18 11:49:50 +05:30
1917e7f532 fix(esp_wifi): Fix for crash while receiving deauth in esp32c2 ECO4 2024-11-18 11:45:46 +05:30
84569bc94f Merge branch 'backport/2015_enhack_v54' into 'release/v5.4'
fix(802.15.4): add case for 2015 frame enh-ack (Backport v5.4)

See merge request espressif/esp-idf!34954
2024-11-18 11:48:48 +08:00
35f0fdcd36 Merge branch 'fix/fix_deadlock_in_pm_mode_switching_v5.4' into 'release/v5.4'
fix(esp_pm): fix deadlock in pm_mode switching (v5.4)

See merge request espressif/esp-idf!34938
2024-11-18 11:20:01 +08:00
479f7bfdc4 fix(temperature_sensor): Fix temperature sensor sleep retention on p4 2024-11-18 10:37:50 +08:00
75e0cc387e Merge branch 'fix/thread_resolve_invalid_host_v5_4' into 'release/v5.4'
fix(openthread): Fix invalid host resolving for Thread end devices(v5.4)

See merge request espressif/esp-idf!34942
2024-11-17 21:29:26 +08:00
zwx
d5d07b44ef feat(openthread): support alloc nat64 session from psram 2024-11-15 18:53:28 +08:00
f9ac9f052e enable openthread coap client for mtd 2024-11-15 18:53:28 +08:00
8b098ae53c fix(coex): fix 802.15.4 external coexistence 2024-11-15 18:53:28 +08:00
14bc7c01ea feat(openthread): update openthread submodule and border router lib 2024-11-15 18:53:28 +08:00
71c437767f Merge branch 'feat/i2c_slave_v2_v5.4' into 'release/v5.4'
feat(i2c_slave): Add new i2c slave driver --version two with great stretch handling (backport v5.4)

See merge request espressif/esp-idf!34907
2024-11-15 15:36:46 +08:00
e3fe456cf9 fix(802.15.4): add case for 2015 frame enh-ack 2024-11-15 15:15:55 +08:00
41ce4c9e07 Merge branch 'fix/fix_cache_stuck_in_esp_restart_v5.4' into 'release/v5.4'
fix(esp_system): writeback L1 Dcache before disable L2 if PSRAM used (v5.4)

See merge request espressif/esp-idf!34801
2024-11-15 13:56:19 +08:00
2c35c09742 fix(esp_pm): fix deadlock in pm_mode switching 2024-11-15 11:25:58 +08:00
78362aff04 fix(esp_pm): fix missed ccompare update when another core is already in do_switch 2024-11-15 11:25:58 +08:00
7cf389deab fix(openthread): Fix invalid host resolving for Thread end devices 2024-11-15 11:24:00 +08:00
356e7b6954 Merge branch 'feat/esp32p4_unicore_stop_other_core_v5.4' into 'release/v5.4'
feat(esp_system): stop other core for unicore esp32p4 (v5.4)

See merge request espressif/esp-idf!34827
2024-11-15 11:10:48 +08:00
a2d26ab56f fix(esp_system): deselect all modem modules clk source selection before clk init 2024-11-15 11:00:54 +08:00
779106e49c Merge branch 'contrib/github_pr_14859_v5.4' into 'release/v5.4'
fix(usb_host): return ESP_ERR_NO_MEM on failed alloc in client register (GitHub PR) (v5.4)

See merge request espressif/esp-idf!34875
2024-11-15 10:56:46 +08:00
63ef26e9ee Merge branch 'ci/backport_i2s_ci_fix_to_v5.4' into 'release/v5.4'
ci(i2s): backport i2s ci fix (v5.4)

See merge request espressif/esp-idf!34586
2024-11-15 10:53:39 +08:00
68a95f5c94 feat(hal/usb): Make USB-DWC HAL&LL configuration independent
Previously, we included symbols from soc/usb_dwc_cfg.h and configured
the HAL and LL according to it. Now we get the configuration in runtime
from USB-DWC registers.

Added missing definition for USB FS peripheral on ESP32-P4.
2024-11-15 00:36:10 +08:00
8b1f8cb20e fix(examples): tusb_midi task stack overflow fix 2024-11-14 16:43:16 +01:00
0dea1a84d6 fix(bt/bluedroid): Fixed classic bt build fail when enable dynamic memory and disable BLE
(cherry picked from commit 59d20e80d3)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-11-14 22:13:50 +08:00
af18afd279 Merge branch 'fix/typo-esp-rom_v5.4' into 'release/v5.4'
fix(esp_rom): Fix comment typos (Backport v5.4)

See merge request espressif/esp-idf!34870
2024-11-14 21:49:19 +08:00
94e55817d2 fix(littlefs): Allow LittleFS image generation on Windows + version bump
Closes https://github.com/espressif/esp-idf/issues/12900
2024-11-14 13:17:40 +01:00
d21a0a9b64 fix(nimble): Removed min/max macro defination from os.h
Closes https://github.com/espressif/esp-idf/issues/14840
2024-11-14 19:04:33 +08:00
32adbe72b6 docs(i2c_slave): Update i2c slave programming guide for new changes 2024-11-14 18:04:25 +08:00
170d44b75d feat(i2c_slave): Add new example for making i2c slave as a network sensor 2024-11-14 18:04:11 +08:00
e27594efc1 test(i2c_slave): Add some new tests for i2c slave version 2 2024-11-14 18:02:27 +08:00
56625cda88 feat(i2c_slave): refactor i2c slave api to version 2 inorder to solve some existing problem 2024-11-14 18:02:15 +08:00
5304897608 feat(esp_system): stop other core for unicore esp32p4 2024-11-14 09:40:08 +01:00
6d7fd7a722 Merge branch 'change/disable_stub_bins_v5.4' into 'release/v5.4'
change(esp_system): do not include openocd stub bins by default (v5.4)

See merge request espressif/esp-idf!34871
2024-11-14 12:41:45 +08:00
0c5d3749f1 Merge branch 'fix/find_and_close_service_in_ot_ci_case_v5.4' into 'release/v5.4'
fix(ci): optimize an openthread ci case (Backport v5.4)

See merge request espressif/esp-idf!34727
2024-11-14 11:59:43 +08:00
3b2eb13199 Merge branch 'feat/sdmmc_uhs_tuning_v5.4' into 'release/v5.4'
sdmmc: UHS-I support for SDR50 (100MHz, 50MB/s), DDR50 (50MHz, 50MB/s) (v5.4)

See merge request espressif/esp-idf!34867
2024-11-14 11:13:45 +08:00
e1aed77c72 Merge branch 'feat/mcpwm_sleep_rentention_v5.4' into 'release/v5.4'
feat(mcpwm): support sleep retention (v5.4)

See merge request espressif/esp-idf!34802
2024-11-14 10:46:49 +08:00
76d87acd59 fix(i2s): suplimemt of c61 i2s ll 2024-11-14 10:18:16 +08:00
24a6994471 feat(i2s): support i2s retention on C61 2024-11-14 10:18:16 +08:00
ecf7f8257f ci(i2s): fix i2s_multi_dev failed case 2024-11-14 10:18:16 +08:00
551cb70a1b Merge branch 'fix/disable_sar_power_when_enter_deepsleep_v5.4' into 'release/v5.4'
fix(esp_hw_support): disable sar power when esp32p4 going to deepsleep (v5.4)

See merge request espressif/esp-idf!34869
2024-11-14 10:09:56 +08:00
85a742351c Merge branch 'feat/size_unify_sections_v5.4' into 'release/v5.4'
feat(tools): unify sections in idf.py size reports for NG version (v5.4)

See merge request espressif/esp-idf!34855
2024-11-14 02:18:07 +08:00
6932df2ce8 Merge branch 'change/esp_ldo_reserve_for_spi_flash_v5.4' into 'release/v5.4'
LDO calibration on ESP32-P4 (v5.4)

See merge request espressif/esp-idf!34864
2024-11-13 17:11:39 +08:00
35aaccdbc1 fix(usb_host): return ESP_ERR_NO_MEM on failed alloc in client register
Fixes issue where ESP_ERR_NO_MEM was being silently discarded after
cleaning up after a failed malloc in usb_host_client_register.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-11-13 10:08:04 +01:00
09f1411389 Merge branch 'fix/suspend_ci_v5.4' into 'release/v5.4'
test(spi_flash): Fix some failing test related to spi flash (backport v5.4)

See merge request espressif/esp-idf!34819
2024-11-13 17:07:40 +08:00
35ed582ebf Merge branch 'fix/bod_p4eco2_fix_v5.4' into 'release/v5.4'
fix(bod): Remove config for bod on p4 eco1  (backport v5.4)

See merge request espressif/esp-idf!34821
2024-11-13 17:02:59 +08:00
ad8d75222a Merge branch 'fix/jpeg_com_marker_v5.4' into 'release/v5.4'
fix(jpeg): Fix the length of com marker (backport v5.4)

See merge request espressif/esp-idf!34822
2024-11-13 17:02:27 +08:00
368f71443b change(esp_system): do not include openocd stub bins by default 2024-11-13 07:36:07 +01:00
dbd394cb4a fix(esp-rom): Fix comment typos in cache.h
Fix typo in parameter names in cache_flash_mmu_set
amd cache_sram_mmu_set functions.

Closes https://github.com/espressif/esp-idf/pull/14518
2024-11-13 07:00:49 +01:00
88c345aca8 fix(esp_hw_support): disable sar power when esp32p4 going to deepsleep 2024-11-13 11:44:46 +08:00
2e44cb9387 feat(mcpwm): support sleep retention 2024-11-13 11:13:34 +08:00
c8fa2a1f42 fix(mcpwm): fix mcpwm register offset on p4 2024-11-13 11:13:34 +08:00
0f32537b93 fix(i2s): fixed i2s example build warning 2024-11-13 11:12:24 +08:00
c1a8efaf09 doc(sdmmc): aadd UHS1 support for DDR50 / SDR50 2024-11-13 11:12:19 +08:00
a89abd5eac example(sdmmc): support hs and uhs1 sdr50/ddr50 2024-11-13 11:12:14 +08:00
04cd469e4a feat(sdmmc): supported UHS-I SDR50 (100Mhz) and DDR50 mode 2024-11-13 11:12:10 +08:00
31dc34a909 feat(sdmmc): support for voltage switching in protocol layer 2024-11-13 11:11:23 +08:00
a03cbdba2e change(sdmmc): enable UHS-1 support in test_app, swap slots on P4 EV board 2024-11-13 11:08:25 +08:00
b8de3dfb35 change(sdmmc): adapt host state machine for CMD11, commit reg/struct files 2024-11-13 11:08:09 +08:00
a8efd39877 change(sdmmc): disable the logic related to D3 line, it needs to be connected for CMD11 to work 2024-11-13 11:08:05 +08:00
c9e7d09e0a change(sdmmc): allow speciying pins for IOMUX slots as well 2024-11-13 11:07:39 +08:00
646cb24b71 change(sdmmc): make sdmmc_host_clock_update_command compatible with CMD11 2024-11-13 11:07:29 +08:00
8baade44fd test(spi_flash): Fix some failing test related to spi flash 2024-11-13 10:58:53 +08:00
2db5607060 fix(bod): Remove config for bod on p4 v0.x 2024-11-13 10:58:33 +08:00
0aa8d7f7c9 fix(jpeg): Fix the length of com marker 2024-11-13 10:57:48 +08:00
59e3a1f046 feat(ble): Support for putting code in flash on ESP32-C2
(cherry picked from commit 192f13135488a2f8a386ace2dad69da59e81f5b5)

Co-authored-by: Shen Weilong <shenweilong@espressif.com>
2024-11-13 10:45:03 +08:00
e5a5cb8779 feat(ldo): load calibration parameters from efuse 2024-11-13 10:18:30 +08:00
c9be3c2dc6 feat(efuse): Adds efuse ADC calib data for ESP32-P4 2024-11-13 10:18:30 +08:00
8ea7ae7086 Merge branch 'fix/nvs_generator_test_fail_due_to_safer_write_namespace_function_v5.4' into 'release/v5.4'
fix(nvs): Fix the NVS generator test (write_namespace safer behavior change) (v5.4)

See merge request espressif/esp-idf!34857
2024-11-13 03:45:05 +08:00
67ab814756 fix(nvs): Fix the nvs generator test (write_namespace safer behavior change) 2024-11-12 14:56:38 +01:00
67039c590d feat(tools): unify sections in idf.py size reports for NG version
By default, esp-idf-size.ng displays all sections individually. This can
be confusing, especially if CONFIG_SOC_MEM_NON_CONTIGUOUS_SRAM is
enabled, resulting in sections like .dram0.data and .dram1.data being
abbreviated as two .data sections in the size report. To avoid confusion
for idf.py and cmake users, pass the --unify option to the underlying
esp_idf_size.ng by default.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2024-11-12 14:13:02 +01:00
29003010a3 Merge branch 'feat/mipi_dsi_yuv_converter_v5.4' into 'release/v5.4'
feat(lcd): support YUV422 input color format (v5.4)

See merge request espressif/esp-idf!34760
2024-11-12 15:04:46 +08:00
7481f7eb9e Merge branch 'ci/known-failure-cases-5.4' into 'release/v5.4'
Ci/known failure cases 5.4

See merge request espressif/esp-idf!34688
2024-11-12 10:37:32 +08:00
bfebd2e3ff Merge branch 'bugfix/gpio_set_level_atomic_v5.4' into 'release/v5.4'
fix(gpio): improve set level performance (v5.4)

See merge request espressif/esp-idf!34764
2024-11-11 14:24:47 +08:00
054706c115 fix(esp_system): writeback L1 Dcache before disable L2 if PSRAM used 2024-11-11 14:02:35 +08:00
df64e63bbd Merge branch 'fix/bypass_some_restore_process_if_sleep_rejected_v5.4' into 'release/v5.4'
fix(esp_hw_support): skip some wakeup steps if sleep is rejected (v5.4)

See merge request espressif/esp-idf!34622
2024-11-09 00:37:21 +08:00
3b0cf1a2ea Merge branch 'bugfix/backport_some_wifi_fixes_v5.4' into 'release/v5.4'
fix(wifi): backport some wifi fixes to v5.4

See merge request espressif/esp-idf!34690
2024-11-09 00:33:43 +08:00
12c49601c3 Merge branch 'feature/support_to_query_phy_rf_used_time_v5.4' into 'release/v5.4'
feat(phy): support to query phy used time

See merge request espressif/esp-idf!34624
2024-11-09 00:05:31 +08:00
36e78b3bd3 Merge branch 'bugfix/chip823_pll_low_temp_bug_v5.4' into 'release/v5.4'
[H2]Fix cpu switch fail for bbpll cali fail bug in low temp (v5.4)

See merge request espressif/esp-idf!34598
2024-11-08 23:28:38 +08:00
82802eb460 Merge branch 'bugfix/fix_avrc_absolute_volume_compatibility_v5.4' into 'release/v5.4'
bugfix/fix_avrc_absolute_volume_compatibility[backport v5.4]

See merge request espressif/esp-idf!34769
2024-11-08 22:28:10 +08:00
68d680bafd Merge branch 'ci/fix_macos_ccache_v5.4' into 'release/v5.4'
CI: Fix failing ccache and show ccache statistics for macOS tests (master) (v5.4)

See merge request espressif/esp-idf!34758
2024-11-08 19:46:14 +08:00
b79c8faba4 Merge branch 'fix/fix_writeback_psram_after_vo2_powerdown_v5.4' into 'release/v5.4'
fix(esp_hw_support): fix writeback cache to psram after vo2 powerdown (v5.4)

See merge request espressif/esp-idf!34579
2024-11-08 18:44:13 +08:00
019afc0f80 fix: fix pll low temp bug 2024-11-08 18:01:54 +08:00
0e43df1a47 Merge branch 'feat/pcnt_sleep_retention_v5.4' into 'release/v5.4'
feat(pcnt): add sleep retention init to avoid light sleep when pcnt is working (v5.4)

See merge request espressif/esp-idf!34728
2024-11-08 17:31:28 +08:00
2afa1cc04d Merge branch 'update/version_5_4_0' into 'release/v5.4'
Update version to 5.4.0

See merge request espressif/esp-idf!34743
2024-11-08 16:23:23 +08:00
91006fdee1 feat(phy): support to query phy used time 2024-11-08 16:23:16 +08:00
59230175df fix(esp_hw_support): skip some wakeup steps if sleep is rejected
1. Skip esp_timer time compensation to avoid introducing errors into rtc_timer
    2. Ignore sleep_time_overhead_out measurements when sleep is rejected
2024-11-08 16:08:32 +08:00
98fccdef20 Merge branch 'bugfix/osi_replace_free_v5.4' into 'release/v5.4'
fix(bt/bluedroid): Replace free/malloc with osi_free/malloc(v5.4)

See merge request espressif/esp-idf!34605
2024-11-08 16:07:08 +08:00
49fbe54bc4 feat(lcd): support color conversion for mipi dsi driver 2024-11-08 15:23:06 +08:00
d7dd068478 fix(bt/bluedroid): Fixed AVRCP compatibility issue on absolute volume synchronization 2024-11-08 14:48:03 +08:00
1d87c94ca3 fix(wifi/pm): Fixed the tbtt interval update error when AP's beacon interval changed
Closes https://github.com/espressif/esp-idf/issues/14720
2024-11-08 12:08:59 +08:00
c433d95441 fix(wifi): fix esp32c61 can not tx frame under ht40 above 2024-11-08 12:08:59 +08:00
30acf8b5d1 feat(twt): twt add parameter to enable keep alive 2024-11-08 12:08:59 +08:00
3d95fd17e3 docs(wifi): add migration guide for types change in wifi 2024-11-08 12:08:59 +08:00
504a248ba1 fix(wifi): modify bandwidth in wifi_ap_record_t 2024-11-08 12:08:59 +08:00
295f1576e1 fix(wifi/mesh): Enlarge the mesh TX task stack 2024-11-08 12:08:59 +08:00
e36118f4f0 fix(wifi): Support AES IV with random value in esptouch v2 2024-11-08 12:08:59 +08:00
49b8292f51 fix(wifi): fix some wifi issues 241031
1. fix cant sleep if reconnect to connected ap
    2. clear pmk in internal reconnection
    3. update connect status for init-->auth
    4. add protection for probe request when wifi band is 5g
2024-11-08 12:08:59 +08:00
ea05f7f647 fix(wifi): fix spiram ignore issue 2024-11-08 12:08:59 +08:00
e2c732c906 feat(wifi): add wifi support for esp32c5 eco1 2024-11-08 12:08:59 +08:00
a5fee4b8cc fix(gpio): improve set level performance
by avoid "read-modify-write" operation. The registers designed to be
write only.

Related to https://github.com/espressif/esp-idf/issues/14674
2024-11-08 11:44:08 +08:00
1254494dd8 fix(macos): ccache: re-enable, show stats, set CCACHE_DIR, limit CCACHE_MAXSIZE 2024-11-07 17:39:49 +01:00
64b9d85a76 change(version): Update version to 5.4.0 2024-11-07 12:55:42 +05:50
ec8de8a1f9 Merge branch 'feat/mcpwm_dead_time_add_warning_v5.4' into 'release/v5.4'
fix(mcpwm): add warning about generator deadtime (v5.4)

See merge request espressif/esp-idf!34729
2024-11-07 14:52:29 +08:00
c366277e64 Merge branch 'fix/fetch_image_hdr_v5.4' into 'release/v5.4'
fix(esp_system): Correct address used to fetch application image header (v5.4)

See merge request espressif/esp-idf!34627
2024-11-07 13:48:54 +08:00
31befbfad3 feat(pcnt): add sleep retention init
Currently, due to the lack of sleep callback feature. We only init
sleep module but don't allocate it. Thus the power domain will be
kept during the light sleep. And temporarily disable pcnt sleep
retention support on P4 due to the lack of retention module ID.
2024-11-07 12:09:26 +08:00
dd8b4fa06e Merge branch 'backport/upgrade-zigbee-examples-v5.4' into 'release/v5.4'
feat(zigbee): Upgrade the Zigbee lib to v1.6 for Zigbee examples(Backport v5.4)

See merge request espressif/esp-idf!34716
2024-11-07 11:39:54 +08:00
343bb81729 Merge branch 'fix/esp_prov_ipv6_resolve_v5_4' into 'release/v5.4'
fix(tools/esp_prov): Fix hostname resolving for IPv6-only host(v5.4)

See merge request espressif/esp-idf!34679
2024-11-07 11:07:34 +08:00
7946eb51e0 fix(mcpwm): add warning about generator deadtime
Closes https://github.com/espressif/esp-idf/issues/14773
2024-11-07 10:56:57 +08:00
367059b93d Merge branch 'backport/linker_script_check_missing_function_v54' into 'release/v5.4'
fix(802.15.4): add no inline to some static function(Backport v5.4)

See merge request espressif/esp-idf!34722
2024-11-07 10:53:37 +08:00
454c3140ad fix(ci): optimize an openthread ci case 2024-11-07 10:49:37 +08:00
b0a9704c3d feat(zigbee): Upgrade the Zigbee lib to v1.6 for Zigbee examples
- Optimize the Zigbee light, switch and gateway examples
- Remove the esp_zigbee_rcp example
2024-11-07 10:39:39 +08:00
bab289ca78 Merge branch 'fix/sdio_slave_add_pm_lock_v5.4' into 'release/v5.4'
fix(sdio_slave): fix issue that auto light sleep can happen SDIO slave enabled (v5.4)

See merge request espressif/esp-idf!34646
2024-11-07 02:31:38 +08:00
81020a3748 Merge branch 'feat/support_controller_run_in_flash_only_v5.4' into 'release/v5.4'
feat/support controller run in flash only(backport v5.4)

See merge request espressif/esp-idf!34625
2024-11-06 20:06:08 +08:00
zwx
ab2e360266 fix(802.15.4): add no inline to some static function 2024-11-06 19:49:17 +08:00
500165ffb3 fix(bt/bluedroid): Replace free/malloc with osi_free/malloc 2024-11-06 19:15:04 +08:00
69d72ca243 Merge branch 'ci/nightly_run_crt_bundle_stress_test_v5.4' into 'release/v5.4'
Run https x509 bundle default crt bundle stress test using QEMU (v5.4)

See merge request espressif/esp-idf!34660
2024-11-06 18:45:15 +08:00
2b12fb6daa Merge branch 'docs/fix_section_visibility_esp32p4_v5.4' into 'release/v5.4'
Fix typo to make a section visible for non-esp32 SPIRAM supported targets (v5.4)

See merge request espressif/esp-idf!34680
2024-11-06 17:45:06 +08:00
7f42ed38fd Merge branch 'bugfix/fix_ble_build_fail_v5.4' into 'release/v5.4'
fix(ble/bluedroid): Fixed BLE build fail when enable dynamic memory and BLE5.0 (v5.4)

See merge request espressif/esp-idf!34665
2024-11-06 16:36:46 +08:00
b763700bc8 Merge branch 'bugfix/fixed_h2_assert_master_1031_v5.4' into 'release/v5.4'
Bugfix/fixed h2 assert master 1031 (v5.4)

See merge request espressif/esp-idf!34541
2024-11-06 15:06:45 +08:00
764f5414ff Merge branch 'ci/run_gdma_after_reset_v5.4' into 'release/v5.4'
fix(gdma): run test cases after reset (v5.4)

See merge request espressif/esp-idf!34689
2024-11-06 15:02:47 +08:00
1e37c32fb6 Merge branch 'bugfix/fix_mem_debug_on_bluedroid_v5.4' into 'release/v5.4'
fix(bt/bluedroid): Fixed error when memory debug enabled (v5.4)

See merge request espressif/esp-idf!34576
2024-11-06 11:50:40 +08:00
ee5e2798ba Merge branch 'fix/nmi_not_triggering_on_s3_v5.4' into 'release/v5.4'
fix(examples): fix NMI interrupt example to work on ESP32-S3 (release v5.4)

See merge request espressif/esp-idf!34687
2024-11-06 11:31:51 +08:00
eeb4baf17f fix(gdma): run test cases after reset 2024-11-06 11:24:16 +08:00
17a023989b ci: updated known failure cases file env 2024-11-06 10:42:40 +08:00
ad910e3ce0 fix(examples): fix NMI interrupt example to work on ESP32-S3 2024-11-06 10:15:09 +08:00
f5c71b8715 Merge branch 'bugfix/wrong_return_type_v5.4' into 'release/v5.4'
fix(i2c_lcd): wrong return type for esp_lcd_new_panel_io_i2c (v5.4)

See merge request espressif/esp-idf!34653
2024-11-05 21:28:26 +08:00
7c9bec2633 docs(mem_alloc): Fix typo to make a section visible for non-esp32 spiram targets 2024-11-05 16:13:08 +05:30
c17aa3e020 Merge branch 'fix/sysview_stack_overflow_v5.4' into 'release/v5.4'
fix(sysview): reduce isr stack usage to avoid stack guard exception (v5.4)

See merge request espressif/esp-idf!34614
2024-11-05 18:36:25 +08:00
2980c7f5e5 fix(tools/esp_prov): Fix hostname resolving for IPv6-only host 2024-11-05 17:47:14 +08:00
9685b3b4ca fix(ble/bluedroid): Fixed BLE build fail when enable dynamic memory and BLE5.0
(cherry picked from commit 94d1a4f1c0)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2024-11-05 16:13:51 +08:00
8b8956f7ed ci(examples/protocols): Run the https x509 bundle default crt bundle stress test using QEMU 2024-11-05 13:31:48 +05:30
1754c8f8e5 Merge branch 'backport/fix_energy_scan_api_para_mismatch_v54' into 'release/v5.4'
fix(openthread): set channel for energy scan(Backport v5.4)

See merge request espressif/esp-idf!34597
2024-11-05 14:28:08 +08:00
2770a95a5f fix(i2c_lcd): wrong return type for esp_lcd_new_panel_io_i2c
when build for C++ project
2024-11-05 13:46:16 +08:00
f012157cf9 Merge branch 'feat/openthread_dataset_changed_event_v5_4' into 'release/v5.4'
feat(openthread): Add dataset changed event and post it in state change callback(v5.4)

See merge request espressif/esp-idf!34548
2024-11-05 12:17:22 +08:00
3e0611757b fix(sdio_slave): prevents peripheral power domain being powered off when SDIO slave in use 2024-11-05 03:22:06 +08:00
802e7b2192 feat(sleep_retention): allow drivers taking TOP power lock
Also add a dump function
2024-11-05 03:22:01 +08:00
a2ffd9e955 Merge branch 'ci/fix_diff_manifest_sha_v5.4' into 'release/v5.4'
ci: use different base commit for merge result pipelines (v5.4)

See merge request espressif/esp-idf!34582
2024-11-05 01:07:13 +08:00
0505eb80c9 fix(ble): fixed occasional crash issue in low memory scenarios on ESP32-H2
(cherry picked from commit dbad6a0ca5)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-11-05 00:05:58 +08:00
ae6f824fcf fix(ble): fixed occasional crash issue in low memory scenarios on ESP32-C6
(cherry picked from commit dabd66e16f)

Co-authored-by: zwl <zhaoweiliang@espressif.com>
2024-11-05 00:05:58 +08:00
e0e285b841 fix(esp_system): Correct address used to fetch application image header 2024-11-04 14:07:17 +05:30
2a05eb8fd3 feat(bt/controller): Support controller code run in flash only 2024-11-04 15:44:11 +08:00
651e5adbda fix(esp_hw_support): only support power down flash after revison v1.0 on esp32p4 2024-11-04 14:08:29 +08:00
2558760224 fix(esp_hw_support): fix writeback cache to psram after vo2 powerdown 2024-11-04 14:08:28 +08:00
0e6c74e93d Merge branch 'bugfix/fix_memory_leak_in_sco_v5.4' into 'release/v5.4'
fix(bt/bluedroid): Fix memory leak in sco when bluedroid disable (v5.4)

See merge request espressif/esp-idf!34564
2024-11-04 11:35:39 +08:00
b21b7294c6 Merge branch 'feature/add_ledc_output_in_sleep_test_v5.4' into 'release/v5.4'
feat(ledc): added a multi device test for testing ledc output in sleep (v5.4)

See merge request espressif/esp-idf!34522
2024-11-04 11:35:11 +08:00
131609cf29 Merge branch 'fix/fix_ota_slowclock_switching_v5.4' into 'release/v5.4'
fix(esp_hw_support): fix rtc slow clock missing after the OTA app changes the slow clock source (v5.4)

See merge request espressif/esp-idf!34488
2024-11-04 11:34:40 +08:00
92cc8a5512 fix(sysview): reduce isr stack usage to avoid stack guard exception 2024-11-01 22:30:37 +01:00
zwx
7c03514a28 fix(openthread): set channel for energy scan 2024-11-01 16:40:51 +08:00
5f62667aba ci: use different base commit for merge result pipelines 2024-10-31 13:53:50 +01:00
c6810a102b fix(bt/bluedroid): Fixed error when memory debug enabled 2024-10-31 19:12:47 +08:00
9677b9bfaf feat(openthread): Add dataset changed event and post it in state change callback 2024-10-31 19:04:00 +08:00
6fe128ac6f fix(bt/bluedroid): Fix memory leak in sco when bluedroid disable 2024-10-31 17:52:31 +08:00
33103306a6 feat(ledc): added a multi device test for testing ledc output in sleep 2024-10-30 14:06:42 +08:00
851679e63a Merge branch 'maint/release_v5.4_codeowners' into 'release/v5.4'
change(gitlab): simplify approvals for backports (v5.4)

See merge request espressif/esp-idf!34481
2024-10-29 17:26:54 +08:00
280f6cb4e9 fix(esp_hw_support): disable unused clock sources after rtc clock switching complete 2024-10-28 20:16:01 +08:00
cf5bdf5e9f fix(esp_hw_support): enable all supported slow clock at pmu_init 2024-10-28 20:15:55 +08:00
661a487610 change(gitlab): simplify approvals for backports (v5.4) 2024-10-28 10:38:15 +01:00
768 changed files with 75526 additions and 278459 deletions

View File

@ -1,4 +1,4 @@
[codespell]
skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb,components/wpa_supplicant/*,components/esp_wifi/*,*.pem
ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,wel,ot,fane,assertIn,registr,oen
ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,wel,ot,fane,assertIn,registr,oen,parms
write-changes = true

View File

@ -2,248 +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
/.codespellrc @esp-idf-codeowners/ci
/.github/workflows/ @esp-idf-codeowners/ci
/.gitlab-ci.yml @esp-idf-codeowners/ci
/.gitlab/ci/ @esp-idf-codeowners/ci
/.pre-commit-config.yaml @esp-idf-codeowners/ci
/.readthedocs.yml @esp-idf-codeowners/docs
/.vale.ini @esp-idf-codeowners/docs
/CMakeLists.txt @esp-idf-codeowners/build-config
/COMPATIBILITY*.md @esp-idf-codeowners/peripherals
/CONTRIBUTING.md @esp-idf-codeowners/docs
/Kconfig @esp-idf-codeowners/build-config
/README*.md @esp-idf-codeowners/docs
/ROADMAP*.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/debugging
/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_bootloader_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_driver_*/ @esp-idf-codeowners/peripherals
/components/esp_driver_sdmmc/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/storage
/components/esp_eth/ @esp-idf-codeowners/network
/components/esp_event/ @esp-idf-codeowners/system
/components/esp_gdbstub/ @esp-idf-codeowners/debugging
/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_hw_support/lowpower/ @esp-idf-codeowners/power-management
/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_security/ @esp-idf-codeowners/security
/components/esp_system/ @esp-idf-codeowners/system
/components/esp_timer/ @esp-idf-codeowners/system
/components/esp-tls/ @esp-idf-codeowners/app-utilities
/components/esp_vfs_*/ @esp-idf-codeowners/storage
/components/esp_vfs_console/ @esp-idf-codeowners/storage @esp-idf-codeowners/system
/components/esp_wifi/ @esp-idf-codeowners/wifi
/components/espcoredump/ @esp-idf-codeowners/debugging
/components/esptool_py/ @esp-idf-codeowners/tools
/components/fatfs/ @esp-idf-codeowners/storage
/components/freertos/ @esp-idf-codeowners/system
/components/hal/ @esp-idf-codeowners/peripherals
/components/hal/test_apps/crypto/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/security
/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/toolchain
/components/nvs_flash/ @esp-idf-codeowners/storage
/components/nvs_sec_provider/ @esp-idf-codeowners/storage @esp-idf-codeowners/security
/components/openthread/ @esp-idf-codeowners/ieee802154
/components/partition_table/ @esp-idf-codeowners/system
/components/perfmon/ @esp-idf-codeowners/debugging
/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/rt/ @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/docs_not_updated/ @esp-idf-codeowners/all-maintainers
/docs/**/api-guides/tools/ @esp-idf-codeowners/tools
/docs/en/api-guides/core_dump.rst @esp-idf-codeowners/debugging
/docs/**/api-guides/wifi* @esp-idf-codeowners/wifi
/docs/**/api-guides/esp-wifi-mesh.rst @esp-idf-codeowners/wifi
/docs/en/api-guides/jtag-debugging/ @esp-idf-codeowners/debugging
/docs/**/api-reference/bluetooth/ @esp-idf-codeowners/bluetooth
/docs/**/api-reference/network/ @esp-idf-codeowners/network @esp-idf-codeowners/wifi
/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/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
/docs/**/contribute/install-pre-commit-hook.rst @esp-idf-codeowners/ci @esp-idf-codeowners/tools
/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 @esp-idf-codeowners/wifi @esp-idf-codeowners/lwip @esp-idf-codeowners/network
/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/ieee802154/ @esp-idf-codeowners/ieee802154
/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/phy/ @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/ieee802154
/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/cmake/toolchain-*.cmake @esp-idf-codeowners/toolchain
/tools/esp_app_trace/ @esp-idf-codeowners/debugging
/tools/esp_prov/ @esp-idf-codeowners/app-utilities
/tools/gdb_panic_server.py @esp-idf-codeowners/debugging
/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/ @esp-idf-codeowners/ci
/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/configs/ @esp-idf-codeowners/system
/tools/test_apps/linux_compatible/ @esp-idf-codeowners/system
/tools/test_apps/peripherals/ @esp-idf-codeowners/peripherals
/tools/test_apps/phy/ @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/ieee802154
/tools/test_apps/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
/tools/test_apps/security/ @esp-idf-codeowners/security
/tools/test_apps/storage/ @esp-idf-codeowners/storage
/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/tools.json @esp-idf-codeowners/tools @esp-idf-codeowners/toolchain @esp-idf-codeowners/debugging
/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

@ -1,7 +1,7 @@
.build_template:
stage: build
extends:
- .after_script:build:ccache:upload-when-fail
- .after_script:build:ccache-show-stats:upload-failed-job-logs
image: $ESP_ENV_IMAGE
tags:
- build
@ -16,7 +16,7 @@
extends:
- .build_template
- .before_script:build
- .after_script:build:ccache
- .after_script:build:ccache-show-stats
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- job: fast_template_app
@ -246,15 +246,16 @@ pytest_build_system_macos:
extends:
- .test_build_system_template
- .before_script:build:macos
- .after_script:build:macos:upload-when-fail
- .after_script:build:macos:upload-failed-job-logs:ccache-show-stats
- .rules:build:macos
tags:
- macos_shell
parallel: 3
variables:
PYENV_VERSION: "3.8"
CI_CCACHE_DISABLE: "1" # ccache: error: Read-only file system
# CCACHE_DIR: "/cache/idf_ccache". On macOS, you cannot write to this folder due to insufficient permissions.
CCACHE_DIR: "" # ccache will use "$HOME/Library/Caches/ccache".
CCACHE_MAXSIZE: "5G" # To preserve the limited Macbook storage. CCACHE automatically prunes old caches to fit the set limit.
build_docker:
extends:
- .before_script:minimal

View File

@ -6,9 +6,9 @@ stages:
- pre_check
- build
- assign_test
- build_doc
- target_test
- host_test
- build_doc
- test_deploy
- deploy
- post_deploy
@ -40,7 +40,7 @@ variables:
GIT_FETCH_EXTRA_FLAGS: "--no-recurse-submodules --prune --prune-tags"
# we're using .cache folder for caches
GIT_CLEAN_FLAGS: -ffdx -e .cache/
LATEST_GIT_TAG: v5.4-dev
LATEST_GIT_TAG: v5.4-rc1
SUBMODULE_FETCH_TOOL: "tools/ci/ci_fetch_submodule.py"
# by default we will fetch all submodules
@ -88,7 +88,7 @@ variables:
CI_CLANG_DISTRO_URL: ""
# Set this variable to specify the file name for the known failure cases.
KNOWN_FAILURE_CASES_FILE_NAME: "master.txt"
KNOWN_FAILURE_CASES_FILE_NAME: "5.4.txt"
IDF_CI_BUILD: 1
@ -227,13 +227,14 @@ variables:
- *setup_tools_and_idf_python_venv
- fetch_submodules
.after_script:build:macos:upload-when-fail:
.after_script:build:macos:upload-failed-job-logs:ccache-show-stats:
after_script:
# macos is running shell executor, which means it would use
# the system installed /usr/local/bin/python3 by default.
# Ensure pyenv and PYENV_VERSION installed
- eval "$(pyenv init -)"
- *upload_failed_job_log_artifacts
- *show_ccache_statistics
.before_script:build:
before_script:
@ -244,11 +245,11 @@ variables:
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
.after_script:build:ccache:
.after_script:build:ccache-show-stats:
after_script:
- *show_ccache_statistics
.after_script:build:ccache:upload-when-fail:
.after_script:build:ccache-show-stats:upload-failed-job-logs:
after_script:
- *show_ccache_statistics
- *upload_failed_job_log_artifacts

View File

@ -37,25 +37,16 @@
.if-dev-push: &if-dev-push
if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_COMMIT_TAG !~ /^qa-test/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
.if-schedule: &if-schedule
if: '$CI_PIPELINE_SOURCE == "schedule"'
.doc-rules:build:docs-full:
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-schedule
- <<: *if-protected
- <<: *if-label-build_docs
- <<: *if-label-docs_full
- <<: *if-dev-push
changes: *patterns-docs-full
.doc-rules:build:docs-full-prod:
rules:
- <<: *if-qa-test-tag
when: never
- <<: *if-protected-no_label
.doc-rules:build:docs-partial:
rules:
- <<: *if-qa-test-tag
@ -92,13 +83,14 @@ check_docs_lang_sync:
stage: build_doc
tags:
- build_docs
needs:
- job: fast_template_app
artifacts: false
optional: true
script:
- if [ -n "${BREATHE_ALT_INSTALL_URL}" ]; then pip uninstall -y breathe && pip install -U ${BREATHE_ALT_INSTALL_URL}; fi
- cd docs
- build-docs -t $DOCTGT -bs $DOC_BUILDERS -l $DOCLANG build
artifacts:
expire_in: 4 days
when: always
parallel:
matrix:
- DOCLANG: ["en", "zh_CN"]
@ -119,26 +111,12 @@ build_docs_html_full:
extends:
- .build_docs_template
- .doc-rules:build:docs-full
needs:
- job: fast_template_app
artifacts: false
optional: true
artifacts:
paths:
- docs/_build/*/*/*.txt
- docs/_build/*/*/html/*
variables:
DOC_BUILDERS: "html"
build_docs_html_full_prod:
extends:
- .build_docs_template
- .doc-rules:build:docs-full-prod
dependencies: [] # Stop build_docs jobs from downloading all previous job's artifacts
artifacts:
when: always
paths:
- docs/_build/*/*/*.txt
- docs/_build/*/*/html/*
expire_in: 4 days
variables:
DOC_BUILDERS: "html"
@ -146,14 +124,12 @@ build_docs_html_partial:
extends:
- .build_docs_template
- .doc-rules:build:docs-partial
needs:
- job: fast_template_app
artifacts: false
optional: true
artifacts:
when: always
paths:
- docs/_build/*/*/*.txt
- docs/_build/*/*/html/*
expire_in: 4 days
variables:
DOC_BUILDERS: "html"
parallel:
@ -163,33 +139,6 @@ build_docs_html_partial:
- DOCLANG: "zh_CN"
DOCTGT: "esp32p4"
build_docs_pdf:
extends:
- .build_docs_template
- .doc-rules:build:docs-full
needs:
- job: fast_template_app
artifacts: false
optional: true
allow_failure: true # TODO IDFCI-2216
artifacts:
paths:
- docs/_build/*/*/latex/*
variables:
DOC_BUILDERS: "latex"
build_docs_pdf_prod:
extends:
- .build_docs_template
- .doc-rules:build:docs-full-prod
dependencies: [] # Stop build_docs jobs from downloading all previous job's artifacts
allow_failure: true # TODO IDFCI-2216
artifacts:
paths:
- docs/_build/*/*/latex/*
variables:
DOC_BUILDERS: "latex"
.deploy_docs_template:
image: $ESP_IDF_DOC_ENV_IMAGE
variables:
@ -218,8 +167,6 @@ deploy_docs_preview:
optional: true
- job: build_docs_html_full
optional: true
- job: build_docs_pdf
optional: true
variables:
TYPE: "preview"
# older branches use DOCS_DEPLOY_KEY, DOCS_SERVER, DOCS_SERVER_USER, DOCS_PATH for preview server so we keep these names for 'preview'
@ -234,12 +181,12 @@ deploy_docs_production:
# The DOCS_PROD_* variables used by this job are "Protected" so these branches must all be marked "Protected" in Gitlab settings
extends:
- .deploy_docs_template
- .doc-rules:build:docs-full-prod
rules:
- <<: *if-protected-no_label
stage: post_deploy
dependencies: # set dependencies to null to avoid missing artifacts issue
needs: # ensure runs after push_to_github succeeded
- build_docs_html_full_prod
- build_docs_pdf_prod
- build_docs_html_full
- job: push_to_github
artifacts: false
variables:
@ -254,16 +201,19 @@ deploy_docs_production:
check_doc_links:
extends:
- .build_docs_template
- .doc-rules:build:docs-full-prod
rules:
- <<: *if-protected-no_label
stage: post_deploy
needs:
- job: deploy_docs_production
artifacts: false
tags: ["build", "amd64", "internet"]
artifacts:
when: always
paths:
- docs/_build/*/*/*.txt
- docs/_build/*/*/linkcheck/*.txt
expire_in: 1 week
allow_failure: true
script:
- cd docs

View File

@ -183,12 +183,24 @@ baseline_manifest_sha:
tags: [fast_run, shiny]
script:
- |
if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then
# merged results pipelines, by default
# diff between target-branch-head and merged-result-head
if [ -n "$CI_MERGE_REQUEST_TARGET_BRANCH_SHA" ]; then
git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_SHA --depth=1
git checkout FETCH_HEAD
idf-build-apps dump-manifest-sha \
--manifest-files $(find . -name ".build-test-rules.yml" | xargs) \
--output .manifest_sha
# merge request pipelines, when the mr got conflicts
# diff between diff-base-sha and merge-request-head
elif [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then
git fetch origin $CI_MERGE_REQUEST_DIFF_BASE_SHA --depth=1
git checkout FETCH_HEAD
idf-build-apps dump-manifest-sha \
--manifest-files $(find . -name ".build-test-rules.yml" | xargs) \
--output .manifest_sha
# other pipelines, like the protected branches pipelines
# not triggered in this job
fi
artifacts:
paths:

View File

@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-1-Clause
*
* SPDX-FileContributor: 2017-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileContributor: 2017-2024 Espressif Systems (Shanghai) CO LTD
*/
/*********************************************************************
* SEGGER Microcontroller GmbH *
@ -58,6 +58,7 @@ File : SEGGER_SYSVIEW_Config_FreeRTOS.c
Purpose : Sample setup configuration of SystemView with FreeRTOS.
Revision: $Rev: 7745 $
*/
#include <string.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "SEGGER_SYSVIEW.h"
@ -156,15 +157,16 @@ static esp_apptrace_lock_t s_sys_view_lock = {.mux = portMUX_INITIALIZER_UNLOCKE
* Sends SystemView description strings.
*/
static void _cbSendSystemDesc(void) {
char irq_str[32];
char irq_str[32] = "I#";
SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",C="SYSVIEW_CORE_NAME",O=FreeRTOS");
snprintf(irq_str, sizeof(irq_str), "I#%d=SysTick", SYSTICK_INTR_ID);
strcat(itoa(SYSTICK_INTR_ID, irq_str + 2, 10), "=SysTick");
SEGGER_SYSVIEW_SendSysDesc(irq_str);
size_t isr_count = sizeof(esp_isr_names)/sizeof(esp_isr_names[0]);
for (size_t i = 0; i < isr_count; ++i) {
if (esp_isr_names[i] == NULL || (ETS_INTERNAL_INTR_SOURCE_OFF + i) == SYSTICK_INTR_ID)
continue;
snprintf(irq_str, sizeof(irq_str), "I#%d=%s", ETS_INTERNAL_INTR_SOURCE_OFF + i, esp_isr_names[i]);
strcat(itoa(ETS_INTERNAL_INTR_SOURCE_OFF + i, irq_str + 2, 10), "=");
strncat(irq_str, esp_isr_names[i], sizeof(irq_str) - strlen(irq_str) - 1);
SEGGER_SYSVIEW_SendSysDesc(irq_str);
}
}

View File

@ -21,7 +21,7 @@ const static char *TAG = "sysview_heap_trace";
#endif
static SEGGER_SYSVIEW_MODULE s_esp_sysview_heap_module = {
.sModule = "ESP32 SystemView Heap Tracing Module",
.sModule = "M=ESP32 SystemView Heap Tracing Module",
.NumEvents = 2,
};

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -13,6 +13,7 @@
#include <spi_flash_mmap.h> /* including in bootloader for error values */
#include "sdkconfig.h"
#include "bootloader_flash.h"
#include "soc/ext_mem_defs.h"
#ifdef __cplusplus
extern "C" {
@ -20,8 +21,11 @@ extern "C" {
#define FLASH_SECTOR_SIZE 0x1000
#define FLASH_BLOCK_SIZE 0x10000
#define MMAP_ALIGNED_MASK (SPI_FLASH_MMU_PAGE_SIZE - 1)
#define MMU_FLASH_MASK (~(SPI_FLASH_MMU_PAGE_SIZE - 1))
#define MMU_FLASH_MASK_FROM_VAL(PAGE_SZ) (~((PAGE_SZ) - 1))
#define MMU_DROM_END_ENTRY_VADDR_FROM_VAL(PAGE_SZ) (SOC_DRAM_FLASH_ADDRESS_HIGH - (PAGE_SZ))
/**
* MMU mapping must always be in the unit of a SPI_FLASH_MMU_PAGE_SIZE
@ -89,7 +93,7 @@ uint32_t bootloader_mmap_get_free_pages(void);
* @param length - Length of data to map.
*
* @return Pointer to mapped data memory (at src_addr), or NULL
* if an allocation error occured.
* if an allocation error occurred.
*/
const void *bootloader_mmap(uint32_t src_addr, uint32_t size);

View File

@ -34,6 +34,7 @@ typedef struct {
uint32_t image_len; /* Length of image on flash, in bytes */
uint8_t image_digest[32]; /* appended SHA-256 digest */
uint32_t secure_version; /* secure version for anti-rollback, it is covered by sha256 (set if CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK=y) */
uint32_t mmu_page_size; /* Flash MMU page size per binary header */
} esp_image_metadata_t;
typedef enum {

View File

@ -74,6 +74,12 @@ void bootloader_console_init(void)
// Enable the peripheral
uart_ll_enable_bus_clock(uart_num, true);
uart_ll_reset_register(uart_num);
// Set clock source
#if SOC_UART_SUPPORT_XTAL_CLK
uart_ll_set_sclk(UART_LL_GET_HW(uart_num), (soc_module_clk_t)UART_SCLK_XTAL);
#else
uart_ll_set_sclk(UART_LL_GET_HW(uart_num), (soc_module_clk_t)UART_SCLK_APB);
#endif
// Reset TX and RX FIFOs
uart_ll_txfifo_rst(UART_LL_GET_HW(uart_num));
uart_ll_rxfifo_rst(UART_LL_GET_HW(uart_num));

View File

@ -20,6 +20,7 @@
#include "esp_rom_spiflash.h"
#include "soc/soc.h"
#include "soc/soc_caps.h"
#include "soc/rtc.h"
#include "soc/efuse_periph.h"
#include "soc/rtc_periph.h"
@ -66,7 +67,7 @@ static void set_cache_and_start_app(uint32_t drom_addr,
uint32_t irom_addr,
uint32_t irom_load_addr,
uint32_t irom_size,
uint32_t entry_addr);
const esp_image_metadata_t *data);
esp_err_t bootloader_common_read_otadata(const esp_partition_pos_t *ota_info, esp_ota_select_entry_t *two_otadata)
{
@ -789,7 +790,7 @@ static void unpack_load_app(const esp_image_metadata_t *data)
rom_addr[1],
rom_load_addr[1],
rom_size[1],
data->image.entry_addr);
data);
}
#else //!SOC_MMU_DI_VADDR_SHARED
@ -834,7 +835,7 @@ static void unpack_load_app(const esp_image_metadata_t *data)
irom_addr,
irom_load_addr,
irom_size,
data->image.entry_addr);
data);
}
#endif //#if SOC_MMU_DI_VADDR_SHARED
@ -859,9 +860,11 @@ static void set_cache_and_start_app(
uint32_t irom_addr,
uint32_t irom_load_addr,
uint32_t irom_size,
uint32_t entry_addr)
const esp_image_metadata_t *data)
{
int rc __attribute__((unused));
const uint32_t entry_addr = data->image.entry_addr;
const uint32_t mmu_page_size = data->mmu_page_size;
ESP_EARLY_LOGD(TAG, "configure drom and irom and start");
//-----------------------Disable Cache to do the mapping---------
@ -871,12 +874,18 @@ static void set_cache_and_start_app(
#else
cache_hal_disable(CACHE_LL_LEVEL_EXT_MEM, CACHE_TYPE_ALL);
#endif
#if SOC_MMU_PAGE_SIZE_CONFIGURABLE
// re-configure MMU page size
mmu_ll_set_page_size(0, mmu_page_size);
#endif //SOC_MMU_PAGE_SIZE_CONFIGURABLE
//reset MMU table first
mmu_hal_unmap_all();
//-----------------------MAP DROM--------------------------
uint32_t drom_load_addr_aligned = drom_load_addr & MMU_FLASH_MASK;
uint32_t drom_addr_aligned = drom_addr & MMU_FLASH_MASK;
uint32_t drom_load_addr_aligned = drom_load_addr & MMU_FLASH_MASK_FROM_VAL(mmu_page_size);
uint32_t drom_addr_aligned = drom_addr & MMU_FLASH_MASK_FROM_VAL(mmu_page_size);
ESP_EARLY_LOGV(TAG, "rodata starts from paddr=0x%08" PRIx32 ", vaddr=0x%08" PRIx32 ", size=0x%" PRIx32, drom_addr, drom_load_addr, drom_size);
//The addr is aligned, so we add the mask off length to the size, to make sure the corresponding buses are enabled.
drom_size = (drom_load_addr - drom_load_addr_aligned) + drom_size;
@ -894,13 +903,13 @@ static void set_cache_and_start_app(
ESP_EARLY_LOGV(TAG, "after mapping rodata, starting from paddr=0x%08" PRIx32 " and vaddr=0x%08" PRIx32 ", 0x%" PRIx32 " bytes are mapped", drom_addr_aligned, drom_load_addr_aligned, actual_mapped_len);
}
//we use the MMU_LL_END_DROM_ENTRY_ID mmu entry as a map page for app to find the boot partition
mmu_hal_map_region(0, MMU_TARGET_FLASH0, MMU_LL_END_DROM_ENTRY_VADDR, drom_addr_aligned, CONFIG_MMU_PAGE_SIZE, &actual_mapped_len);
mmu_hal_map_region(0, MMU_TARGET_FLASH0, MMU_DROM_END_ENTRY_VADDR_FROM_VAL(mmu_page_size), drom_addr_aligned, mmu_page_size, &actual_mapped_len);
ESP_EARLY_LOGV(TAG, "mapped one page of the rodata, from paddr=0x%08" PRIx32 " and vaddr=0x%08" PRIx32 ", 0x%" PRIx32 " bytes are mapped", drom_addr_aligned, MMU_LL_END_DROM_ENTRY_VADDR, actual_mapped_len);
#endif
//-----------------------MAP IROM--------------------------
uint32_t irom_load_addr_aligned = irom_load_addr & MMU_FLASH_MASK;
uint32_t irom_addr_aligned = irom_addr & MMU_FLASH_MASK;
uint32_t irom_load_addr_aligned = irom_load_addr & MMU_FLASH_MASK_FROM_VAL(mmu_page_size);
uint32_t irom_addr_aligned = irom_addr & MMU_FLASH_MASK_FROM_VAL(mmu_page_size);
ESP_EARLY_LOGV(TAG, "text starts from paddr=0x%08" PRIx32 ", vaddr=0x%08" PRIx32 ", size=0x%" PRIx32, irom_addr, irom_load_addr, irom_size);
//The addr is aligned, so we add the mask off length to the size, to make sure the corresponding buses are enabled.
irom_size = (irom_load_addr - irom_load_addr_aligned) + irom_size;

View File

@ -92,6 +92,8 @@ static inline void bootloader_hardware_init(void)
regi2c_ctrl_ll_master_enable_clock(true);
regi2c_ctrl_ll_master_configure_clock();
REGI2C_WRITE_MASK(I2C_BIAS, I2C_BIAS_DREG_0P8, 8); // fix low temp issue, need to increase this internal voltage
}
static inline void bootloader_ana_reset_config(void)

View File

@ -22,6 +22,7 @@
#include "bootloader_memory_utils.h"
#include "soc/soc_caps.h"
#include "hal/cache_ll.h"
#include "spi_flash_mmap.h"
#define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
@ -77,7 +78,7 @@ static esp_err_t process_segment_data(int segment, intptr_t load_addr, uint32_t
static esp_err_t verify_image_header(uint32_t src_addr, const esp_image_header_t *image, bool silent);
/* Verify a segment header */
static esp_err_t verify_segment_header(int index, const esp_image_segment_header_t *segment, uint32_t segment_data_offs, bool silent);
static esp_err_t verify_segment_header(int index, const esp_image_segment_header_t *segment, uint32_t segment_data_offs, esp_image_metadata_t *metadata, bool silent);
/* Log-and-fail macro for use in esp_image_load */
#define FAIL_LOAD(...) do { \
@ -559,7 +560,7 @@ static esp_err_t process_segment(int index, uint32_t flash_addr, esp_image_segme
ESP_LOGV(TAG, "segment data length 0x%"PRIx32" data starts 0x%"PRIx32, data_len, data_addr);
CHECK_ERR(verify_segment_header(index, header, data_addr, silent));
CHECK_ERR(verify_segment_header(index, header, data_addr, metadata, silent));
if (data_len % 4 != 0) {
FAIL_LOAD("unaligned segment length 0x%"PRIx32, data_len);
@ -748,7 +749,7 @@ static esp_err_t process_segment_data(int segment, intptr_t load_addr, uint32_t
return ESP_OK;
}
static esp_err_t verify_segment_header(int index, const esp_image_segment_header_t *segment, uint32_t segment_data_offs, bool silent)
static esp_err_t verify_segment_header(int index, const esp_image_segment_header_t *segment, uint32_t segment_data_offs, esp_image_metadata_t *metadata, bool silent)
{
if ((segment->data_len & 3) != 0
|| segment->data_len >= SIXTEEN_MB) {
@ -761,13 +762,39 @@ static esp_err_t verify_segment_header(int index, const esp_image_segment_header
uint32_t load_addr = segment->load_addr;
bool map_segment = should_map(load_addr);
#if SOC_MMU_PAGE_SIZE_CONFIGURABLE
/* ESP APP descriptor is present in the DROM segment #0 */
if (index == 0 && metadata->start_addr != ESP_BOOTLOADER_OFFSET) {
const esp_app_desc_t *app_desc = (const esp_app_desc_t *)bootloader_mmap(segment_data_offs, sizeof(esp_app_desc_t));
if (!app_desc || app_desc->magic_word != ESP_APP_DESC_MAGIC_WORD) {
ESP_LOGE(TAG, "Failed to fetch app description header!");
return ESP_FAIL;
}
// Convert from log base 2 number to actual size while handling legacy image case (value 0)
metadata->mmu_page_size = (app_desc->mmu_page_size > 0) ? (1UL << app_desc->mmu_page_size) : SPI_FLASH_MMU_PAGE_SIZE;
if (metadata->mmu_page_size != SPI_FLASH_MMU_PAGE_SIZE) {
ESP_LOGI(TAG, "MMU page size mismatch, configured: 0x%x, found: 0x%"PRIx32, SPI_FLASH_MMU_PAGE_SIZE, metadata->mmu_page_size);
}
bootloader_munmap(app_desc);
} else if (index == 0 && metadata->start_addr == ESP_BOOTLOADER_OFFSET) {
// Bootloader always uses the default MMU page size
metadata->mmu_page_size = SPI_FLASH_MMU_PAGE_SIZE;
}
#else // SOC_MMU_PAGE_SIZE_CONFIGURABLE
metadata->mmu_page_size = SPI_FLASH_MMU_PAGE_SIZE;
#endif // !SOC_MMU_PAGE_SIZE_CONFIGURABLE
const int mmu_page_size = metadata->mmu_page_size;
ESP_LOGV(TAG, "MMU page size 0x%x", mmu_page_size);
/* Check that flash cache mapped segment aligns correctly from flash to its mapped address,
relative to the 64KB page mapping size.
relative to the MMU page mapping size.
*/
ESP_LOGV(TAG, "segment %d map_segment %d segment_data_offs 0x%"PRIx32" load_addr 0x%"PRIx32,
index, map_segment, segment_data_offs, load_addr);
if (map_segment
&& ((segment_data_offs % SPI_FLASH_MMU_PAGE_SIZE) != (load_addr % SPI_FLASH_MMU_PAGE_SIZE))) {
&& ((segment_data_offs % mmu_page_size) != (load_addr % mmu_page_size))) {
if (!silent) {
ESP_LOGE(TAG, "Segment %d load address 0x%08"PRIx32", doesn't match data 0x%08"PRIx32,
index, load_addr, segment_data_offs);

View File

@ -85,6 +85,9 @@ if(CONFIG_BT_ENABLED)
elseif(CONFIG_IDF_TARGET_ESP32S3)
list(APPEND ldscripts "linker_rw_bt_controller.lf")
elseif(CONFIG_IDF_TARGET_ESP32C2)
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
list(APPEND srcs "controller/esp32c2/dummy.c")
endif()
set(ldscripts "linker_esp32c2.lf")
else()
list(APPEND ldscripts "linker_esp_ble_controller.lf")
@ -865,11 +868,19 @@ if(CONFIG_BT_ENABLED)
elseif(CONFIG_IDF_TARGET_ESP32C3)
target_link_directories(${COMPONENT_LIB} INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c3_family/esp32c3")
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app_flash)
else()
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
endif()
elseif(CONFIG_IDF_TARGET_ESP32S3)
target_link_directories(${COMPONENT_LIB} INTERFACE
"${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c3_family/esp32s3")
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app_flash)
else()
target_link_libraries(${COMPONENT_LIB} PUBLIC btdm_app)
endif()
elseif(CONFIG_BT_CONTROLLER_ENABLED)
if(CONFIG_IDF_TARGET_ESP32C6)
add_prebuilt_library(libble_app
@ -878,8 +889,13 @@ if(CONFIG_BT_ENABLED)
add_prebuilt_library(libble_app
"${CMAKE_CURRENT_LIST_DIR}/controller/lib_esp32c6/esp32c6-bt-lib/esp32c61/libble_app.a")
else()
add_prebuilt_library(libble_app
"controller/lib_${target_name}/${target_name}-bt-lib/libble_app.a")
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
add_prebuilt_library(libble_app
"controller/lib_${target_name}/${target_name}-bt-lib/libble_app_flash.a")
else()
add_prebuilt_library(libble_app
"controller/lib_${target_name}/${target_name}-bt-lib/libble_app.a")
endif()
endif()
target_link_libraries(${COMPONENT_LIB} PRIVATE libble_app)
endif()

View File

@ -382,7 +382,7 @@ static void btc_deinit_mem(void) {
btc_profile_cb_tab = NULL;
}
#if (BLE_INCLUDED == TRUE)
#if (BLE_42_FEATURE_SUPPORT == TRUE)
if (gl_bta_adv_data_ptr) {
osi_free(gl_bta_adv_data_ptr);
gl_bta_adv_data_ptr = NULL;
@ -392,7 +392,7 @@ static void btc_deinit_mem(void) {
osi_free(gl_bta_scan_rsp_data_ptr);
gl_bta_scan_rsp_data_ptr = NULL;
}
#endif ///BLE_INCLUDED == TRUE
#endif // BLE_42_FEATURE_SUPPORT
#if GATTS_INCLUDED == TRUE && GATT_DYNAMIC_MEMORY == TRUE
if (btc_creat_tab_env_ptr) {
@ -444,7 +444,8 @@ static bt_status_t btc_init_mem(void) {
}
memset((void *)btc_profile_cb_tab, 0, sizeof(void *) * BTC_PID_NUM);
#if (BLE_INCLUDED == TRUE)
#if BTC_DYNAMIC_MEMORY == TRUE
#if (BLE_42_FEATURE_SUPPORT == TRUE)
if ((gl_bta_adv_data_ptr = (tBTA_BLE_ADV_DATA *)osi_malloc(sizeof(tBTA_BLE_ADV_DATA))) == NULL) {
goto error_exit;
}
@ -454,7 +455,8 @@ static bt_status_t btc_init_mem(void) {
goto error_exit;
}
memset((void *)gl_bta_scan_rsp_data_ptr, 0, sizeof(tBTA_BLE_ADV_DATA));
#endif ///BLE_INCLUDED == TRUE
#endif // (BLE_42_FEATURE_SUPPORT == TRUE)
#endif // BTC_DYNAMIC_MEMORY == TRUE
#if GATTS_INCLUDED == TRUE && GATT_DYNAMIC_MEMORY == TRUE
if ((btc_creat_tab_env_ptr = (esp_btc_creat_tab_t *)osi_malloc(sizeof(esp_btc_creat_tab_t))) == NULL) {

View File

@ -241,5 +241,8 @@ void *osi_calloc_func(size_t size)
void osi_free_func(void *ptr)
{
#if HEAP_MEMORY_DEBUG
osi_mem_dbg_clean(ptr, __func__, __LINE__);
#endif
free(ptr);
}

View File

@ -29,6 +29,15 @@ void *osi_malloc_func(size_t size);
void *osi_calloc_func(size_t size);
void osi_free_func(void *ptr);
// Memory alloc function without print and assertion
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
#define osi_malloc_base(size) heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#define osi_calloc_base(size) heap_caps_calloc_prefer(1, size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#else
#define osi_malloc_base(size) malloc((size))
#define osi_calloc_base(size) calloc(1, (size))
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
#if HEAP_MEMORY_DEBUG
void osi_mem_dbg_init(void);
@ -41,13 +50,10 @@ void osi_men_dbg_set_section_start(uint8_t index);
void osi_men_dbg_set_section_end(uint8_t index);
uint32_t osi_mem_dbg_get_max_size_section(uint8_t index);
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
#define osi_malloc(size) \
({ \
void *p; \
p = heap_caps_malloc_prefer(size, 2, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL); \
p = osi_malloc_base(size); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
@ -55,34 +61,11 @@ uint32_t osi_mem_dbg_get_max_size_section(uint8_t index);
#define osi_calloc(size) \
({ \
void *p; \
p = heap_caps_calloc_prefer(1, size, 2, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, \
MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL); \
p = osi_calloc_base(size); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
#else
#define osi_malloc(size) \
({ \
void *p; \
p = malloc((size)); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
#define osi_calloc(size) \
({ \
void *p; \
p = calloc(1, (size)); \
osi_mem_dbg_record(p, size, __func__, __LINE__); \
(void *)p; \
})
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
#if 0
#define osi_malloc(size) \
do { \
@ -122,15 +105,6 @@ do { \
#else
// Memory alloc function without print and assertion
#if HEAP_ALLOCATION_FROM_SPIRAM_FIRST
#define osi_malloc_base(size) heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#define osi_calloc_base(size) heap_caps_calloc_prefer(1, size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#else
#define osi_malloc_base(size) malloc((size))
#define osi_calloc_base(size) calloc(1, (size))
#endif /* #if HEAP_ALLOCATION_FROM_SPIRAM_FIRST */
// Memory alloc function with print and assertion when fails
#define osi_malloc(size) osi_malloc_func((size))
#define osi_calloc(size) osi_calloc_func((size))

View File

@ -444,6 +444,15 @@ config BTDM_CTRL_SCAN_BACKOFF_UPPERLIMITMAX
minimize collision of scan request PDUs from nultiple scanners. If scan backoff is disabled, in active
scanning, scan request PDU will be sent every time when HW receives scannable ADV PDU.
config BTDM_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
bool "Enable enhanced Access Address check in CONNECT_IND"
default n
help
Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU.
This improves security by ensuring that only connection requests with valid Access Addresses are accepted.
If disabled, only basic checks are applied, improving compatibility.
config BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP
bool "BLE adv report flow control supported"
depends on (BTDM_CTRL_MODE_BTDM || BTDM_CTRL_MODE_BLE_ONLY)

View File

@ -1931,7 +1931,7 @@ esp_err_t esp_bredr_sco_datapath_set(esp_sco_data_path_t data_path)
return ESP_OK;
}
esp_err_t esp_ble_scan_dupilcate_list_flush(void)
esp_err_t esp_ble_scan_duplicate_list_flush(void)
{
if (btdm_controller_status != ESP_BT_CONTROLLER_STATUS_ENABLED) {
return ESP_ERR_INVALID_STATE;
@ -1940,6 +1940,11 @@ esp_err_t esp_ble_scan_dupilcate_list_flush(void)
return ESP_OK;
}
esp_err_t esp_ble_scan_dupilcate_list_flush(void)
{
return esp_ble_scan_duplicate_list_flush();
}
/**
* This function re-write controller's function,
* As coredump can not show parameters in function which is in a .a file.

View File

@ -109,86 +109,100 @@ menuconfig BT_LE_50_FEATURE_SUPPORT
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 Transfer Sync Events"
depends on BT_LE_ENABLE_PERIODIC_ADV
if BT_LE_50_FEATURE_SUPPORT
config BT_LE_LL_CFG_FEAT_LE_2M_PHY
bool "Enable 2M Phy"
depends on BT_LE_50_FEATURE_SUPPORT
default y
help
This enables controller transfer periodic sync events to host
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 Transfer 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_EXT_SCAN
bool "Enable extended scanning"
depends on BT_LE_50_FEATURE_SUPPORT && BT_LE_ROLE_OBSERVER_ENABLE
default y
help
Enable this option to do extended scanning.
config BT_LE_ENABLE_PERIODIC_SYNC
bool "Enable periodic sync"
default y
depends on BT_LE_EXT_SCAN
help
Enable this option to receive periodic advertisement.
if BT_LE_ENABLE_PERIODIC_SYNC
config BT_LE_MAX_PERIODIC_SYNCS
int "Maximum number of periodic advertising syncs"
range 0 3
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"
range 1 5
default 5
help
Set this option to set the upper limit for number of periodic advertiser list.
endif
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 3
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
@ -523,6 +537,10 @@ config BT_LE_TX_CCA_ENABLED
help
Enable CCA feature to cancel sending the packet if the signal power is stronger than CCA threshold.
config BT_LE_DTM_ENABLED
bool "Enable Direct Test Mode (DTM) feature"
default n
config BT_LE_CCA_RSSI_THRESH
int "CCA RSSI threshold value"
depends on BT_LE_TX_CCA_ENABLED
@ -531,6 +549,10 @@ config BT_LE_CCA_RSSI_THRESH
help
Power threshold of CCA in unit of -1 dBm.
config BT_LE_FEAT_LL_ENCRYPTION
bool "Enable controller ACL encryption"
default y
config BT_LE_ROLE_CENTROL_ENABLE
bool "Enable BLE Centrol role function"
depends on !BT_NIMBLE_ENABLED
@ -617,3 +639,23 @@ config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
default 0
config BT_CTRL_RUN_IN_FLASH_ONLY
bool "Reduce BLE IRAM usage (READ DOCS FIRST) (EXPERIMENTAL)"
default n
help
Move most IRAM into flash. This will increase the usage of flash and reduce ble performance.
Because the code is moved to the flash, the execution speed of the code is reduced.
To have a small impact on performance, you need to enable flash suspend (SPI_FLASH_AUTO_SUSPEND).
- Only one Tx-Rx can be performed in each connection interval. Therefore, reduce the connection interval
as much as possible to improve the throughput. If you want higher connection performance, you can
enable BT_LE_PLACE_CONN_RELATED_INTO_IRAM to put the connection-related code into iram.
- For HCI_LE_Extended_Create_Connection command, only 1M phy's connection parameters will be applied.
Other phys' will be ignored.
- For extended scanning, we may be unable to receive the extended adv with 300us MAFS.
config BT_LE_PLACE_CONN_RELATED_INTO_IRAM
bool "Place the connection-related code into IRAM"
depends on BT_CTRL_RUN_IN_FLASH_ONLY
default n

View File

@ -156,6 +156,10 @@ extern int ble_get_npl_element_info(esp_bt_controller_config_t *cfg, ble_npl_cou
extern void bt_track_pll_cap(void);
extern char *ble_controller_get_compile_version(void);
extern const char *r_ble_controller_get_rom_compile_version(void);
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
extern void ble_ll_supported_features_init(void);
#endif //CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
#if CONFIG_BT_RELEASE_IRAM
extern uint32_t _iram_bt_text_start;
extern uint32_t _bss_bt_end;
@ -195,6 +199,9 @@ static void esp_bt_ctrl_log_partition_get_and_erase_first_block(void);
/* Local variable definition
***************************************************************************
*/
#if CONFIG_ESP32C2_REV_MIN_FULL < 200
void *g_ble_lll_rfmgmt_env_p;
#endif
/* Static variable declare */
static DRAM_ATTR esp_bt_controller_status_t ble_controller_status = ESP_BT_CONTROLLER_STATUS_IDLE;
#if CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
@ -534,7 +541,12 @@ static int esp_ecc_gen_dh_key(const uint8_t *peer_pub_key_x, const uint8_t *peer
static int esp_intr_alloc_wrapper(int source, int flags, intr_handler_t handler, void *arg, void **ret_handle_in)
{
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
int rc = esp_intr_alloc(source, flags, handler, arg, (intr_handle_t *)ret_handle_in);
#else
int rc = esp_intr_alloc(source, flags | ESP_INTR_FLAG_IRAM, handler, arg, (intr_handle_t *)ret_handle_in);
#endif
return rc;
}
@ -743,6 +755,8 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
return ret;
}
/* If we place the ble code into flash, don't need to initialize ROM. */
#if !CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
#if DEFAULT_BT_LE_50_FEATURE_SUPPORT || DEFAULT_BT_LE_ROLE_CENTROL || DEFAULT_BT_LE_ROLE_OBSERVER
extern int esp_ble_rom_func_ptr_init_all(void);
esp_ble_rom_func_ptr_init_all();
@ -751,6 +765,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
extern int esp_ble_rom_func_ptr_init_legacy_adv_and_slave(void);
esp_ble_rom_func_ptr_init_legacy_adv_and_slave();
#endif
#endif //!CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
/* Initialize the function pointers for OS porting */
npl_freertos_funcs_init();
@ -800,6 +815,11 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
#if CONFIG_SW_COEXIST_ENABLE
coex_init();
#endif
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
ble_ll_supported_features_init();
#endif //CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
ret = ble_controller_init(cfg);
if (ret != ESP_OK) {
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "ble_controller_init failed %d", ret);

View File

@ -0,0 +1,320 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_bt_cfg.h"
#define BLE_ERR_UNKNOWN_HCI_CMD (0x01)
/* LL Features */
#define BLE_LL_FEAT_LE_ENCRYPTION (0x0000000001)
#define BLE_LL_FEAT_CONN_PARM_REQ (0x0000000002)
#define BLE_LL_FEAT_EXTENDED_REJ (0x0000000004)
#define BLE_LL_FEAT_PERIPH_INIT (0x0000000008)
#define BLE_LL_FEAT_LE_PING (0x0000000010)
#define BLE_LL_FEAT_DATA_LEN_EXT (0x0000000020)
#define BLE_LL_FEAT_LL_PRIVACY (0x0000000040)
#define BLE_LL_FEAT_EXT_SCAN_FILT (0x0000000080)
#define BLE_LL_FEAT_LE_2M_PHY (0x0000000100)
#define BLE_LL_FEAT_STABLE_MOD_ID_TX (0x0000000200)
#define BLE_LL_FEAT_STABLE_MOD_ID_RX (0x0000000400)
#define BLE_LL_FEAT_LE_CODED_PHY (0x0000000800)
#define BLE_LL_FEAT_EXT_ADV (0x0000001000)
#define BLE_LL_FEAT_PERIODIC_ADV (0x0000002000)
#define BLE_LL_FEAT_CSA2 (0x0000004000)
#define BLE_LL_FEAT_LE_POWER_CLASS_1 (0x0000008000)
#define BLE_LL_FEAT_MIN_USED_CHAN (0x0000010000)
#define BLE_LL_FEAT_CTE_REQ (0x0000020000)
#define BLE_LL_FEAT_CTE_RSP (0x0000040000)
#define BLE_LL_FEAT_CTE_TX (0x0000080000)
#define BLE_LL_FEAT_CTE_RX (0x0000100000)
#define BLE_LL_FEAT_CTE_AOD (0x0000200000)
#define BLE_LL_FEAT_CTE_AOA (0x0000400000)
#define BLE_LL_FEAT_CTE_RECV (0x0000800000)
#define BLE_LL_FEAT_SYNC_TRANS_SEND (0x0001000000)
#define BLE_LL_FEAT_SYNC_TRANS_RECV (0x0002000000)
#define BLE_LL_FEAT_SCA_UPDATE (0x0004000000)
#define BLE_LL_FEAT_REM_PKEY (0x0008000000)
#define BLE_LL_FEAT_CIS_CENTRAL (0x0010000000)
#define BLE_LL_FEAT_CIS_PERIPH (0x0020000000)
#define BLE_LL_FEAT_ISO_BROADCASTER (0x0040000000)
#define BLE_LL_FEAT_SYNC_RECV (0x0080000000)
#define BLE_LL_FEAT_CIS_HOST (0x0100000000)
#define BLE_LL_FEAT_POWER_CTRL_REQ (0x0200000000)
#define BLE_LL_FEAT_POWER_CHANGE_IND (0x0400000000)
#define BLE_LL_FEAT_PATH_LOSS_MON (0x0800000000)
#define BLE_LL_FEAT_PERIODIC_ADV_ADI (0x1000000000)
#define BLE_LL_FEAT_CONN_SUBRATING (0x2000000000)
#define BLE_LL_FEAT_CONN_SUBRATING_HOST (0x4000000000)
#define BLE_LL_FEAT_CHANNEL_CLASS (0x8000000000)
uint64_t ble_ll_supported_features;
void
ble_ll_supported_features_init(void)
{
ble_ll_supported_features = BLE_LL_FEAT_EXTENDED_REJ;
ble_ll_supported_features |= BLE_LL_FEAT_DATA_LEN_EXT;
#if DEFAULT_BT_LE_ROLE_CENTROL || DEFAULT_BT_LE_ROLE_PERIPHERAL
ble_ll_supported_features |= BLE_LL_FEAT_PERIPH_INIT;
ble_ll_supported_features |= BLE_LL_FEAT_CONN_PARM_REQ;
#endif
#if CONFIG_BT_LE_FEAT_LL_ENCRYPTION
ble_ll_supported_features |= BLE_LL_FEAT_LE_ENCRYPTION;
#endif
ble_ll_supported_features |= (BLE_LL_FEAT_LL_PRIVACY | BLE_LL_FEAT_EXT_SCAN_FILT);
ble_ll_supported_features |= BLE_LL_FEAT_LE_PING;
#if DEFAULT_BT_LE_EXT_ADV
ble_ll_supported_features |= BLE_LL_FEAT_EXT_ADV;
#endif
#if DEFAULT_BT_LE_PERIODIC_ADV
ble_ll_supported_features |= BLE_LL_FEAT_PERIODIC_ADV;
ble_ll_supported_features |= BLE_LL_FEAT_PERIODIC_ADV_ADI;
#endif
#if DEFAULT_BT_LE_PAST
ble_ll_supported_features |= BLE_LL_FEAT_SYNC_TRANS_RECV;
ble_ll_supported_features |= BLE_LL_FEAT_SYNC_TRANS_SEND;
#endif
#if DEGAULT_BT_LE_2M_PHY
ble_ll_supported_features |= BLE_LL_FEAT_LE_2M_PHY;
#endif
#if DEGAULT_BT_LE_CODED_PHY
ble_ll_supported_features |= BLE_LL_FEAT_LE_CODED_PHY;
#endif
#if DEFAULT_BT_LE_50_FEATURE_SUPPORT
ble_ll_supported_features |= BLE_LL_FEAT_CSA2;
ble_ll_supported_features |= BLE_LL_FEAT_SCA_UPDATE;
ble_ll_supported_features |= BLE_LL_FEAT_REM_PKEY;
ble_ll_supported_features |= BLE_LL_FEAT_CHANNEL_CLASS;
#endif
}
#if !DEFAULT_BT_LE_ROLE_BROADCASTER
void r_ble_ll_adv_rpa_timeout(void) { }
void r_ble_lll_adv_halt(void) { }
void r_ble_lll_adv_event_rmvd_from_sched(void) { }
void r_ble_lll_adv_ext_event_rmvd_from_sched(void) { }
int r_ble_ll_adv_enabled(void) { return 0; }
int r_ble_ll_adv_can_chg_whitelist(void) { return 1; }
int r_ble_ll_adv_set_random_addr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
void r_ble_ll_adv_reset(void) { }
void r_ble_ll_adv_init(void) { }
void r_ble_ll_adv_deinit(void) { }
int r_ble_ll_adv_env_init(void) { return 0; }
void r_ble_ll_adv_env_deinit(void) { }
int r_ble_lll_adv_rx_pkt_isr(void) { return -1; }
void r_ble_ll_adv_rx_pkt_in(void) { }
int r_ble_ll_adv_set_adv_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_read_txpwr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_set_adv_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_set_scan_rsp_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_adv_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_vendor_hci_legacy_adv_clear(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_set_data_related_addr_change(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif // !DEFAULT_BT_LE_ROLE_BROADCASTER
#if !DEFAULT_BT_LE_EXT_ADV
bool r_ble_ll_adv_ext_check_data_itvl(void) { return true; }
void r_ble_lll_adv_coex_dpc_update_on_aux_scheduled(void) { }
void r_ble_lll_adv_coex_dpc_calc_pti_update_itvl(void) { }
void r_ble_lll_adv_sec_done(void) { }
int r_ble_lll_adv_sec_schedule_next_aux(void) { return 0; }
void r_ble_lll_adv_sec_event_done(void) { }
int r_ble_lll_adv_secondary_tx_start_cb(void) { return 0; }
void r_ble_lll_adv_aux_schedule(void) { }
void r_ble_lll_adv_update_rsp_offset(void) { }
int r_ble_ll_adv_hci_set_random_addr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_param(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_adv_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_scan_rsp(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_ext_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_rd_max_adv_data_len(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_rd_sup_adv_sets(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_remove(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_clear_all(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_EXT_ADV
#if !DEFAULT_BT_LE_PERIODIC_ADV
void r_ble_ll_adv_sm_stop_periodic(void) { }
void r_ble_lll_adv_periodic_event_done(void) { }
int r_ble_lll_adv_sync_tx_start_cb(void) { return 0; }
void r_ble_lll_adv_sync_tx_end(void) { }
int r_ble_lll_adv_periodic_start(void) { return 0; }
void r_ble_lll_adv_periodic_rmvd_from_sched(void) { }
int r_ble_ll_adv_periodic_set_param(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_periodic_set_data(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_adv_periodic_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PERIODIC_ADV
#if !DEFAULT_BT_LE_ROLE_OBSERVER
void r_ble_lll_scan_halt(void) { }
void r_ble_ll_scan_end_adv_evt(void) { }
void r_ble_ll_scan_rx_pkt_in(void) { }
int r_ble_lll_scan_rx_pkt_isr(void) { return -1; }
int r_ble_ll_scan_env_init(void) { return 0; }
void r_ble_ll_scan_env_deinit(void) { }
void r_ble_ll_scan_init(void) { }
void r_ble_ll_scan_deinit(void) { }
void r_ble_ll_scan_reset(void) { }
int r_ble_ll_scan_can_chg_whitelist(void) { return 1; }
int r_ble_ll_scan_enabled(void) { return false; }
int r_ble_lll_scan_chk_resume(void) { return -1; }
int r_ble_ll_scan_set_scan_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_scan_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_scan_hci_update_adv_report_flow_ctrl(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_scan_hci_set_adv_report_flow_ctrl(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_OBSERVER
#if !DEFAULT_BT_LE_EXT_SCAN
void r_ble_lll_scan_duration_period_timers_restart(void) { }
void r_ble_lll_scan_duration_period_timers_stop(void) { }
int r_ble_ll_hci_send_legacy_ext_adv_report(void) { return -1; }
void r_ble_lll_sched_rmv_elem_type(void) { }
void r_ble_ll_scan_send_truncated(void) { }
void r_ble_ll_scan_aux_data_unref(void) { }
void r_ble_lll_scan_sched_remove(void) { }
void r_ble_lll_scan_aux_data_free(void) { }
void r_ble_lll_aux_scan_drop(void) { }
int r_ble_lll_sched_aux_scan(void) { return -1; }
int r_ble_lll_scan_rx_isr_on_aux(void) { return -1; }
void r_ble_lll_scan_period_timer_cb(void) { }
void r_ble_lll_scan_duration_timer_cb(void) { }
void r_ble_ll_scan_rx_pkt_in_on_aux(void) { }
int r_ble_ll_set_ext_scan_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_ext_scan_set_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_EXT_SCAN
#if !DEFAULT_BT_LE_ROLE_CENTROL
void r_ble_ll_init_rx_pkt_in(void) { }
int r_ble_lll_init_rx_pkt_isr(void) { return -1; }
int r_ble_ll_conn_create(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_create_cancel(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL
#if !DEFAULT_BT_LE_ROLE_CENTROL || !DEFAULT_BT_LE_EXT_SCAN
int r_ble_ll_ext_conn_create(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL || !DEFAULT_BT_LE_EXT_SCAN
#if !DEFAULT_BT_LE_ROLE_PERIPHERAL
int r_ble_ll_conn_slave_start(void) { return 0; }
#endif //!DEFAULT_BT_LE_ROLE_PERIPHERAL
#if !DEFAULT_BT_LE_ROLE_CENTROL && !DEFAULT_BT_LE_ROLE_PERIPHERAL
void r_ble_ll_conn_rx_data_pdu(void) { }
int r_ble_lll_conn_rx_pkt_isr(void) { return -1; }
int r_ble_ll_hci_disconnect(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_rd_rem_ver_cmd(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_update(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_rd_chan_map(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_read_rem_features(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_param_rr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_param_nrr(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL && !DEFAULT_BT_LE_ROLE_PERIPHERAL
#if !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
int r_ble_ll_conn_chk_phy_upd_start(void) { return -1; }
void r_ble_ll_hci_ev_encrypt_chg(void) { }
int r_ble_ll_ctrl_enc_allowed_pdu_rx(void) { return 1; }
int r_ble_ll_ctrl_enc_allowed_pdu_tx(void) { return 1; }
uint8_t r_ble_ll_ctrl_rx_start_enc_rsp(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_pause_enc_rsp(void) { return 0x07; }
int r_ble_ll_hci_le_encrypt(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!CONFIG_BT_LE_FEAT_LL_ENCRYPTION
#if !DEFAULT_BT_LE_ROLE_PERIPHERAL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
uint8_t r_ble_ll_ctrl_rx_pause_enc_req(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_enc_req(void) { return 0x07; }
int r_ble_ll_conn_hci_le_ltk_reply(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_le_ltk_neg_reply(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_PERIPHERAL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
#if !DEFAULT_BT_LE_ROLE_CENTROL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
uint8_t r_ble_ll_ctrl_rx_start_enc_req(void) { return 0x07; }
void r_ble_ll_ctrl_rx_enc_rsp(void) { }
void r_ble_ll_ctrl_enc_req_make(void) { }
int r_ble_ll_conn_hci_le_start_encrypt(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_ROLE_CENTROL || !CONFIG_BT_LE_FEAT_LL_ENCRYPTION
#if !DEGAULT_BT_LE_2M_PHY && !DEGAULT_BT_LE_CODED_PHY
void r_ble_ll_ctrl_phy_update_proc_complete(void) { }
void r_ble_ll_ctrl_phy_update_cancel(void) { }
uint8_t r_ble_ll_ctrl_rx_phy_update_ind(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_phy_rsp(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_phy_req(void) { return 0x07; }
void r_ble_ll_ctrl_phy_req_rsp_make(void) { }
#endif //DEGAULT_BT_LE_2M_PHY && DEGAULT_BT_LE_CODED_PHY
#if !DEFAULT_BT_LE_PERIODIC_SYNC
void r_ble_lll_sync_halt(void) { }
void r_ble_lll_sync_rmvd_from_sched(void) { }
int r_ble_ll_sync_list_search(void) { return -1; }
uint8_t r_ble_ll_ctrl_rx_periodic_sync_ind(void) { return 0x07; }
void r_ble_ll_sync_rx_pkt_in(void) { }
int r_ble_lll_sync_rx_pkt_isr(void) { return -1; }
int r_ble_ll_sync_env_init(void) { return 0; }
void r_ble_ll_sync_env_deinit(void) { }
void r_ble_ll_sync_init(void) { }
void r_ble_ll_sync_deinit(void) { }
void r_ble_ll_sync_reset(void) { }
bool r_ble_ll_sync_enabled(void) { return false; }
int r_ble_ll_sync_create(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_cancel(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_terminate(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_add(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_remove(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_clear(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_list_size(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_sync_receive_enable(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PERIODIC_SYNC
#if !DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_ADV
int r_ble_ll_adv_periodic_set_info_transfer(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_ADV
#if !DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_SYNC
int r_ble_ll_sync_transfer(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_set_sync_transfer_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_set_default_sync_transfer_params(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_PAST || !DEFAULT_BT_LE_PERIODIC_SYNC
#if !DEFAULT_BT_LE_50_FEATURE_SUPPORT
uint8_t r_ble_ll_ctrl_rx_channel_reporting_ind(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_channel_status_ind(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_sca_req(void) { return 0x07; }
uint8_t r_ble_ll_ctrl_rx_sca_rsp(void) { return 0x07; }
void r_ble_ll_ctrl_channel_class_reporting_make(void) { }
void r_ble_ll_ctrl_channel_class_enable_make(void) { }
void r_ble_ll_ctrl_sca_req_rsp_make(void) { }
int r_ble_ll_modify_sca(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_req_peer_sca(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_50_FEATURE_SUPPORT
#if !DEFAULT_BT_LE_50_FEATURE_SUPPORT
int r_ble_ll_conn_hci_le_rd_phy(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_hci_le_set_def_phy(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_ll_conn_hci_le_set_phy(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!DEFAULT_BT_LE_50_FEATURE_SUPPORT
#if !CONFIG_BT_LE_DTM_ENABLED
void r_ble_lll_dtm_rx_pkt_in(void) { }
int r_ble_lll_dtm_rx_isr_end(void) { return -1; }
void r_ble_lll_dtm_reset(void) { }
void r_ble_lll_dtm_init(void) { }
void r_ble_lll_dtm_deinit(void) { }
int r_ble_lll_dtm_env_init(void) { return 0; }
void r_ble_lll_dtm_env_deinit(void) { }
int r_ble_lll_hci_dtm_tx_test(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_hci_dtm_rx_test(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_dtm_end_test(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_hci_dtm_rx_test_v2(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
int r_ble_lll_hci_dtm_tx_test_v2(void) { return BLE_ERR_UNKNOWN_HCI_CMD; }
#endif //!CONFIG_BT_LE_DTM_ENABLED

View File

@ -45,6 +45,14 @@ extern "C" {
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
#endif
#define DEGAULT_BT_LE_2M_PHY (CONFIG_BT_NIMBLE_LL_CFG_FEAT_LE_2M_PHY)
#define DEGAULT_BT_LE_CODED_PHY (CONFIG_BT_NIMBLE_LL_CFG_FEAT_LE_CODED_PHY)
#define DEFAULT_BT_LE_EXT_ADV (CONFIG_BT_NIMBLE_EXT_ADV)
#define DEFAULT_BT_LE_PERIODIC_ADV (CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV)
#define DEFAULT_BT_LE_EXT_SCAN (CONFIG_BT_NIMBLE_EXT_SCAN)
#define DEFAULT_BT_LE_PERIODIC_SYNC (CONFIG_BT_NIMBLE_ENABLE_PERIODIC_SYNC)
#define DEFAULT_BT_LE_PAST (CONFIG_BT_NIMBLE_PERIODIC_ADV_SYNC_TRANSFER)
#define DEFAULT_BT_LE_ROLE_OBSERVER MYNEWT_VAL(BLE_ROLE_OBSERVER)
#define DEFAULT_BT_LE_ROLE_CENTROL MYNEWT_VAL(BLE_ROLE_CENTRAL)
#define DEFAULT_BT_LE_ROLE_PERIPHERAL MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
@ -122,12 +130,55 @@ extern "C" {
#else
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT (8)
#endif
#if defined(CONFIG_BT_LE_50_FEATURE_SUPPORT)
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
#else
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (0)
#endif
#if defined(CONFIG_BT_LE_LL_CFG_FEAT_LE_2M_PHY)
#define DEGAULT_BT_LE_2M_PHY (CONFIG_BT_LE_LL_CFG_FEAT_LE_2M_PHY)
#else
#define DEGAULT_BT_LE_2M_PHY (0)
#endif
#if defined(CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY)
#define DEGAULT_BT_LE_CODED_PHY (CONFIG_BT_LE_LL_CFG_FEAT_LE_CODED_PHY)
#else
#define DEGAULT_BT_LE_CODED_PHY (0)
#endif
#if defined(CONFIG_BT_LE_EXT_ADV)
#define DEFAULT_BT_LE_EXT_ADV (CONFIG_BT_LE_EXT_ADV)
#else
#define DEFAULT_BT_LE_EXT_ADV (0)
#endif
#if defined(CONFIG_BT_LE_ENABLE_PERIODIC_ADV)
#define DEFAULT_BT_LE_PERIODIC_ADV (CONFIG_BT_LE_ENABLE_PERIODIC_ADV)
#else
#define DEFAULT_BT_LE_PERIODIC_ADV (0)
#endif
#if defined(CONFIG_BT_LE_EXT_SCAN)
#define DEFAULT_BT_LE_EXT_SCAN (CONFIG_BT_LE_EXT_SCAN)
#else
#define DEFAULT_BT_LE_EXT_SCAN (0)
#endif
#if defined(CONFIG_BT_LE_ENABLE_PERIODIC_SYNC)
#define DEFAULT_BT_LE_PERIODIC_SYNC (CONFIG_BT_LE_ENABLE_PERIODIC_SYNC)
#else
#define DEFAULT_BT_LE_PERIODIC_SYNC (0)
#endif
#if defined(BT_LE_PERIODIC_ADV_SYNC_TRANSFER)
#define DEFAULT_BT_LE_PAST (BT_LE_PERIODIC_ADV_SYNC_TRANSFER)
#else
#define DEFAULT_BT_LE_PAST (0)
#endif
#if defined(CONFIG_BT_LE_ROLE_CENTROL_ENABLE)
#define DEFAULT_BT_LE_ROLE_CENTROL (1)
#else

View File

@ -226,6 +226,7 @@ config BT_CTRL_DFT_TX_POWER_LEVEL_EFF
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
bool "BLE adv report flow control supported"
depends on (!BT_CTRL_RUN_IN_FLASH_ONLY) || (BT_CTRL_RUN_IN_FLASH_ONLY && BT_CTRL_BLE_SCAN)
default y
help
The function is mainly used to enable flow control for advertising reports. When it is enabled,
@ -512,3 +513,38 @@ menu "BLE disconnect when instant passed"
If this option is enabled, Controller will terminate the connection
when instant passed in PHY update procedure.
endmenu
config BT_CTRL_RUN_IN_FLASH_ONLY
bool "Put all BLE Controller code in flash"
default n
help
If this option is enabled, all code for the Bluetooth controller will be moved from ROM and IRAM
to flash, saving over 20K bytes of memory. However, it will require more flash resources and the
performance of Bluetooth will decrease If this option is enabled, Bluetooth may not work properly
during erasing flash. It is recommended to turn on the auto suspend function of flash. After auto
suspend is turned on, Bluetooth interrupts can be executed normally during erasing flash, with less
impact on Bluetooth performance.
config BT_CTRL_DTM_ENABLE
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable direct test mode feature"
default n
config BT_CTRL_BLE_MASTER
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable BLE master role feature"
default y
config BT_CTRL_BLE_TEST
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable BLE QA test feature"
default n
config BT_CTRL_BLE_SCAN
depends on BT_CTRL_RUN_IN_FLASH_ONLY
bool "Enable BLE scan feature"
default y
config BT_CTRL_BLE_SECURITY_ENABLE
depends on BT_CTRL_RUN_IN_FLASH_ONLY && BT_CONTROLLER_ONLY
bool "Enable BLE security feature"
default y

View File

@ -260,7 +260,6 @@ extern int API_vhci_host_register_callback(const vhci_host_callback_t *callback)
extern int ble_txpwr_set(int power_type, uint16_t handle, int power_level);
extern int ble_txpwr_get(int power_type, uint16_t handle);
extern uint16_t l2c_ble_link_get_tx_buf_num(void);
extern void coex_pti_v2(void);
extern bool btdm_deep_sleep_mem_init(void);
@ -499,7 +498,11 @@ static int interrupt_alloc_wrapper(int cpu_id, int source, intr_handler_t handle
{
btdm_isr_alloc_t p;
p.source = source;
#if CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
p.flags = ESP_INTR_FLAG_LEVEL3;
#else
p.flags = ESP_INTR_FLAG_LEVEL3 | ESP_INTR_FLAG_IRAM;
#endif
p.fn = handler;
p.arg = arg;
p.handle = (intr_handle_t *)ret_handle;
@ -1426,6 +1429,10 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
ESP_LOGI(BT_LOG_TAG, "BT controller compile version [%s]", btdm_controller_get_compile_version());
#if (CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
ESP_LOGI(BT_LOG_TAG,"Put all controller code in flash");
#endif
if ((err = btdm_low_power_mode_init(cfg)) != ESP_OK) {
ESP_LOGE(BT_LOG_TAG, "Low power module initialization failed");
goto error;
@ -1869,11 +1876,6 @@ int IRAM_ATTR esp_bt_h4tl_eif_io_event_notify(int event)
return btdm_hci_tl_io_event_post(event);
}
uint16_t esp_bt_get_tx_buf_num(void)
{
return l2c_ble_link_get_tx_buf_num();
}
static void coex_wifi_sleep_set_hook(bool sleep)
{

View File

@ -385,7 +385,7 @@ static esp_err_t sleep_modem_ble_mac_modem_state_init(uint8_t extra)
int retention_args = extra;
sleep_retention_module_init_param_t init_param = {
.cbs = { .create = { .handle = sleep_modem_ble_mac_retention_init, .arg = &retention_args } },
.depends = BIT(SLEEP_RETENTION_MODULE_BT_BB)
.depends = RETENTION_MODULE_BITMAP_INIT(BT_BB)
};
esp_err_t err = sleep_retention_module_init(SLEEP_RETENTION_MODULE_BLE_MAC, &init_param);
if (err == ESP_OK) {

View File

@ -689,3 +689,11 @@ config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
default 0
config BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
bool "Enable enhanced Access Address check in CONNECT_IND"
default n
help
Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU.
This improves security by ensuring that only connection requests with valid Access Addresses are accepted.
If disabled, only basic checks are applied, improving compatibility.

View File

@ -593,7 +593,7 @@ static esp_err_t sleep_modem_ble_mac_modem_state_init(uint8_t extra)
int retention_args = extra;
sleep_retention_module_init_param_t init_param = {
.cbs = { .create = { .handle = sleep_modem_ble_mac_retention_init, .arg = &retention_args } },
.depends = BIT(SLEEP_RETENTION_MODULE_BT_BB)
.depends = RETENTION_MODULE_BITMAP_INIT(BT_BB)
};
esp_err_t err = sleep_retention_module_init(SLEEP_RETENTION_MODULE_BLE_MAC, &init_param);
if (err == ESP_OK) {

View File

@ -148,6 +148,12 @@ extern "C" {
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#ifdef CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS)
#else
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (0)
#endif
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#else
@ -218,7 +224,6 @@ extern "C" {
#define BLE_LL_TX_PWR_DBM_N (CONFIG_BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF)
#define RUN_BQB_TEST (0)
#define RUN_QA_TEST (0)
#define NIMBLE_DISABLE_SCAN_BACKOFF (0)

View File

@ -690,3 +690,11 @@ config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
default 0
config BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
bool "Enable enhanced Access Address check in CONNECT_IND"
default n
help
Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU.
This improves security by ensuring that only connection requests with valid Access Addresses are accepted.
If disabled, only basic checks are applied, improving compatibility.

View File

@ -585,7 +585,7 @@ static esp_err_t sleep_modem_ble_mac_modem_state_init(uint8_t extra)
int retention_args = extra;
sleep_retention_module_init_param_t init_param = {
.cbs = { .create = { .handle = sleep_modem_ble_mac_retention_init, .arg = &retention_args } },
.depends = BIT(SLEEP_RETENTION_MODULE_BT_BB)
.depends = RETENTION_MODULE_BITMAP_INIT(BT_BB)
};
esp_err_t err = sleep_retention_module_init(SLEEP_RETENTION_MODULE_BLE_MAC, &init_param);
if (err == ESP_OK) {

View File

@ -148,6 +148,12 @@ extern "C" {
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF
#ifdef CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (CONFIG_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS)
#else
#define DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS (0)
#endif
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
#else

View File

@ -1198,6 +1198,7 @@ uint16_t bt_mesh_gattc_get_service_uuid(struct bt_mesh_conn *conn)
int bt_mesh_gattc_conn_create(const bt_mesh_addr_t *addr, uint16_t service_uuid)
{
tBTA_BLE_CONN_PARAMS conn_1m_param = {0};
uint8_t zero[6] = {0};
int i;
@ -1251,10 +1252,14 @@ int bt_mesh_gattc_conn_create(const bt_mesh_addr_t *addr, uint16_t service_uuid)
* Slave_latency: 0x0
* Supervision_timeout: 1s
*/
BTA_DmSetBlePrefConnParams(bt_mesh_gattc_info[i].addr.val, 0x18, 0x18, 0x00, 0x64);
conn_1m_param.interval_min = 0x18;
conn_1m_param.interval_max = 0x18;
conn_1m_param.latency = 0;
conn_1m_param.supervision_timeout = 0x64;
BTA_GATTC_Open(bt_mesh_gattc_if, bt_mesh_gattc_info[i].addr.val,
bt_mesh_gattc_info[i].addr.type, true, BTA_GATT_TRANSPORT_LE, FALSE);
BTA_GATTC_Enh_Open(bt_mesh_gattc_if, bt_mesh_gattc_info[i].addr.val,
bt_mesh_gattc_info[i].addr.type, true, BTA_GATT_TRANSPORT_LE, FALSE, BLE_ADDR_UNKNOWN_TYPE,
BTA_BLE_PHY_1M_MASK, &conn_1m_param, NULL, NULL);
return 0;
}

View File

@ -1483,6 +1483,8 @@ int settings_core_commit(void)
struct bt_mesh_hb_pub *hb_pub = NULL;
struct bt_mesh_cfg_srv *cfg = NULL;
bt_mesh_atomic_set_bit(bt_mesh.flags, BLE_MESH_VALID);
hb_pub = bt_mesh_hb_pub_get();
if (hb_pub && hb_pub->dst != BLE_MESH_ADDR_UNASSIGNED &&
hb_pub->count && hb_pub->period) {
@ -1501,7 +1503,6 @@ int settings_core_commit(void)
cfg->default_ttl = stored_cfg.cfg.default_ttl;
}
bt_mesh_atomic_set_bit(bt_mesh.flags, BLE_MESH_VALID);
bt_mesh_net_start();
}
#endif /* CONFIG_BLE_MESH_NODE */

View File

@ -1217,19 +1217,23 @@ config BT_BLE_RPA_TIMEOUT
Default is 900 s (15 minutes). Range is 1 s to 1 hour (3600 s).
config BT_BLE_50_FEATURES_SUPPORTED
bool "Enable BLE 5.0 features"
bool "Enable BLE 5.0 features(please disable BLE 4.2 if enable BLE 5.0)"
depends on (BT_BLE_ENABLED && ((BT_CONTROLLER_ENABLED && SOC_BLE_50_SUPPORTED) || BT_CONTROLLER_DISABLED))
default y
help
Enabling this option activates BLE 5.0 features.
This option is universally supported in chips that support BLE, except for ESP32.
BLE 4.2 and BLE 5.0 cannot be used simultaneously.
config BT_BLE_42_FEATURES_SUPPORTED
bool "Enable BLE 4.2 features"
bool "Enable BLE 4.2 features(please disable BLE 5.0 if enable BLE 4.2)"
depends on (BT_BLE_ENABLED && ((BT_CONTROLLER_ENABLED && SOC_BLE_SUPPORTED) || BT_CONTROLLER_DISABLED))
default n
help
This enables BLE 4.2 features.
This option is universally supported by all ESP chips with BLE capabilities.
BLE 4.2 and BLE 5.0 cannot be used simultaneously.
config BT_BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable BLE periodic advertising sync transfer feature"

View File

@ -67,46 +67,134 @@ esp_err_t esp_ble_gattc_app_unregister(esp_gatt_if_t gattc_if)
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gattc_args_t), NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
#if (BLE_42_FEATURE_SUPPORT == TRUE)
esp_err_t esp_ble_gattc_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, esp_ble_addr_type_t remote_addr_type, bool is_direct)
esp_err_t esp_ble_gattc_enh_open(esp_gatt_if_t gattc_if, esp_ble_gatt_creat_conn_params_t *creat_conn_params)
{
btc_msg_t msg = {0};
btc_ble_gattc_args_t arg;
const esp_ble_conn_params_t *conn_params;
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
if (!creat_conn_params) {
return ESP_ERR_INVALID_ARG;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_OPEN;
arg.open.gattc_if = gattc_if;
memcpy(arg.open.remote_bda, remote_bda, ESP_BD_ADDR_LEN);
arg.open.remote_addr_type = remote_addr_type;
arg.open.is_direct = is_direct;
arg.open.is_aux = false;
memcpy(arg.open.remote_bda, creat_conn_params->remote_bda, ESP_BD_ADDR_LEN);
arg.open.remote_addr_type = creat_conn_params->remote_addr_type;
arg.open.is_direct = creat_conn_params->is_direct;
arg.open.is_aux= creat_conn_params->is_aux;
arg.open.own_addr_type = creat_conn_params->own_addr_type;
arg.open.phy_mask = creat_conn_params->phy_mask;
// If not aux open, shouldn't set 2M and coded PHY connection params
if (!creat_conn_params->is_aux &&
((creat_conn_params->phy_mask & ESP_BLE_PHY_2M_PREF_MASK) ||
(creat_conn_params->phy_mask & ESP_BLE_PHY_CODED_PREF_MASK))) {
return ESP_ERR_INVALID_ARG;
}
if (creat_conn_params->phy_mask & ESP_BLE_PHY_1M_PREF_MASK) {
if (!creat_conn_params->phy_1m_conn_params) {
return ESP_ERR_INVALID_ARG;
}
conn_params = creat_conn_params->phy_1m_conn_params;
if (ESP_BLE_IS_VALID_PARAM(conn_params->interval_min, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->interval_max, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->supervision_timeout, ESP_BLE_CONN_SUP_TOUT_MIN, ESP_BLE_CONN_SUP_TOUT_MAX) &&
(conn_params->latency <= ESP_BLE_CONN_LATENCY_MAX) &&
((conn_params->supervision_timeout * 10) >= ((1 + conn_params->latency) * ((conn_params->interval_max * 5) >> 1))) &&
(conn_params->interval_min <= conn_params->interval_max)) {
memcpy(&arg.open.phy_1m_conn_params, conn_params, sizeof(esp_ble_conn_params_t));
} else {
LOG_ERROR("%s, invalid 1M PHY connection params: min_int = %d, max_int = %d, latency = %d, timeout = %d", __func__,
conn_params->interval_min,
conn_params->interval_max,
conn_params->latency,
conn_params->supervision_timeout);
return ESP_ERR_INVALID_ARG;
}
}
if (creat_conn_params->phy_mask & ESP_BLE_PHY_2M_PREF_MASK) {
if (!creat_conn_params->phy_2m_conn_params) {
return ESP_ERR_INVALID_ARG;
}
conn_params = creat_conn_params->phy_2m_conn_params;
if (ESP_BLE_IS_VALID_PARAM(conn_params->interval_min, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->interval_max, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->supervision_timeout, ESP_BLE_CONN_SUP_TOUT_MIN, ESP_BLE_CONN_SUP_TOUT_MAX) &&
(conn_params->latency <= ESP_BLE_CONN_LATENCY_MAX) &&
((conn_params->supervision_timeout * 10) >= ((1 + conn_params->latency) * ((conn_params->interval_max * 5) >> 1))) &&
(conn_params->interval_min <= conn_params->interval_max)) {
memcpy(&arg.open.phy_2m_conn_params, conn_params, sizeof(esp_ble_conn_params_t));
} else {
LOG_ERROR("%s, invalid 2M PHY connection params: min_int = %d, max_int = %d, latency = %d, timeout = %d", __func__,
conn_params->interval_min,
conn_params->interval_max,
conn_params->latency,
conn_params->supervision_timeout);
return ESP_ERR_INVALID_ARG;
}
}
if (creat_conn_params->phy_mask & ESP_BLE_PHY_CODED_PREF_MASK) {
if (!creat_conn_params->phy_coded_conn_params) {
return ESP_ERR_INVALID_ARG;
}
conn_params = creat_conn_params->phy_coded_conn_params;
if (ESP_BLE_IS_VALID_PARAM(conn_params->interval_min, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->interval_max, ESP_BLE_CONN_INT_MIN, ESP_BLE_CONN_INT_MAX) &&
ESP_BLE_IS_VALID_PARAM(conn_params->supervision_timeout, ESP_BLE_CONN_SUP_TOUT_MIN, ESP_BLE_CONN_SUP_TOUT_MAX) &&
(conn_params->latency <= ESP_BLE_CONN_LATENCY_MAX) &&
((conn_params->supervision_timeout * 10) >= ((1 + conn_params->latency) * ((conn_params->interval_max * 5) >> 1))) &&
(conn_params->interval_min <= conn_params->interval_max)) {
memcpy(&arg.open.phy_coded_conn_params, conn_params, sizeof(esp_ble_conn_params_t));
} else {
LOG_ERROR("%s, invalid Coded PHY connection params: min_int = %d, max_int = %d, latency = %d, timeout = %d", __func__,
conn_params->interval_min,
conn_params->interval_max,
conn_params->latency,
conn_params->supervision_timeout);
return ESP_ERR_INVALID_ARG;
}
}
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gattc_args_t), NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
#if (BLE_42_FEATURE_SUPPORT == TRUE)
esp_err_t esp_ble_gattc_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, esp_ble_addr_type_t remote_addr_type, bool is_direct)
{
esp_ble_gatt_creat_conn_params_t creat_conn_params = {0};
memcpy(creat_conn_params.remote_bda, remote_bda, ESP_BD_ADDR_LEN);
creat_conn_params.remote_addr_type = remote_addr_type;
creat_conn_params.is_direct = is_direct;
creat_conn_params.is_aux = false;
creat_conn_params.own_addr_type = 0xff; //undefined, will use local value
creat_conn_params.phy_mask = 0x0;
return esp_ble_gattc_enh_open(gattc_if, &creat_conn_params);
}
#endif // #if (BLE_42_FEATURE_SUPPORT == TRUE)
#if (BLE_50_FEATURE_SUPPORT == TRUE)
esp_err_t esp_ble_gattc_aux_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, esp_ble_addr_type_t remote_addr_type, bool is_direct)
{
btc_msg_t msg;
btc_ble_gattc_args_t arg;
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTC;
msg.act = BTC_GATTC_ACT_AUX_OPEN;
arg.open.gattc_if = gattc_if;
memcpy(arg.open.remote_bda, remote_bda, ESP_BD_ADDR_LEN);
arg.open.remote_addr_type = remote_addr_type;
arg.open.is_direct = is_direct;
arg.open.is_aux = true;
return (btc_transfer_context(&msg, &arg, sizeof(btc_ble_gattc_args_t), NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
esp_ble_gatt_creat_conn_params_t creat_conn_params = {0};
memcpy(creat_conn_params.remote_bda, remote_bda, ESP_BD_ADDR_LEN);
creat_conn_params.remote_addr_type = remote_addr_type;
creat_conn_params.is_direct = is_direct;
creat_conn_params.is_aux = true;
creat_conn_params.own_addr_type = 0xff; //undefined, will use local value
creat_conn_params.phy_mask = 0x0;
return esp_ble_gattc_enh_open(gattc_if, &creat_conn_params);
}
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)

View File

@ -145,6 +145,25 @@ typedef uint8_t esp_link_key[ESP_BT_OCTET16_LEN]; /* Link Key */
#define ESP_BLE_CONN_SUP_TOUT_MIN 0x000A /*!< relate to BTM_BLE_CONN_SUP_TOUT_MIN in stack/btm_ble_api.h */
#define ESP_BLE_CONN_SUP_TOUT_MAX 0x0C80 /*!< relate to ESP_BLE_CONN_SUP_TOUT_MAX in stack/btm_ble_api.h */
#define ESP_BLE_PHY_1M_PREF_MASK (1 << 0) /*!< The Host prefers use the LE1M transmitter or receiver PHY */
#define ESP_BLE_PHY_2M_PREF_MASK (1 << 1) /*!< The Host prefers use the LE2M transmitter or receiver PHY */
#define ESP_BLE_PHY_CODED_PREF_MASK (1 << 2) /*!< The Host prefers use the LE CODED transmitter or receiver PHY */
typedef uint8_t esp_ble_phy_mask_t;
/**
* @brief create connection parameters
*/
typedef struct {
uint16_t scan_interval; /*!< Initial scan interval, in units of 0.625ms, the range is 0x0004(2.5ms) to 0xFFFF(10.24s). */
uint16_t scan_window; /*!< Initial scan window, in units of 0.625ms, the range is 0x0004(2.5ms) to 0xFFFF(10.24s). */
uint16_t interval_min; /*!< Minimum connection interval, in units of 1.25ms, the range is 0x0006(7.5ms) to 0x0C80(4s). */
uint16_t interval_max; /*!< Maximum connection interval, in units of 1.25ms, the range is 0x0006(7.5ms) to 0x0C80(4s). */
uint16_t latency; /*!< Connection latency, the range is 0x0000(0) to 0x01F3(499). */
uint16_t supervision_timeout; /*!< Connection supervision timeout, in units of 10ms, the range is from 0x000A(100ms) to 0x0C80(32s). */
uint16_t min_ce_len; /*!< Minimum connection event length, in units of 0.625ms, setting to 0 for no preferred parameters. */
uint16_t max_ce_len; /*!< Maximum connection event length, in units of 0.625ms, setting to 0 for no preferred parameters. */
} esp_ble_conn_params_t;
/// Check the param is valid or not
#define ESP_BLE_IS_VALID_PARAM(x, min, max) (((x) >= (min) && (x) <= (max)) )

View File

@ -682,6 +682,19 @@ typedef struct {
esp_bt_uuid_t uuid; /*!< Included service UUID. */
} esp_gattc_incl_svc_elem_t;
/** @brief Represents a creat connection element. */
typedef struct {
esp_bd_addr_t remote_bda; /*!< The Bluetooth address of the remote device */
esp_ble_addr_type_t remote_addr_type; /*!< Address type of the remote device */
bool is_direct; /*!< Direct connection or background auto connection(by now, background auto connection is not supported */
bool is_aux; /*!< Set to true for BLE 5.0 or higher to enable auxiliary connections; set to false for BLE 4.2 or lower. */
esp_ble_addr_type_t own_addr_type; /*!< Specifies the address type used in the connection request. Set to 0xFF if the address type is unknown. */
esp_ble_phy_mask_t phy_mask; /*!< Indicates which PHY connection parameters will be used. When is_aux is false, only the connection params for 1M PHY can be specified */
const esp_ble_conn_params_t *phy_1m_conn_params; /*!< Connection parameters for the LE 1M PHY */
const esp_ble_conn_params_t *phy_2m_conn_params; /*!< Connection parameters for the LE 2M PHY */
const esp_ble_conn_params_t *phy_coded_conn_params; /*!< Connection parameters for the LE Coded PHY */
} esp_ble_gatt_creat_conn_params_t;
#ifdef __cplusplus
}
#endif

View File

@ -314,7 +314,20 @@ esp_err_t esp_ble_gattc_app_register(uint16_t app_id);
*/
esp_err_t esp_ble_gattc_app_unregister(esp_gatt_if_t gattc_if);
#if (BLE_42_FEATURE_SUPPORT == TRUE)
/**
* @brief Open a direct connection or add a background auto connection.
* Note: Do not enable both BLE_42_FEATURE_SUPPORT and BLE_50_FEATURE_SUPPORT configuration options simultaneously.
*
* @param[in] gattc_if: GATT client access interface.
* @param[in] esp_gatt_create_conn: Pointer to the structure containing connection parameters.
*
* @return
* - ESP_OK: Operation successful
* - others: Operation failed
*
*/
esp_err_t esp_ble_gattc_enh_open(esp_gatt_if_t gattc_if, esp_ble_gatt_creat_conn_params_t *esp_gatt_create_conn);
/**
* @brief Open a direct connection or add a background auto connection
*
@ -328,12 +341,14 @@ esp_err_t esp_ble_gattc_app_unregister(esp_gatt_if_t gattc_if);
* - other: failed
*
*/
#if (BLE_42_FEATURE_SUPPORT == TRUE)
esp_err_t esp_ble_gattc_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, esp_ble_addr_type_t remote_addr_type, bool is_direct);
#endif // #if (BLE_42_FEATURE_SUPPORT == TRUE)
#if (BLE_50_FEATURE_SUPPORT == TRUE)
esp_err_t esp_ble_gattc_aux_open(esp_gatt_if_t gattc_if, esp_bd_addr_t remote_bda, esp_ble_addr_type_t remote_addr_type, bool is_direct);
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
/**
* @brief Close the virtual connection to the GATT server. gattc may have multiple virtual GATT server connections when multiple app_id registered,
* this API only close one virtual GATT server connection. if there exist other virtual GATT server connections,

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -63,6 +63,7 @@ typedef enum
ESP_HF_WBS_RESPONSE_EVT, /*!< Codec Status */
ESP_HF_BCS_RESPONSE_EVT, /*!< Final Codec Choice */
ESP_HF_PKT_STAT_NUMS_GET_EVT, /*!< Request number of packet different status */
ESP_HF_PROF_STATE_EVT, /*!< Indicate HF init or deinit complete */
} esp_hf_cb_event_t;
/// Dial type of ESP_HF_DIAL_EVT
@ -223,6 +224,13 @@ typedef union
uint32_t tx_discarded; /*!< the total number of packets send lost */
} pkt_nums; /*!< AG callback param of ESP_HF_PKT_STAT_NUMS_GET_EVT */
/**
* @brief ESP_HF_PROF_STATE_EVT
*/
struct ag_prof_stat_param {
esp_hf_prof_state_t state; /*!< hf profile state param */
} prof_stat; /*!< status to indicate hf prof init or deinit */
} esp_hf_cb_param_t; /*!< HFP AG callback param compound*/
/**
@ -284,6 +292,7 @@ esp_err_t esp_hf_ag_register_callback(esp_hf_cb_t callback);
*
* @brief Initialize the bluetooth HF AG module.
* This function should be called after esp_bluedroid_enable() completes successfully.
* ESP_HF_PROF_STATE_EVT with ESP_HF_INIT_SUCCESS will reported to the APP layer.
*
* @return
* - ESP_OK: if the initialization request is sent successfully
@ -297,6 +306,7 @@ esp_err_t esp_hf_ag_init(void);
*
* @brief De-initialize for HF AG module.
* This function should be called only after esp_bluedroid_enable() completes successfully.
* ESP_HF_PROF_STATE_EVT with ESP_HF_DEINIT_SUCCESS will reported to the APP layer.
*
* @return
* - ESP_OK: success
@ -504,13 +514,13 @@ esp_err_t esp_hf_ag_cind_response(esp_bd_addr_t remote_addr,
/**
*
* @brief Reponse for AT+COPS command from HF Client.
* @brief Response for AT+COPS command from HF Client.
* As a precondition to use this API, Service Level Connection shall exist with HFP client.
*
* @param[in] remote_addr: remote bluetooth device address
* @param[in] name: current operator name
* @return
* - ESP_OK: reponse for AT+COPS command is sent to lower layer
* - ESP_OK: response for AT+COPS command is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*
@ -529,7 +539,7 @@ esp_err_t esp_hf_ag_cops_response(esp_bd_addr_t remote_addr, char *name);
* @param[in] mode: current call mode (voice/data/fax)
* @param[in] mpty: single or multi type
* @param[in] number: current call number
* @param[in] type: international type or unknow
* @param[in] type: international type or unknown
* @return
* - ESP_OK: response to AT+CLCC command is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -97,6 +97,7 @@ typedef enum {
ESP_HF_CLIENT_BINP_EVT, /*!< requested number of last voice tag from AG */
ESP_HF_CLIENT_RING_IND_EVT, /*!< ring indication event */
ESP_HF_CLIENT_PKT_STAT_NUMS_GET_EVT, /*!< requested number of packet different status */
ESP_HF_CLIENT_PROF_STATE_EVT, /*!< Indicate HF CLIENT init or deinit complete */
} esp_hf_client_cb_event_t;
/// HFP client callback parameters
@ -266,6 +267,13 @@ typedef union {
uint32_t tx_discarded; /*!< the total number of packets send lost */
} pkt_nums; /*!< HF callback param of ESP_HF_CLIENT_PKT_STAT_NUMS_GET_EVT */
/**
* @brief ESP_HF_CLIENT_PROF_STATE_EVT
*/
struct hf_client_prof_stat_param {
esp_hf_prof_state_t state; /*!< hf client profile state param */
} prof_stat; /*!< status to indicate hf client prof init or deinit */
} esp_hf_client_cb_param_t; /*!< HFP client callback parameters */
/**
@ -323,6 +331,7 @@ esp_err_t esp_hf_client_register_callback(esp_hf_client_cb_t callback);
*
* @brief Initialize the bluetooth HFP client module.
* This function should be called after esp_bluedroid_enable() completes successfully.
* ESP_HF_CLIENT_PROF_STATE_EVT with ESP_HF_INIT_SUCCESS will reported to the APP layer.
*
* @return
* - ESP_OK: if the initialization request is sent successfully
@ -336,6 +345,7 @@ esp_err_t esp_hf_client_init(void);
*
* @brief De-initialize for HFP client module.
* This function should be called only after esp_bluedroid_enable() completes successfully.
* ESP_HF_CLIENT_PROF_STATE_EVT with ESP_HF_DEINIT_SUCCESS will reported to the APP layer.
*
* @return
* - ESP_OK: success
@ -422,7 +432,7 @@ esp_err_t esp_hf_client_start_voice_recognition(void);
* As a precondition to use this API, Service Level Connection shall exist with AG.
*
* @return
* - ESP_OK: stoping voice recognition is sent to lower layer
* - ESP_OK: stopping voice recognition is sent to lower layer
* - ESP_ERR_INVALID_STATE: if bluetooth stack is not yet enabled
* - ESP_FAIL: others
*

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -13,6 +13,16 @@
extern "C" {
#endif
/// profile states
typedef enum {
ESP_HF_INIT_SUCCESS = 0, /*!< Indicate init successful */
ESP_HF_INIT_ALREADY, /*!< Indicate init repeated */
ESP_HF_INIT_FAIL, /*!< Indicate init fail */
ESP_HF_DEINIT_SUCCESS, /*!< Indicate deinit successful */
ESP_HF_DEINIT_ALREADY, /*!< Indicate deinit repeated */
ESP_HF_DEINIT_FAIL, /*!< Indicate deinit fail */
} esp_hf_prof_state_t;
/// in-band ring tone state
typedef enum {
ESP_HF_IN_BAND_RINGTONE_NOT_PROVIDED = 0,
@ -128,7 +138,7 @@ typedef enum {
/// +CLCC address type
typedef enum {
ESP_HF_CALL_ADDR_TYPE_UNKNOWN = 0x81, /*!< unkown address type */
ESP_HF_CALL_ADDR_TYPE_UNKNOWN = 0x81, /*!< unknown address type */
ESP_HF_CALL_ADDR_TYPE_INTERNATIONAL = 0x91, /*!< international address */
} esp_hf_call_addr_type_t;
@ -160,7 +170,7 @@ typedef enum
ESP_HF_NREC_START
} esp_hf_nrec_t;
///+CCWA resposne status
///+CCWA response status
typedef enum {
ESP_HF_CALL_WAITING_INACTIVE,
ESP_HF_CALL_WAITING_ACTIVE,

View File

@ -6049,7 +6049,7 @@ void bta_dm_ble_gap_set_prefer_ext_conn_params(tBTA_DM_MSG *p_data)
sizeof(tBTA_DM_BLE_CONN_PARAMS));
}
if (conn_params.phy_mask & BTAS_PHY_CODED_MASK) {
if (conn_params.phy_mask & BTA_PHY_CODED_MASK) {
memcpy(&conn_params.phy_coded_conn_params, &p_data->ble_set_per_ext_conn_params.phy_coded_conn_params,
sizeof(tBTA_DM_BLE_CONN_PARAMS));
}
@ -6673,7 +6673,9 @@ void btm_dm_start_gatt_discovery (BD_ADDR bd_addr)
btm_dm_start_disc_gatt_services(bta_dm_search_cb.conn_id);
} else {
//TODO need to add addr_type in future
BTA_GATTC_Open(bta_dm_search_cb.client_if, bd_addr, BLE_ADDR_UNKNOWN_TYPE, TRUE, BTA_GATT_TRANSPORT_LE, FALSE);
BTA_GATTC_Enh_Open(bta_dm_search_cb.client_if, bd_addr, BLE_ADDR_UNKNOWN_TYPE, TRUE,
BTA_GATT_TRANSPORT_LE, FALSE, BLE_ADDR_UNKNOWN_TYPE, 0, NULL, NULL, NULL);
}
}
#endif /* #if (GATTC_INCLUDED == TRUE) */

View File

@ -1040,7 +1040,7 @@ typedef struct {
#define BTA_PHY_1M_MASK (1 << 0)
#define BTA_PHY_2M_MASK (1 << 1)
#define BTAS_PHY_CODED_MASK (1 << 2)
#define BTA_PHY_CODED_MASK (1 << 2)
typedef struct {
BT_HDR hdr;
BD_ADDR bd_addr;

View File

@ -36,6 +36,7 @@
#include "osi/allocator.h"
#include "osi/mutex.h"
#include "bta_hh_int.h"
#include "btm_int.h"
#if (defined BTA_HH_LE_INCLUDED && BTA_HH_LE_INCLUDED == TRUE)
#include "bta_hh_int.h"
@ -70,6 +71,7 @@ static void bta_gattc_req_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_REQ_TYP
static tBTA_GATTC_FIND_SERVICE_CB bta_gattc_register_service_change_notify(UINT16 conn_id, BD_ADDR remote_bda);
extern void btc_gattc_congest_callback(tBTA_GATTC *param);
extern uint32_t BTM_BleUpdateOwnType(uint8_t *own_bda_type, tBTM_START_ADV_CMPL_CBACK *cb);
static const tGATT_CBACK bta_gattc_cl_cback = {
bta_gattc_conn_cback,
@ -336,6 +338,10 @@ void bta_gattc_process_api_open (tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA *p_msg)
UNUSED(p_cb);
if (p_clreg != NULL) {
if (p_msg->api_conn.own_addr_type <= BLE_ADDR_TYPE_MAX) {
// update own address type for creating connection
BTM_BleUpdateOwnType(&p_msg->api_conn.own_addr_type, NULL);
}
if (p_msg->api_conn.is_direct) {
if ((p_clcb = bta_gattc_find_alloc_clcb(p_msg->api_conn.client_if,
p_msg->api_conn.remote_bda,
@ -503,6 +509,7 @@ void bta_gattc_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
tBTA_GATTC_DATA gattc_data;
BOOLEAN found_app = FALSE;
tGATT_TCB *p_tcb;
tBTM_SEC_DEV_REC *p_dev_rec = NULL;
if (!p_clcb || !p_data) {
return;
@ -512,6 +519,33 @@ void bta_gattc_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
if(p_tcb) {
found_app = gatt_find_specific_app_in_hold_link(p_tcb, p_clcb->p_rcb->client_if);
}
if (p_data->api_conn.phy_mask) {
p_dev_rec = btm_find_or_alloc_dev(p_data->api_conn.remote_bda);
if (p_dev_rec) {
if (p_data->api_conn.is_aux) {
#if (BLE_50_FEATURE_SUPPORT == TRUE)
p_dev_rec->ext_conn_params.phy_mask = p_data->api_conn.phy_mask;
if (p_data->api_conn.phy_mask & BTA_BLE_PHY_1M_MASK) {
memcpy(&p_dev_rec->ext_conn_params.phy_1m_conn_params, &p_data->api_conn.phy_1m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
}
if (p_data->api_conn.phy_mask & BTA_BLE_PHY_2M_MASK) {
memcpy(&p_dev_rec->ext_conn_params.phy_2m_conn_params, &p_data->api_conn.phy_2m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
}
if (p_data->api_conn.phy_mask & BTA_BLE_PHY_CODED_MASK) {
memcpy(&p_dev_rec->ext_conn_params.phy_coded_conn_params, &p_data->api_conn.phy_coded_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
}
#endif
} else {
if (p_data->api_conn.phy_mask & BTA_BLE_PHY_1M_MASK) {
memcpy(&p_dev_rec->conn_params, &p_data->api_conn.phy_1m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
}
}
} else {
APPL_TRACE_ERROR("Unknown Device, setting rejected");
}
}
/* open/hold a connection */
if (!GATT_Connect(p_clcb->p_rcb->client_if, p_data->api_conn.remote_bda, p_data->api_conn.remote_addr_type,
TRUE, p_data->api_conn.transport, p_data->api_conn.is_aux)) {
@ -1807,8 +1841,8 @@ static void bta_gattc_enc_cmpl_cback(tGATT_IF gattc_if, BD_ADDR bda)
*******************************************************************************/
void bta_gattc_process_api_refresh(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA *p_msg)
{
tBTA_GATTC_SERV *p_srvc_cb = bta_gattc_find_srvr_cache(p_msg->api_conn.remote_bda);
tBTA_GATTC_CLCB *p_clcb = &bta_gattc_cb.clcb[0];
tBTA_GATTC_SERV *p_srvc_cb = bta_gattc_find_srvr_cache(p_msg->api_refresh.remote_bda);
tBTA_GATTC_CLCB *p_clcb = &bta_gattc_cb.clcb[0];
BOOLEAN found = FALSE;
UINT8 i;
UNUSED(p_cb);
@ -1928,7 +1962,7 @@ void bta_gattc_process_api_cache_get_addr_list(tBTA_GATTC_CB *p_cb, tBTA_GATTC_D
*******************************************************************************/
void bta_gattc_process_api_cache_clean(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA *p_msg)
{
tBTA_GATTC_SERV *p_srvc_cb = bta_gattc_find_srvr_cache(p_msg->api_conn.remote_bda);
tBTA_GATTC_SERV *p_srvc_cb = bta_gattc_find_srvr_cache(p_msg->api_clean.remote_bda);
UNUSED(p_cb);
if (p_srvc_cb != NULL && p_srvc_cb->p_srvc_cache != NULL) {

View File

@ -128,7 +128,7 @@ void BTA_GATTC_AppDeregister(tBTA_GATTC_IF client_if)
/*******************************************************************************
**
** Function BTA_GATTC_Open
** Function BTA_GATTC_Enh_Open
**
** Description Open a direct connection or add a background auto connection
** bd address
@ -142,8 +142,10 @@ void BTA_GATTC_AppDeregister(tBTA_GATTC_IF client_if)
** Returns void
**
*******************************************************************************/
void BTA_GATTC_Open(tBTA_GATTC_IF client_if, BD_ADDR remote_bda, tBTA_ADDR_TYPE remote_addr_type,
BOOLEAN is_direct, tBTA_GATT_TRANSPORT transport, BOOLEAN is_aux)
void BTA_GATTC_Enh_Open(tBTA_GATTC_IF client_if, BD_ADDR remote_bda, tBTA_ADDR_TYPE remote_addr_type,
BOOLEAN is_direct, tBTA_GATT_TRANSPORT transport, BOOLEAN is_aux, tBTA_ADDR_TYPE own_addr_type,
UINT8 phy_mask, tBTA_BLE_CONN_PARAMS *phy_1m_conn_params, tBTA_BLE_CONN_PARAMS *phy_2m_conn_params,
tBTA_BLE_CONN_PARAMS *phy_coded_conn_params)
{
tBTA_GATTC_API_OPEN *p_buf;
@ -155,8 +157,18 @@ void BTA_GATTC_Open(tBTA_GATTC_IF client_if, BD_ADDR remote_bda, tBTA_ADDR_TYPE
p_buf->transport = transport;
p_buf->is_aux = is_aux;
p_buf->remote_addr_type = remote_addr_type;
p_buf->own_addr_type = own_addr_type;
p_buf->phy_mask = phy_mask;
memcpy(p_buf->remote_bda, remote_bda, BD_ADDR_LEN);
if ((phy_mask & BTA_BLE_PHY_1M_MASK) && phy_1m_conn_params) {
memcpy(&p_buf->phy_1m_conn_params, phy_1m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
}
if ((phy_mask & BTA_BLE_PHY_2M_MASK) && phy_2m_conn_params) {
memcpy(&p_buf->phy_2m_conn_params, phy_2m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
}
if ((phy_mask & BTA_BLE_PHY_CODED_MASK) && phy_coded_conn_params) {
memcpy(&p_buf->phy_coded_conn_params, phy_coded_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
}
bta_sys_sendmsg(p_buf);
}
@ -472,7 +484,7 @@ void BTA_GATTC_GetGattDb(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle
** Description This function is called to read a characteristics value
**
** Parameters conn_id - connection ID.
** handle - characteritic handle to read.
** handle - characteristic handle to read.
**
** Returns None
**
@ -607,7 +619,7 @@ void BTA_GATTC_ReadMultipleVariable(UINT16 conn_id, tBTA_GATTC_MULTI *p_read_mul
**
** Parameters conn_id - connection ID.
** s_handle - start handle.
** e_handle - end hanle
** e_handle - end handle
** uuid - The attribute UUID.
**
** Returns None
@ -687,7 +699,7 @@ void BTA_GATTC_WriteCharValue ( UINT16 conn_id,
** Description This function is called to write descriptor value.
**
** Parameters conn_id - connection ID
** handle - descriptor hadle to write.
** handle - descriptor handle to write.
** write_type - write type.
** p_value - the value to be written.
**
@ -738,7 +750,7 @@ void BTA_GATTC_WriteCharDescr (UINT16 conn_id,
** Description This function is called to prepare write a characteristic value.
**
** Parameters conn_id - connection ID.
** p_char_id - GATT characteritic ID of the service.
** p_char_id - GATT characteristic ID of the service.
** offset - offset of the write value.
** len: length of the data to be written.
** p_value - the value to be written.
@ -781,7 +793,7 @@ void BTA_GATTC_PrepareWrite (UINT16 conn_id, UINT16 handle,
** Description This function is called to prepare write a characteristic descriptor value.
**
** Parameters conn_id - connection ID.
** p_char_descr_id - GATT characteritic descriptor ID of the service.
** p_char_descr_id - GATT characteristic descriptor ID of the service.
** offset - offset of the write value.
** len: length of the data to be written.
** p_value - the value to be written.
@ -1010,9 +1022,9 @@ void BTA_GATTC_Refresh(BD_ADDR remote_bda, bool erase_flash)
if(bta_sys_is_register(BTA_ID_GATTC) == FALSE) {
return;
}
tBTA_GATTC_API_OPEN *p_buf;
tBTA_GATTC_API_CACHE_REFRESH *p_buf;
if ((p_buf = (tBTA_GATTC_API_OPEN *) osi_malloc(sizeof(tBTA_GATTC_API_OPEN))) != NULL) {
if ((p_buf = (tBTA_GATTC_API_CACHE_REFRESH *) osi_malloc(sizeof(tBTA_GATTC_API_CACHE_REFRESH))) != NULL) {
p_buf->hdr.event = BTA_GATTC_API_REFRESH_EVT;
memcpy(p_buf->remote_bda, remote_bda, BD_ADDR_LEN);
@ -1068,9 +1080,9 @@ void BTA_GATTC_Clean(BD_ADDR remote_bda)
bta_gattc_cache_reset(remote_bda);
#endif
tBTA_GATTC_API_OPEN *p_buf;
tBTA_GATTC_API_CACHE_CLEAN *p_buf;
if ((p_buf = (tBTA_GATTC_API_OPEN *) osi_malloc(sizeof(tBTA_GATTC_API_OPEN))) != NULL) {
if ((p_buf = (tBTA_GATTC_API_CACHE_CLEAN *) osi_malloc(sizeof(tBTA_GATTC_API_CACHE_CLEAN))) != NULL) {
p_buf->hdr.event = BTA_GATTC_API_CACHE_CLEAN_EVT;
memcpy(p_buf->remote_bda, remote_bda, BD_ADDR_LEN);

View File

@ -110,7 +110,7 @@ typedef enum {
#define BTA_GATTC_WRITE_PREPARE GATT_WRITE_PREPARE
#define BTA_GATTC_INVALID_HANDLE 0
/* internal strucutre for GATTC register API */
/* internal structure for GATTC register API */
typedef struct {
BT_HDR hdr;
tBT_UUID app_uuid;
@ -133,9 +133,20 @@ typedef struct {
BOOLEAN is_direct;
BOOLEAN is_aux;
tBTA_TRANSPORT transport;
tBTA_ADDR_TYPE own_addr_type;
UINT8 phy_mask;
tBTA_BLE_CONN_PARAMS phy_1m_conn_params;
tBTA_BLE_CONN_PARAMS phy_2m_conn_params;
tBTA_BLE_CONN_PARAMS phy_coded_conn_params;
} tBTA_GATTC_API_OPEN;
typedef tBTA_GATTC_API_OPEN tBTA_GATTC_API_CANCEL_OPEN;
typedef struct {
BT_HDR hdr;
BD_ADDR remote_bda;
tBTA_ADDR_TYPE remote_addr_type;
tBTA_GATTC_IF client_if;
BOOLEAN is_direct;
} tBTA_GATTC_API_CANCEL_OPEN;
typedef struct {
BT_HDR hdr;
@ -202,6 +213,11 @@ typedef struct {
BT_HDR hdr;
} tBTA_GATTC_API_CFG_MTU;
typedef struct {
BT_HDR hdr;
BD_ADDR remote_bda;
} tBTA_GATTC_API_CACHE_REFRESH;
typedef struct {
BT_HDR hdr;
tBTA_GATTC_IF client_if;
@ -215,6 +231,11 @@ typedef struct {
tBTA_GATTC_IF client_if;
} tBTA_GATTC_API_GET_ADDR;
typedef struct {
BT_HDR hdr;
BD_ADDR remote_bda;
} tBTA_GATTC_API_CACHE_CLEAN;
typedef struct {
BT_HDR hdr;
BD_ADDR remote_bda;
@ -247,8 +268,10 @@ typedef union {
tBTA_GATTC_API_EXEC api_exec;
tBTA_GATTC_API_READ_MULTI api_read_multi;
tBTA_GATTC_API_CFG_MTU api_mtu;
tBTA_GATTC_API_CACHE_REFRESH api_refresh;
tBTA_GATTC_API_CACHE_ASSOC api_assoc;
tBTA_GATTC_API_GET_ADDR api_get_addr;
tBTA_GATTC_API_CACHE_CLEAN api_clean;
tBTA_GATTC_OP_CMPL op_cmpl;
tBTA_GATTC_INT_CONN int_conn;
tBTA_GATTC_ENC_CMPL enc_cmpl;
@ -313,7 +336,7 @@ typedef struct {
UINT16 total_char;
UINT16 total_attr;
UINT8 srvc_hdl_chg; /* service handle change indication pending */
UINT16 attr_index; /* cahce NV saving/loading attribute index */
UINT16 attr_index; /* cache NV saving/loading attribute index */
UINT16 mtu;
bool update_incl_srvc;

View File

@ -117,7 +117,7 @@ static void bta_hh_le_hid_report_dbg(tBTA_HH_DEV_CB *p_cb)
if (p_cb->hid_srvc[i].in_use) {
p_rpt = &p_cb->hid_srvc[i].report[0];
APPL_TRACE_DEBUG("\t HID serivce inst: %d", i);
APPL_TRACE_DEBUG("\t HID service inst: %d", i);
for (j = 0; j < BTA_HH_LE_RPT_MAX; j ++, p_rpt++) {
rpt_name = "Unknown";
@ -334,14 +334,15 @@ void bta_hh_le_open_conn(tBTA_HH_DEV_CB *p_cb, BD_ADDR remote_bda)
bta_hh_cb.le_cb_index[BTA_HH_GET_LE_CB_IDX(p_cb->hid_handle)] = p_cb->index;
p_cb->in_use = TRUE;
BTA_GATTC_Open(bta_hh_cb.gatt_if, remote_bda, BLE_ADDR_UNKNOWN_TYPE, TRUE, BTA_GATT_TRANSPORT_LE, FALSE);
BTA_GATTC_Enh_Open(bta_hh_cb.gatt_if, remote_bda, BLE_ADDR_UNKNOWN_TYPE, TRUE,
BTA_GATT_TRANSPORT_LE, FALSE, BLE_ADDR_UNKNOWN_TYPE, 0, NULL, NULL, NULL);
}
/*******************************************************************************
**
** Function bta_hh_le_fill_16bits_gatt_id
**
** Description Utility function to fill a GATT ID strucure
** Description Utility function to fill a GATT ID structure
**
*******************************************************************************/
void bta_hh_le_fill_16bits_gatt_id(UINT8 inst_id, UINT16 uuid, tBTA_GATT_ID *p_output)
@ -355,7 +356,7 @@ void bta_hh_le_fill_16bits_gatt_id(UINT8 inst_id, UINT16 uuid, tBTA_GATT_ID *p_
**
** Function bta_hh_le_fill_16bits_srvc_id
**
** Description Utility function to fill a service ID strucure with a 16 bits
** Description Utility function to fill a service ID structure with a 16 bits
** service UUID.
**
*******************************************************************************/
@ -372,7 +373,7 @@ void bta_hh_le_fill_16bits_srvc_id(BOOLEAN is_pri, UINT8 inst_id, UINT16 srvc_uu
**
** Function bta_hh_le_fill_16bits_char_id
**
** Description Utility function to fill a char ID strucure with a 16 bits
** Description Utility function to fill a char ID structure with a 16 bits
** char UUID.
**
*******************************************************************************/
@ -624,7 +625,7 @@ tBTA_HH_STATUS bta_hh_le_read_char_dscrpt(tBTA_HH_DEV_CB *p_cb, UINT16 srvc_uuid
**
** Function bta_hh_le_read_rpt_ref_descr
**
** Description read report refernece descriptors in service discovery process
** Description read report reference descriptors in service discovery process
**
*******************************************************************************/
void bta_hh_le_read_rpt_ref_descr(tBTA_HH_DEV_CB *p_dev_cb, tBTA_HH_LE_RPT *p_rpt)
@ -841,7 +842,7 @@ void bta_hh_le_register_input_notif(tBTA_HH_DEV_CB *p_dev_cb, UINT8 srvc_inst,
}
}
/*
else unknow protocol mode */
else unknown protocol mode */
}
}
}
@ -1486,7 +1487,7 @@ void bta_hh_le_gatt_disc_cmpl(tBTA_HH_DEV_CB *p_cb, tBTA_HH_STATUS status)
{
APPL_TRACE_DEBUG("bta_hh_le_gatt_disc_cmpl ");
/* if open sucessful or protocol mode not desired, keep the connection open but inform app */
/* if open successful or protocol mode not desired, keep the connection open but inform app */
if (status == BTA_HH_OK || status == BTA_HH_ERR_PROTO) {
/* assign a special APP ID temp, since device type unknown */
p_cb->app_id = BTA_HH_APP_ID_LE;
@ -1504,7 +1505,7 @@ void bta_hh_le_gatt_disc_cmpl(tBTA_HH_DEV_CB *p_cb, tBTA_HH_STATUS status)
**
** Function bta_hh_le_srvc_expl_srvc
**
** Description This function discover the next avaible HID service.
** Description This function discover the next available HID service.
**
** Parameters:
**
@ -2076,7 +2077,7 @@ void bta_hh_w4_le_read_descr_cmpl(tBTA_HH_DEV_CB *p_dev_cb, tBTA_HH_DATA *p_buf)
**
** Function bta_hh_w4_le_write_cmpl
**
** Description Write charactersitic complete event at W4_CONN st.
** Description Write characteristic complete event at W4_CONN st.
**
** Parameters:
**
@ -2104,7 +2105,7 @@ void bta_hh_w4_le_write_cmpl(tBTA_HH_DEV_CB *p_dev_cb, tBTA_HH_DATA *p_buf)
**
** Function bta_hh_le_write_cmpl
**
** Description Write charactersitic complete event at CONN st.
** Description Write characteristic complete event at CONN st.
**
** Parameters:
**
@ -2162,7 +2163,7 @@ void bta_hh_le_write_cmpl(tBTA_HH_DEV_CB *p_dev_cb, tBTA_HH_DATA *p_buf)
**
** Function bta_hh_le_write_char_descr_cmpl
**
** Description Write charactersitic descriptor complete event
** Description Write characteristic descriptor complete event
**
** Parameters:
**
@ -2216,7 +2217,7 @@ void bta_hh_le_write_char_descr_cmpl(tBTA_HH_DEV_CB *p_dev_cb, tBTA_HH_DATA *p_b
**
** Function bta_hh_le_input_rpt_notify
**
** Description process the notificaton event, most likely for input report.
** Description process the notification event, most likely for input report.
**
** Parameters:
**
@ -2357,7 +2358,7 @@ void bta_hh_gatt_close(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data)
**
** Function bta_hh_le_api_disc_act
**
** Description initaite a Close API to a remote HID device
** Description initiate a Close API to a remote HID device
**
** Returns void
**
@ -2601,7 +2602,8 @@ static void bta_hh_le_add_dev_bg_conn(tBTA_HH_DEV_CB *p_cb, BOOLEAN check_bond)
if (/*p_cb->dscp_info.flag & BTA_HH_LE_NORMAL_CONN &&*/
!p_cb->in_bg_conn && to_add) {
/* add device into BG connection to accept remote initiated connection */
BTA_GATTC_Open(bta_hh_cb.gatt_if, p_cb->addr, BLE_ADDR_UNKNOWN_TYPE, FALSE, BTA_GATT_TRANSPORT_LE, FALSE);
BTA_GATTC_Enh_Open(bta_hh_cb.gatt_if, p_cb->addr, BLE_ADDR_UNKNOWN_TYPE, FALSE,
BTA_GATT_TRANSPORT_LE, FALSE, BLE_ADDR_UNKNOWN_TYPE, 0, NULL, NULL);
p_cb->in_bg_conn = TRUE;
BTA_DmBleSetBgConnType(BTA_DM_BLE_CONN_AUTO, NULL);
@ -2682,7 +2684,7 @@ void bta_hh_le_update_scpp(tBTA_HH_DEV_CB *p_dev_cb, tBTA_HH_DATA *p_buf)
if (!p_dev_cb->is_le_device ||
p_dev_cb->mode != BTA_HH_PROTO_RPT_MODE ||
p_dev_cb->scps_supported == FALSE) {
APPL_TRACE_ERROR("Can not set ScPP scan paramter as boot host, or remote does not support ScPP ");
APPL_TRACE_ERROR("Can not set ScPP scan parameter as boot host, or remote does not support ScPP ");
cback_data.handle = p_dev_cb->hid_handle;
cback_data.status = BTA_HH_ERR;
@ -2908,7 +2910,7 @@ static void bta_hh_le_search_scps_chars(tBTA_HH_DEV_CB *p_cb)
**
** Function bta_hh_le_register_scpp_notif
**
** Description register scan parameter refresh notitication complete
** Description register scan parameter refresh notification complete
**
**
** Parameters:
@ -2919,7 +2921,7 @@ static void bta_hh_le_register_scpp_notif(tBTA_HH_DEV_CB *p_dev_cb, tBTA_GATT_ST
UINT8 sec_flag = 0;
tBTA_GATTC_CHAR_ID char_id;
/* if write scan parameter sucessful */
/* if write scan parameter successful */
/* if bonded and notification is not enabled, configure the client configuration */
if (status == BTA_GATT_OK &&
(p_dev_cb->scps_notify & BTA_HH_LE_SCPS_NOTIFY_SPT) != 0 &&
@ -2949,7 +2951,7 @@ static void bta_hh_le_register_scpp_notif(tBTA_HH_DEV_CB *p_dev_cb, tBTA_GATT_ST
**
** Function bta_hh_le_register_scpp_notif_cmpl
**
** Description action function to register scan parameter refresh notitication
** Description action function to register scan parameter refresh notification
**
** Parameters:
**

View File

@ -180,7 +180,7 @@ typedef UINT8 tBTA_GATT_STATUS;
#define BTA_GATTC_ADV_VSC_EVT 34 /* ADV VSC event */
#define BTA_GATTC_CONNECT_EVT 35 /* GATTC CONNECT event */
#define BTA_GATTC_DISCONNECT_EVT 36 /* GATTC DISCONNECT event */
#define BTA_GATTC_READ_MULTIPLE_EVT 37 /* GATTC Read mutiple event */
#define BTA_GATTC_READ_MULTIPLE_EVT 37 /* GATTC Read multiple event */
#define BTA_GATTC_QUEUE_FULL_EVT 38 /* GATTC queue full event */
#define BTA_GATTC_ASSOC_EVT 39 /* GATTC association address event */
#define BTA_GATTC_GET_ADDR_LIST_EVT 40 /* GATTC get address list in the cache event */
@ -728,6 +728,21 @@ typedef struct
tBTA_GATTC_SERVICE *included_service;
} __attribute__((packed)) tBTA_GATTC_INCLUDED_SVC;
typedef struct {
UINT16 scan_interval;
UINT16 scan_window;
UINT16 interval_min;
UINT16 interval_max;
UINT16 latency;
UINT16 supervision_timeout;
UINT16 min_ce_len;
UINT16 max_ce_len;
} tBTA_BLE_CONN_PARAMS;
#define BTA_BLE_PHY_1M_MASK (1 << 0)
#define BTA_BLE_PHY_2M_MASK (1 << 1)
#define BTA_BLE_PHY_CODED_MASK (1 << 2)
/*****************************************************************************
** External Function Declarations
*****************************************************************************/
@ -783,9 +798,10 @@ extern void BTA_GATTC_AppRegister(tBT_UUID *p_app_uuid, tBTA_GATTC_CBACK *p_clie
*******************************************************************************/
extern void BTA_GATTC_AppDeregister (tBTA_GATTC_IF client_if);
/*******************************************************************************
**
** Function BTA_GATTC_Open
** Function BTA_GATTC_Enh_Open
**
** Description Open a direct connection or add a background auto connection
** bd address
@ -793,13 +809,16 @@ extern void BTA_GATTC_AppDeregister (tBTA_GATTC_IF client_if);
** Parameters client_if: server interface.
** remote_bda: remote device BD address.
** remote_addr_type: remote device BD address type.
** is_direct: direct connection or background auto connection
** is_direct: direct connection or background auto connection.
** own_addr_type: own address type.
**
** Returns void
**
*******************************************************************************/
extern void BTA_GATTC_Open(tBTA_GATTC_IF client_if, BD_ADDR remote_bda, tBTA_ADDR_TYPE remote_addr_type,
BOOLEAN is_direct, tBTA_GATT_TRANSPORT transport, BOOLEAN is_aux);
extern void BTA_GATTC_Enh_Open(tBTA_GATTC_IF client_if, BD_ADDR remote_bda, tBTA_ADDR_TYPE remote_addr_type,
BOOLEAN is_direct, tBTA_GATT_TRANSPORT transport, BOOLEAN is_aux, tBTA_ADDR_TYPE own_addr_type,
UINT8 phy_mask, tBTA_BLE_CONN_PARAMS *phy_1m_conn_params, tBTA_BLE_CONN_PARAMS *phy_2m_conn_params,
tBTA_BLE_CONN_PARAMS *phy_coded_conn_params);
/*******************************************************************************
**
@ -937,8 +956,8 @@ extern void BTA_GATTC_GetGattDb(UINT16 conn_id, UINT16 start_handle, UINT16 end_
**
** Description This function is called to read a characteristics value
**
** Parameters conn_id - connectino ID.
** handle - characteritic handle to read.
** Parameters conn_id - connection ID.
** handle - characteristic handle to read.
**
** Returns None
**
@ -953,7 +972,7 @@ void BTA_GATTC_ReadCharacteristic(UINT16 conn_id, UINT16 handle, tBTA_GATT_AUTH_
**
** Parameters conn_id - connection ID.
** s_handle - start handle.
** e_handle - end hanle
** e_handle - end handle
** uuid - The attribute UUID.
**
** Returns None
@ -1072,7 +1091,7 @@ extern tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF
** Description This function is called to prepare write a characteristic value.
**
** Parameters conn_id - connection ID.
** handle - GATT characteritic handle.
** handle - GATT characteristic handle.
** offset - offset of the write value.
** len - length of the data to be written.
** p_value - the value to be written.
@ -1094,7 +1113,7 @@ extern void BTA_GATTC_PrepareWrite (UINT16 conn_id,
** Description This function is called to prepare write a characteristic descriptor value.
**
** Parameters conn_id - connection ID.
** p_char_descr_id - GATT characteritic descriptor ID of the service.
** p_char_descr_id - GATT characteristic descriptor ID of the service.
** offset - offset of the write value.
** len: length of the data to be written.
** p_value - the value to be written.
@ -1238,7 +1257,7 @@ extern void BTA_GATTC_ConfigureMTU (UINT16 conn_id);
**
** Function BTA_GATTS_Init
**
** Description This function is called to initalize GATTS module
** Description This function is called to initialize GATTS module
**
** Parameters None
**

View File

@ -175,8 +175,7 @@ bool btc_avrc_ct_init_p(void)
bool btc_avrc_tg_connected_p(void)
{
return (s_rc_tg_init == BTC_RC_TG_INIT_MAGIC) &&
(btc_rc_cb.rc_connected == TRUE) &&
(btc_rc_cb.rc_features & BTA_AV_FEAT_RCCT);
(btc_rc_cb.rc_connected == TRUE);
}
bool btc_avrc_ct_connected_p(void)
@ -507,7 +506,7 @@ static void handle_rc_connect (tBTA_AV_RC_OPEN *p_rc_open)
btc_avrc_ct_cb_to_app(ESP_AVRC_CT_CONNECTION_STATE_EVT, &param);
}
if (p_rc_open->peer_features & BTA_AV_FEAT_RCCT) {
if (btc_avrc_tg_init_p()) {
esp_avrc_tg_cb_param_t param;
memset(&param, 0, sizeof(esp_avrc_tg_cb_param_t));
param.conn_stat.connected = true;
@ -580,7 +579,7 @@ static void handle_rc_disconnect (tBTA_AV_RC_CLOSE *p_rc_close)
btc_avrc_ct_cb_to_app(ESP_AVRC_CT_CONNECTION_STATE_EVT, &param);
}
if (rc_features & BTA_AV_FEAT_RCCT) {
if (btc_avrc_tg_init_p()) {
esp_avrc_tg_cb_param_t param;
memset(&param, 0, sizeof(esp_avrc_ct_cb_param_t));
param.conn_stat.connected = false;
@ -1006,14 +1005,10 @@ void btc_rc_handler(tBTA_AV_EVT event, tBTA_AV *p_data)
memcpy(param.conn_stat.remote_bda, btc_rc_cb.rc_addr, sizeof(esp_bd_addr_t));
btc_avrc_ct_cb_to_app(ESP_AVRC_CT_CONNECTION_STATE_EVT, &param);
}
if ((p_data->rc_feat.peer_features & BTA_AV_FEAT_RCCT) &&
!(old_feats & BTA_AV_FEAT_RCCT)) {
esp_avrc_tg_cb_param_t param;
memset(&param, 0, sizeof(esp_avrc_ct_cb_param_t));
param.conn_stat.connected = true;
memcpy(param.conn_stat.remote_bda, btc_rc_cb.rc_addr, sizeof(esp_bd_addr_t));
btc_avrc_tg_cb_to_app(ESP_AVRC_TG_CONNECTION_STATE_EVT, &param);
}
/**
* @note ESP_AVRC_TG_CONNECTION_STATE_EVT has been reported on rc connect/disconnect event,
* it doesn't rely on the SDP results.
*/
} while (0);
btc_rc_cb.rc_features = p_data->rc_feat.peer_features;
btc_rc_cb.rc_ct_features = p_data->rc_feat.peer_ct_features;

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
@ -212,9 +212,12 @@ static void btc_gattc_app_unregister(btc_ble_gattc_args_t *arg)
static void btc_gattc_open(btc_ble_gattc_args_t *arg)
{
tBTA_GATT_TRANSPORT transport = BTA_GATT_TRANSPORT_LE;
BTA_GATTC_Open(arg->open.gattc_if, arg->open.remote_bda,
BTA_GATTC_Enh_Open(arg->open.gattc_if, arg->open.remote_bda,
arg->open.remote_addr_type, arg->open.is_direct,
transport, arg->open.is_aux);
transport, arg->open.is_aux, arg->open.own_addr_type,
arg->open.phy_mask, (void *)&arg->open.phy_1m_conn_params,
(void *)&arg->open.phy_2m_conn_params, (void *)&arg->open.phy_coded_conn_params);
}
static void btc_gattc_close(btc_ble_gattc_args_t *arg)

View File

@ -316,6 +316,19 @@ bt_status_t btc_hf_init(void)
{
int idx = 0;
#if HFP_DYNAMIC_MEMORY == TRUE
if (hf_local_param)
#endif
{
if (hf_local_param[idx].btc_hf_cb.initialized) {
esp_hf_cb_param_t param = {
.prof_stat.state = ESP_HF_INIT_ALREADY,
};
btc_hf_cb_to_app(ESP_HF_PROF_STATE_EVT, &param);
return BT_STATUS_SUCCESS;
}
}
BTC_TRACE_DEBUG("%s - max_hf_clients=%d", __func__, btc_max_hf_clients);
#if HFP_DYNAMIC_MEMORY == TRUE
@ -338,8 +351,6 @@ bt_status_t btc_hf_init(void)
#endif
clear_phone_state();
memset(&hf_local_param[idx].btc_hf_cb, 0, sizeof(btc_hf_cb_t));
// custom initialization here
hf_local_param[idx].btc_hf_cb.initialized = true;
// set audio path
#if (BT_CONTROLLER_INCLUDED == TRUE)
#if BTM_SCO_HCI_INCLUDED
@ -349,14 +360,30 @@ bt_status_t btc_hf_init(void)
#endif
esp_bredr_sco_datapath_set(data_path);
#endif
return BT_STATUS_SUCCESS;
}
void btc_hf_deinit(void)
{
BTC_TRACE_EVENT("%s", __FUNCTION__);
int idx = 0;
#if HFP_DYNAMIC_MEMORY == TRUE
if (hf_local_param)
#endif
{
if (!hf_local_param[idx].btc_hf_cb.initialized) {
esp_hf_cb_param_t param = {
.prof_stat.state = ESP_HF_DEINIT_ALREADY,
};
btc_hf_cb_to_app(ESP_HF_PROF_STATE_EVT, &param);
return;
}
}
btc_dm_disable_service(BTA_HFP_SERVICE_ID);
hf_local_param[0].btc_hf_cb.initialized = false;
}
static void btc_hf_cb_release(void)
@ -1268,7 +1295,18 @@ void btc_hf_cb_handler(btc_msg_t *msg)
break;
case BTA_AG_DISABLE_EVT:
{
btc_hf_cb_release();
idx = 0;
#if HFP_DYNAMIC_MEMORY == TRUE
if (hf_local_param)
#endif
{
if (hf_local_param[idx].btc_hf_cb.initialized) {
hf_local_param[idx].btc_hf_cb.initialized = false;
btc_hf_cb_release();
param.prof_stat.state = ESP_HF_DEINIT_SUCCESS;
btc_hf_cb_to_app(ESP_HF_PROF_STATE_EVT, &param);
}
}
break;
}
case BTA_AG_REGISTER_EVT:
@ -1278,6 +1316,11 @@ void btc_hf_cb_handler(btc_msg_t *msg)
hf_local_param[idx].btc_hf_cb.handle = p_data->reg.hdr.handle;
BTC_TRACE_DEBUG("%s: BTA_AG_REGISTER_EVT," "hf_local_param[%d].btc_hf_cb.handle = %d",
__FUNCTION__, idx, hf_local_param[idx].btc_hf_cb.handle);
if (!hf_local_param[idx].btc_hf_cb.initialized) {
param.prof_stat.state = ESP_HF_INIT_SUCCESS;
btc_hf_cb_to_app(ESP_HF_PROF_STATE_EVT, &param);
}
hf_local_param[idx].btc_hf_cb.initialized = true;
break;
}

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -169,12 +169,18 @@ bt_status_t btc_hf_client_init(void)
{
BTC_TRACE_EVENT("%s", __FUNCTION__);
if (hf_client_local_param.btc_hf_client_cb.initialized) {
esp_hf_client_cb_param_t param = {
.prof_stat.state = ESP_HF_INIT_ALREADY,
};
btc_hf_client_cb_to_app(ESP_HF_CLIENT_PROF_STATE_EVT, &param);
return BT_STATUS_SUCCESS;
}
btc_dm_enable_service(BTA_HFP_HS_SERVICE_ID);
clear_state();
hf_client_local_param.btc_hf_client_cb.initialized = true;
#if (BT_CONTROLLER_INCLUDED == TRUE)
#if BTM_SCO_HCI_INCLUDED
uint8_t data_path = ESP_SCO_DATA_PATH_HCI;
@ -232,9 +238,15 @@ void btc_hf_client_deinit( void )
{
BTC_TRACE_EVENT("%s", __FUNCTION__);
btc_dm_disable_service(BTA_HFP_HS_SERVICE_ID);
if (!hf_client_local_param.btc_hf_client_cb.initialized) {
esp_hf_client_cb_param_t param = {
.prof_stat.state = ESP_HF_DEINIT_ALREADY,
};
btc_hf_client_cb_to_app(ESP_HF_CLIENT_PROF_STATE_EVT, &param);
return;
}
hf_client_local_param.btc_hf_client_cb.initialized = false;
btc_dm_disable_service(BTA_HFP_HS_SERVICE_ID);
}
/*******************************************************************************
@ -852,10 +864,21 @@ void btc_hf_client_cb_handler(btc_msg_t *msg)
switch (event)
{
case BTA_HF_CLIENT_ENABLE_EVT:
break;
case BTA_HF_CLIENT_DISABLE_EVT:
if (hf_client_local_param.btc_hf_client_cb.initialized) {
param.prof_stat.state = ESP_HF_DEINIT_SUCCESS,
btc_hf_client_cb_to_app(ESP_HF_CLIENT_PROF_STATE_EVT, &param);
}
hf_client_local_param.btc_hf_client_cb.initialized = false;
break;
case BTA_HF_CLIENT_REGISTER_EVT:
hf_client_local_param.btc_hf_client_cb.handle = p_data->reg.handle;
if (!hf_client_local_param.btc_hf_client_cb.initialized) {
param.prof_stat.state = ESP_HF_INIT_SUCCESS,
btc_hf_client_cb_to_app(ESP_HF_CLIENT_PROF_STATE_EVT, &param);
}
hf_client_local_param.btc_hf_client_cb.initialized = true;
break;
case BTA_HF_CLIENT_OPEN_EVT:
if (p_data->open.status == BTA_HF_CLIENT_SUCCESS)

View File

@ -11,11 +11,13 @@
#include "esp_gap_ble_api.h"
#if BTC_DYNAMIC_MEMORY == TRUE
#if (BLE_42_FEATURE_SUPPORT == TRUE)
#include "bta/bta_api.h"
extern tBTA_BLE_ADV_DATA *gl_bta_adv_data_ptr;
extern tBTA_BLE_ADV_DATA *gl_bta_scan_rsp_data_ptr;
#define gl_bta_adv_data (*gl_bta_adv_data_ptr)
#define gl_bta_scan_rsp_data (*gl_bta_scan_rsp_data_ptr)
#endif // BLE_42_FEATURE_SUPPORT
#endif
#define BLE_ISVALID_PARAM(x, min, max) (((x) >= (min) && (x) <= (max)))

View File

@ -57,6 +57,11 @@ typedef union {
esp_ble_addr_type_t remote_addr_type;
bool is_direct;
bool is_aux;
esp_ble_addr_type_t own_addr_type;
esp_ble_phy_mask_t phy_mask;
esp_ble_conn_params_t phy_1m_conn_params;
esp_ble_conn_params_t phy_2m_conn_params;
esp_ble_conn_params_t phy_coded_conn_params;
} open;
//BTC_GATTC_ACT_CLOSE,
struct close_arg {

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -281,7 +281,7 @@ static void close_timeout_handler(void *arg)
status = btc_transfer_context(&msg, slot->alarm_arg, sizeof(tBTA_JV), NULL, NULL);
if (slot->alarm_arg) {
free(slot->alarm_arg);
osi_free(slot->alarm_arg);
slot->alarm_arg = NULL;
}
@ -832,7 +832,7 @@ void btc_l2cap_cb_handler(btc_msg_t *msg)
// if rx still has data, delay free slot
if (slot->close_alarm == NULL && slot->rx.queue && fixed_queue_length(slot->rx.queue) > 0) {
tBTA_JV *p_arg = NULL;
if ((p_arg = malloc(sizeof(tBTA_JV))) == NULL) {
if ((p_arg = osi_malloc(sizeof(tBTA_JV))) == NULL) {
param.close.status = ESP_BT_L2CAP_NO_RESOURCE;
osi_mutex_unlock(&l2cap_local_param.l2cap_slot_mutex);
BTC_TRACE_ERROR("%s unable to malloc slot close_alarm arg!", __func__);
@ -842,7 +842,7 @@ void btc_l2cap_cb_handler(btc_msg_t *msg)
slot->alarm_arg = (void *)p_arg;
if ((slot->close_alarm =
osi_alarm_new("slot", close_timeout_handler, (void *)slot, VFS_CLOSE_TIMEOUT)) == NULL) {
free(p_arg);
osi_free(p_arg);
slot->alarm_arg = NULL;
param.close.status = ESP_BT_L2CAP_NO_RESOURCE;
osi_mutex_unlock(&l2cap_local_param.l2cap_slot_mutex);
@ -850,7 +850,7 @@ void btc_l2cap_cb_handler(btc_msg_t *msg)
break;
}
if (osi_alarm_set(slot->close_alarm, VFS_CLOSE_TIMEOUT) != OSI_ALARM_ERR_PASS) {
free(p_arg);
osi_free(p_arg);
slot->alarm_arg = NULL;
osi_alarm_free(slot->close_alarm);
param.close.status = ESP_BT_L2CAP_BUSY;

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -1199,7 +1199,7 @@ void btc_spp_cb_handler(btc_msg_t *msg)
slot->alarm_arg = (void *)p_arg;
if ((slot->close_alarm =
osi_alarm_new("slot", close_timeout_handler, (void *)slot, VFS_CLOSE_TIMEOUT)) == NULL) {
free(p_arg);
osi_free(p_arg);
slot->alarm_arg = NULL;
param.close.status = ESP_SPP_NO_RESOURCE;
osi_mutex_unlock(&spp_local_param.spp_slot_mutex);
@ -1207,7 +1207,7 @@ void btc_spp_cb_handler(btc_msg_t *msg)
break;
}
if (osi_alarm_set(slot->close_alarm, VFS_CLOSE_TIMEOUT) != OSI_ALARM_ERR_PASS) {
free(p_arg);
osi_free(p_arg);
slot->alarm_arg = NULL;
osi_alarm_free(slot->close_alarm);
param.close.status = ESP_SPP_BUSY;
@ -1488,7 +1488,7 @@ static ssize_t spp_vfs_write(int fd, const void * data, size_t size)
BTC_TRACE_DEBUG("%s items_waiting:%d, fd:%d\n", __func__, items_waiting, fd);
osi_mutex_unlock(&spp_local_param.spp_slot_mutex);
// block untill under water level, be closed or time out
// block until under water level, be closed or time out
tx_event_group_val =
xEventGroupWaitBits(spp_local_param.tx_event_group, SLOT_WRITE_BIT(serial) | SLOT_CLOSE_BIT(serial), pdTRUE,
pdFALSE, VFS_WRITE_TIMEOUT / portTICK_PERIOD_MS);

View File

@ -215,11 +215,16 @@
#define BLE_50_FEATURE_SUPPORT FALSE
#endif
#if (UC_BT_BLE_ENABLED ==TRUE)
#if (UC_BT_BLE_42_FEATURES_SUPPORTED == TRUE || BLE_50_FEATURE_SUPPORT == FALSE)
#define BLE_42_FEATURE_SUPPORT TRUE
#else
#define BLE_42_FEATURE_SUPPORT FALSE
#endif
#else
#define BLE_42_FEATURE_SUPPORT FALSE
#define BLE_50_FEATURE_SUPPORT FALSE
#endif /* UC_BT_BLE_ENABLED */
#if (UC_BT_BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE)
#define BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER TRUE

View File

@ -593,7 +593,11 @@ static int host_recv_pkt_cb(uint8_t *data, uint16_t len)
}
#endif
pkt_size = BT_PKT_LINKED_HDR_SIZE + BT_HDR_SIZE + len;
#if HEAP_MEMORY_DEBUG
linked_pkt = (pkt_linked_item_t *) osi_calloc(pkt_size);
#else
linked_pkt = (pkt_linked_item_t *) osi_calloc_base(pkt_size);
#endif
if (!linked_pkt) {
#if (BLE_ADV_REPORT_FLOW_CONTROL == TRUE)
hci_adv_credits_consumed(1);

View File

@ -219,7 +219,6 @@ static void parse_ble_read_adv_max_len_response(
// Size: 2 Octets ; Value: 0x001F 0x0672 ; Maximum supported advertising data length
STREAM_TO_UINT16(*adv_max_len_ptr, stream);
}
osi_free(response);
}
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)

View File

@ -71,7 +71,7 @@ static tAVRC_STS avrc_pars_vendor_cmd(tAVRC_MSG_VENDOR *p_msg, tAVRC_COMMAND *p_
p++; /* skip the reserved byte */
BE_STREAM_TO_UINT16 (len, p);
if ((len + 4) != (p_msg->vendor_len)) {
status = AVRC_STS_INTERNAL_ERR;
status = AVRC_STS_NOT_FOUND;
}
if (status != AVRC_STS_NO_ERROR) {

View File

@ -110,6 +110,9 @@ void btm_free(void)
fixed_queue_free(btm_cb.sec_pending_q, osi_free_func);
btm_acl_free();
btm_sec_dev_free();
#if BTM_SCO_INCLUDED == TRUE
btm_sco_free();
#endif
#if BTM_DYNAMIC_MEMORY
FREE_AND_RESET(btm_cb_ptr);
#endif

View File

@ -123,6 +123,22 @@ void btm_sco_init (void)
btm_cb.sco_cb.desired_sco_mode = BTM_DEFAULT_SCO_MODE;
}
/*******************************************************************************
**
** Function btm_sco_free
**
** Description Free sco specific fixed_queue from btm control block
**
*******************************************************************************/
void btm_sco_free(void)
{
#if (BTM_SCO_HCI_INCLUDED == TRUE)
for (int i = 0; i < BTM_MAX_SCO_LINKS; i++) {
fixed_queue_free(btm_cb.sco_cb.sco_db[i].xmit_data_q, osi_free_func);
}
#endif
}
/*******************************************************************************
**
** Function btm_esco_conn_rsp
@ -233,7 +249,7 @@ void btm_sco_process_num_bufs (UINT16 num_lm_sco_bufs)
** pointer is used, PCM parameter maintained in
** the control block will be used; otherwise update
** control block value.
** err_data_rpt: Lisbon feature to enable the erronous data report
** err_data_rpt: Lisbon feature to enable the erroneous data report
** or not.
**
** Returns BTM_SUCCESS if the successful.
@ -947,7 +963,7 @@ void btm_sco_conn_req (BD_ADDR bda, DEV_CLASS dev_class, UINT8 link_type)
for (xx = 0; xx < BTM_MAX_SCO_LINKS; xx++, p++) {
/*
* If the sco state is in the SCO_ST_CONNECTING state, we still need
* to return accept sco to avoid race conditon for sco creation
* to return accept sco to avoid race condition for sco creation
*/
int rem_bd_matches = p->rem_bd_known &&
!memcmp (p->esco.data.bd_addr, bda, BD_ADDR_LEN);

View File

@ -212,11 +212,14 @@ typedef struct {
#define BTM_BLE_MAX_BG_CONN_DEV_NUM 10
typedef struct {
UINT16 scan_interval;
UINT16 scan_window;
UINT16 min_conn_int;
UINT16 max_conn_int;
UINT16 slave_latency;
UINT16 supervision_tout;
UINT16 min_ce_len;
UINT16 max_ce_len;
} tBTM_LE_CONN_PRAMS;

View File

@ -1119,6 +1119,7 @@ void btm_ble_periodic_adv_sync_trans_complete(UINT16 op_code, UINT8 hci_status,
********************************************
*/
void btm_sco_init (void);
void btm_sco_free(void);
void btm_sco_connected (UINT8 hci_status, BD_ADDR bda, UINT16 hci_handle,
tBTM_ESCO_DATA *p_esco_data);
void btm_esco_proc_conn_chg (UINT8 status, UINT16 handle, UINT8 tx_interval,

View File

@ -349,8 +349,8 @@ BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win,
UINT16_TO_STREAM (pp, conn_latency);
UINT16_TO_STREAM (pp, conn_timeout);
UINT16_TO_STREAM (pp, min_ce_len);
UINT16_TO_STREAM (pp, max_ce_len);
UINT16_TO_STREAM (pp, min_ce_len ? min_ce_len : BLE_CE_LEN_MIN);
UINT16_TO_STREAM (pp, max_ce_len ? max_ce_len : BLE_CE_LEN_MIN);
btu_hcif_send_cmd (LOCAL_BR_EDR_CONTROLLER_ID, p);
return (TRUE);
@ -1594,8 +1594,8 @@ BOOLEAN btsnd_hcic_ble_create_ext_conn(tHCI_CreatExtConn *p_conn)
UINT16_TO_STREAM(pp, params->conn_interval_max);
UINT16_TO_STREAM(pp, params->conn_latency);
UINT16_TO_STREAM(pp, params->sup_timeout);
UINT16_TO_STREAM(pp, BLE_CE_LEN_MIN);
UINT16_TO_STREAM(pp, BLE_CE_LEN_MIN);
UINT16_TO_STREAM(pp, params->min_ce_len ? params->min_ce_len : BLE_CE_LEN_MIN);
UINT16_TO_STREAM(pp, params->max_ce_len ? params->max_ce_len : BLE_CE_LEN_MIN);
}
if (p_conn->init_phy_mask & 0x02) {
@ -1606,8 +1606,8 @@ BOOLEAN btsnd_hcic_ble_create_ext_conn(tHCI_CreatExtConn *p_conn)
UINT16_TO_STREAM(pp, params->conn_interval_max);
UINT16_TO_STREAM(pp, params->conn_latency);
UINT16_TO_STREAM(pp, params->sup_timeout);
UINT16_TO_STREAM(pp, BLE_CE_LEN_MIN);
UINT16_TO_STREAM(pp, BLE_CE_LEN_MIN);
UINT16_TO_STREAM(pp, params->min_ce_len ? params->min_ce_len : BLE_CE_LEN_MIN);
UINT16_TO_STREAM(pp, params->max_ce_len ? params->max_ce_len : BLE_CE_LEN_MIN);
}
if (p_conn->init_phy_mask & 0x04) {
@ -1618,8 +1618,8 @@ BOOLEAN btsnd_hcic_ble_create_ext_conn(tHCI_CreatExtConn *p_conn)
UINT16_TO_STREAM(pp, params->conn_interval_max);
UINT16_TO_STREAM(pp, params->conn_latency);
UINT16_TO_STREAM(pp, params->sup_timeout);
UINT16_TO_STREAM(pp, BLE_CE_LEN_MIN);
UINT16_TO_STREAM(pp, BLE_CE_LEN_MIN);
UINT16_TO_STREAM(pp, params->min_ce_len ? params->min_ce_len : BLE_CE_LEN_MIN);
UINT16_TO_STREAM(pp, params->max_ce_len ? params->max_ce_len : BLE_CE_LEN_MIN);
}
btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);

View File

@ -902,6 +902,12 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb)
scan_int = (p_cb->scan_int == BTM_BLE_SCAN_PARAM_UNDEF) ? BTM_BLE_SCAN_FAST_INT : p_cb->scan_int;
scan_win = (p_cb->scan_win == BTM_BLE_SCAN_PARAM_UNDEF) ? BTM_BLE_SCAN_FAST_WIN : p_cb->scan_win;
if (p_dev_rec->conn_params.scan_interval && p_dev_rec->conn_params.scan_interval != BTM_BLE_CONN_PARAM_UNDEF) {
scan_int = p_dev_rec->conn_params.scan_interval;
}
if (p_dev_rec->conn_params.scan_window && p_dev_rec->conn_params.scan_window != BTM_BLE_CONN_PARAM_UNDEF) {
scan_win = p_dev_rec->conn_params.scan_window;
}
peer_addr_type = p_lcb->ble_addr_type;
memcpy(peer_addr, p_lcb->remote_bd_addr, BD_ADDR_LEN);
@ -966,22 +972,24 @@ BOOLEAN l2cble_init_direct_conn (tL2C_LCB *p_lcb)
}
if (!p_lcb->is_aux) {
if (!btsnd_hcic_ble_create_ll_conn (scan_int,/* UINT16 scan_int */
scan_win, /* UINT16 scan_win */
FALSE, /* UINT8 white_list */
peer_addr_type, /* UINT8 addr_type_peer */
peer_addr, /* BD_ADDR bda_peer */
own_addr_type, /* UINT8 addr_type_own */
if (!btsnd_hcic_ble_create_ll_conn (scan_int, /* UINT16 scan_int */
scan_win, /* UINT16 scan_win */
FALSE, /* UINT8 white_list */
peer_addr_type, /* UINT8 addr_type_peer */
peer_addr, /* BD_ADDR bda_peer */
own_addr_type, /* UINT8 addr_type_own */
(UINT16) ((p_dev_rec->conn_params.min_conn_int != BTM_BLE_CONN_PARAM_UNDEF) ?
p_dev_rec->conn_params.min_conn_int : BTM_BLE_CONN_INT_MIN_DEF), /* UINT16 conn_int_min */
p_dev_rec->conn_params.min_conn_int : BTM_BLE_CONN_INT_MIN_DEF), /* UINT16 conn_int_min */
(UINT16) ((p_dev_rec->conn_params.max_conn_int != BTM_BLE_CONN_PARAM_UNDEF) ?
p_dev_rec->conn_params.max_conn_int : BTM_BLE_CONN_INT_MAX_DEF), /* UINT16 conn_int_max */
p_dev_rec->conn_params.max_conn_int : BTM_BLE_CONN_INT_MAX_DEF), /* UINT16 conn_int_max */
(UINT16) ((p_dev_rec->conn_params.slave_latency != BTM_BLE_CONN_PARAM_UNDEF) ?
p_dev_rec->conn_params.slave_latency : BTM_BLE_CONN_SLAVE_LATENCY_DEF), /* UINT16 conn_latency */
p_dev_rec->conn_params.slave_latency : BTM_BLE_CONN_SLAVE_LATENCY_DEF), /* UINT16 conn_latency */
(UINT16) ((p_dev_rec->conn_params.supervision_tout != BTM_BLE_CONN_PARAM_UNDEF) ?
p_dev_rec->conn_params.supervision_tout : BTM_BLE_CONN_TIMEOUT_DEF), /* conn_timeout */
BLE_CE_LEN_MIN, /* UINT16 min_len */
BLE_CE_LEN_MIN)) { /* UINT16 max_len */
p_dev_rec->conn_params.supervision_tout : BTM_BLE_CONN_TIMEOUT_DEF), /* UINT16 conn_timeout */
(UINT16) ((p_dev_rec->conn_params.min_ce_len != BTM_BLE_CONN_PARAM_UNDEF) ?
p_dev_rec->conn_params.min_ce_len : BLE_CE_LEN_MIN), /* UINT16 min_ce_len */
(UINT16) ((p_dev_rec->conn_params.max_ce_len != BTM_BLE_CONN_PARAM_UNDEF) ?
p_dev_rec->conn_params.max_ce_len : BLE_CE_LEN_MIN) /* UINT16 max_ce_len */)) {
l2cu_release_lcb (p_lcb);
L2CAP_TRACE_ERROR("initiate direct connection fail, no resources");
return (FALSE);

View File

@ -453,7 +453,7 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
}
}
/* Now, ask for the next handle. Re-use the buffer we just got. */
/* Now, ask for the next handle. Reuse the buffer we just got. */
if (p_ccb->cur_handle < p_ccb->num_handles) {
BT_HDR *p_msg = (BT_HDR *) osi_malloc(SDP_DATA_BUF_SIZE);
UINT8 *p;
@ -669,6 +669,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
if ((type >> 3) != DATA_ELE_SEQ_DESC_TYPE) {
SDP_TRACE_WARNING ("SDP - Wrong type: 0x%02x in attr_rsp\n", type);
sdp_disconnect (p_ccb, SDP_ILLEGAL_PARAMETER);
return;
}
p = sdpu_get_len_from_type (p, type, &seq_len);

View File

@ -551,138 +551,156 @@ menuconfig BT_NIMBLE_50_FEATURE_SUPPORT
help
Enable BLE 5 feature
config BT_NIMBLE_LL_CFG_FEAT_LE_2M_PHY
bool "Enable 2M Phy"
depends on BT_NIMBLE_50_FEATURE_SUPPORT
default y
help
Enable 2M-PHY
config BT_NIMBLE_LL_CFG_FEAT_LE_CODED_PHY
bool "Enable coded Phy"
depends on BT_NIMBLE_50_FEATURE_SUPPORT
default y
help
Enable coded-PHY
config BT_NIMBLE_EXT_ADV
bool "Enable extended advertising"
depends on BT_NIMBLE_50_FEATURE_SUPPORT
default n
help
Enable this option to do extended advertising. Extended advertising
will be supported from BLE 5.0 onwards.
if BT_NIMBLE_EXT_ADV
config BT_NIMBLE_MAX_EXT_ADV_INSTANCES
int "Maximum number of extended advertising instances."
range 0 4
default 1 if BT_NIMBLE_EXT_ADV
default 0
depends on BT_NIMBLE_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.
For ESP32C2, ESP32C6 and ESP32H2, each extended advertising instance
will take about 0.5k DRAM.
config BT_NIMBLE_EXT_ADV_MAX_SIZE
int "Maximum length of the advertising data."
range 0 1650
default 1650 if BT_NIMBLE_EXT_ADV
default 0
depends on BT_NIMBLE_EXT_ADV
help
Defines the length of the extended adv data. The value should not
exceed 1650.
config BT_NIMBLE_ENABLE_PERIODIC_ADV
bool "Enable periodic advertisement."
default y
depends on BT_NIMBLE_EXT_ADV
help
Enable this option to start periodic advertisement.
config BT_NIMBLE_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable Transfer Sync Events"
depends on BT_NIMBLE_ENABLE_PERIODIC_ADV
if BT_NIMBLE_50_FEATURE_SUPPORT
config BT_NIMBLE_LL_CFG_FEAT_LE_2M_PHY
bool "Enable 2M Phy"
depends on BT_NIMBLE_50_FEATURE_SUPPORT
default y
help
This enables controller transfer periodic sync events to host
Enable 2M-PHY
config BT_NIMBLE_LL_CFG_FEAT_LE_CODED_PHY
bool "Enable coded Phy"
depends on BT_NIMBLE_50_FEATURE_SUPPORT
default y
help
Enable coded-PHY
config BT_NIMBLE_EXT_ADV
bool "Enable extended advertising"
depends on BT_NIMBLE_50_FEATURE_SUPPORT
default n
help
Enable this option to do extended advertising. Extended advertising
will be supported from BLE 5.0 onwards.
if BT_NIMBLE_EXT_ADV
config BT_NIMBLE_MAX_EXT_ADV_INSTANCES
int "Maximum number of extended advertising instances."
range 0 4
default 1 if BT_NIMBLE_EXT_ADV
default 0
depends on BT_NIMBLE_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.
For ESP32C2, ESP32C6 and ESP32H2, each extended advertising instance
will take about 0.5k DRAM.
config BT_NIMBLE_EXT_ADV_MAX_SIZE
int "Maximum length of the advertising data."
range 0 1650
default 1650 if BT_NIMBLE_EXT_ADV
default 0
depends on BT_NIMBLE_EXT_ADV
help
Defines the length of the extended adv data. The value should not
exceed 1650.
config BT_NIMBLE_ENABLE_PERIODIC_ADV
bool "Enable periodic advertisement."
default y
depends on BT_NIMBLE_EXT_ADV
help
Enable this option to start periodic advertisement.
config BT_NIMBLE_PERIODIC_ADV_ENH
bool "Periodic adv enhancements(adi support)"
depends on BT_NIMBLE_ENABLE_PERIODIC_ADV && SOC_BLE_PERIODIC_ADV_ENH_SUPPORTED
help
Enable the periodic advertising enhancements
config BT_NIMBLE_PERIODIC_ADV_SYNC_TRANSFER
bool "Enable Transfer Sync Events"
depends on BT_NIMBLE_ENABLE_PERIODIC_ADV
default y
help
This enables controller transfer periodic sync events to host
endif
config BT_NIMBLE_EXT_SCAN
bool "Enable extended scanning"
depends on BT_NIMBLE_50_FEATURE_SUPPORT && BT_NIMBLE_ROLE_OBSERVER
default y
help
Enable this option to do extended scanning.
config BT_NIMBLE_ENABLE_PERIODIC_SYNC
bool "Enable periodic sync"
default y
depends on BT_NIMBLE_EXT_SCAN
help
Enable this option to receive periodic advertisement.
if BT_NIMBLE_ENABLE_PERIODIC_SYNC
config BT_NIMBLE_MAX_PERIODIC_SYNCS
int "Maximum number of periodic advertising syncs"
range 0 3 if IDF_TARGET_ESP32C2
range 0 8
default 1 if BT_NIMBLE_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_NIMBLE_MAX_PERIODIC_ADVERTISER_LIST
int "Maximum number of periodic advertiser list"
depends on SOC_ESP_NIMBLE_CONTROLLER
range 1 5
default 5 if BT_NIMBLE_50_FEATURE_SUPPORT
help
Set this option to set the upper limit for number of periodic advertiser list.
endif
config BT_NIMBLE_BLE_POWER_CONTROL
bool "Enable support for BLE Power Control"
depends on BT_NIMBLE_50_FEATURE_SUPPORT && SOC_BLE_POWER_CONTROL_SUPPORTED
default n
help
Set this option to enable the Power Control feature
config BT_NIMBLE_AOA_AOD
bool "Direction Finding"
depends on BT_NIMBLE_50_FEATURE_SUPPORT && (BT_CONTROLLER_DISABLED || SOC_BLE_CTE_SUPPORTED)
default n
help
Enable support for Connectionless and Connection Oriented Direction Finding
menuconfig BT_NIMBLE_GATT_CACHING
bool "Enable GATT caching"
depends on BT_NIMBLE_ENABLED && BT_NIMBLE_50_FEATURE_SUPPORT
select BT_NIMBLE_DYNAMIC_SERVICE
help
Enable GATT caching
config BT_NIMBLE_GATT_CACHING_MAX_CONNS
int "Maximum connections to be cached"
depends on BT_NIMBLE_GATT_CACHING
default 1
help
Set this option to set the upper limit on number of connections to be cached.
config BT_NIMBLE_GATT_CACHING_MAX_SVCS
int "Maximum number of services per connection"
depends on BT_NIMBLE_GATT_CACHING
default 64
help
Set this option to set the upper limit on number of services per connection to be cached.
config BT_NIMBLE_GATT_CACHING_MAX_CHRS
int "Maximum number of characteristics per connection"
depends on BT_NIMBLE_GATT_CACHING
default 64
help
Set this option to set the upper limit on number of characteristics per connection to be cached.
config BT_NIMBLE_GATT_CACHING_MAX_DSCS
int "Maximum number of descriptors per connection"
depends on BT_NIMBLE_GATT_CACHING
default 64
help
Set this option to set the upper limit on number of descriptors per connection to be cached.
endif
config BT_NIMBLE_MAX_PERIODIC_SYNCS
int "Maximum number of periodic advertising syncs"
depends on BT_NIMBLE_50_FEATURE_SUPPORT
range 0 3 if IDF_TARGET_ESP32C2
range 0 8
default 1 if BT_NIMBLE_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_NIMBLE_MAX_PERIODIC_ADVERTISER_LIST
int "Maximum number of periodic advertiser list"
depends on BT_NIMBLE_50_FEATURE_SUPPORT && SOC_ESP_NIMBLE_CONTROLLER
range 1 5
default 5 if BT_NIMBLE_50_FEATURE_SUPPORT
help
Set this option to set the upper limit for number of periodic advertiser list.
config BT_NIMBLE_BLE_POWER_CONTROL
bool "Enable support for BLE Power Control"
depends on BT_NIMBLE_50_FEATURE_SUPPORT && SOC_BLE_POWER_CONTROL_SUPPORTED
default n
help
Set this option to enable the Power Control feature
config BT_NIMBLE_PERIODIC_ADV_ENH
bool "Periodic adv enhancements(adi support)"
depends on BT_NIMBLE_ENABLE_PERIODIC_ADV && BT_NIMBLE_50_FEATURE_SUPPORT && SOC_BLE_PERIODIC_ADV_ENH_SUPPORTED
help
Enable the periodic advertising enhancements
config BT_NIMBLE_AOA_AOD
bool "Direction Finding"
depends on BT_NIMBLE_50_FEATURE_SUPPORT && (BT_CONTROLLER_DISABLED || SOC_BLE_CTE_SUPPORTED)
default n
help
Enable support for Connectionless and Connection Oriented Direction Finding
menuconfig BT_NIMBLE_GATT_CACHING
bool "Enable GATT caching"
depends on BT_NIMBLE_ENABLED && BT_NIMBLE_50_FEATURE_SUPPORT
select BT_NIMBLE_DYNAMIC_SERVICE
help
Enable GATT caching
config BT_NIMBLE_GATT_CACHING_MAX_CONNS
int "Maximum connections to be cached"
depends on BT_NIMBLE_GATT_CACHING
default 1
help
Set this option to set the upper limit on number of connections to be cached.
config BT_NIMBLE_GATT_CACHING_MAX_SVCS
int "Maximum number of services per connection"
depends on BT_NIMBLE_GATT_CACHING
default 64
help
Set this option to set the upper limit on number of services per connection to be cached.
config BT_NIMBLE_GATT_CACHING_MAX_CHRS
int "Maximum number of characteristics per connection"
depends on BT_NIMBLE_GATT_CACHING
default 64
help
Set this option to set the upper limit on number of characteristics per connection to be cached.
config BT_NIMBLE_GATT_CACHING_MAX_DSCS
int "Maximum number of descriptors per connection"
depends on BT_NIMBLE_GATT_CACHING
default 64
help
Set this option to set the upper limit on number of descriptors per connection to be cached.
config BT_NIMBLE_WHITELIST_SIZE
int "BLE white list size"

View File

@ -55,7 +55,7 @@ extern "C" {
*
* @note Please do not modify this value
*/
#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20240926
#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20241015
/**
* @brief Bluetooth Controller mode
@ -193,6 +193,12 @@ the advertising packet will be discarded until the memory is restored. */
#define BTDM_BLE_LLCP_DISC_FLAG (BTDM_BLE_LLCP_CONN_UPDATE | BTDM_BLE_LLCP_CHAN_MAP_UPDATE)
#ifdef CONFIG_BTDM_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
#define BTDM_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS_ENABLED CONFIG_BTDM_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS
#else
#define BTDM_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS_ENABLED 0
#endif
/**
* @brief Default Bluetooth Controller configuration
*/
@ -222,6 +228,7 @@ the advertising packet will be discarded until the memory is restored. */
.dup_list_refresh_period = SCAN_DUPL_CACHE_REFRESH_PERIOD, \
.ble_scan_backoff = BTDM_CTRL_SCAN_BACKOFF_UPPERLIMITMAX, \
.ble_llcp_disc_flag = BTDM_BLE_LLCP_DISC_FLAG, \
.ble_aa_check = BTDM_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS_ENABLED, \
.magic = ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL, \
}
@ -275,6 +282,7 @@ typedef struct {
uint16_t dup_list_refresh_period; /*!< Scan duplicate filtering list refresh period in seconds. Configurable in menuconfig */
bool ble_scan_backoff; /*!< True if BLE scan backoff is enabled; false otherwise. Configurable in menuconfig */
uint8_t ble_llcp_disc_flag; /*!< BLE disconnect flag when instant passed. Configurable in menuconfig */
bool ble_aa_check; /*!< True if adds a verification step for the Access Address within the CONNECT_IND PDU; false otherwise. Configurable in menuconfig */
uint32_t magic; /*!< Magic number */
} esp_bt_controller_config_t;
@ -629,30 +637,16 @@ esp_err_t esp_bt_sleep_disable(void);
* @brief Manually clear the scan duplicate list
*
* @note
* 1. This function name is incorrectly spelled, it will be fixed in release 5.x version.
* 2. The scan duplicate list will be automatically cleared when the maximum amount of devices in the filter is reached.
* The amount of devices in the filter can be configured in menuconfig.
* The scan duplicate list will be automatically cleared when the maximum amount of devices in the filter is reached. The amount of devices in the filter can be configured in menuconfig.
*
* @return
* - ESP_OK: Success
* - ESP_ERR_INVALID_STATE: Invalid Bluetooth Controller state
*/
esp_err_t esp_ble_scan_duplicate_list_flush(void);
esp_err_t esp_ble_scan_dupilcate_list_flush(void);
/**
* @brief Power on Bluetooth Wi-Fi power domain
*
* @note This function is not recommended to use due to potential risk.
*/
void esp_wifi_bt_power_domain_on(void);
/**
* @brief Power off Bluetooth Wi-Fi power domain
*
* @note This function is not recommended to use due to potential risk.
*/
void esp_wifi_bt_power_domain_off(void);
#ifdef __cplusplus
}
#endif

View File

@ -19,7 +19,7 @@ extern "C" {
#endif
#define ESP_BT_CTRL_CONFIG_MAGIC_VAL 0x5A5AA5A5
#define ESP_BT_CTRL_CONFIG_VERSION 0x02409260
#define ESP_BT_CTRL_CONFIG_VERSION 0x02410230
#define ESP_BT_HCI_TL_MAGIC_VALUE 0xfadebead
#define ESP_BT_HCI_TL_VERSION 0x00010000
@ -236,6 +236,60 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status);
#endif
#define BT_CTRL_BLE_LLCP_DISC_FLAG (BT_CTRL_BLE_LLCP_CONN_UPDATE | BT_CTRL_BLE_LLCP_CHAN_MAP_UPDATE | BT_CTRL_BLE_LLCP_PHY_UPDATE)
#if defined(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
#define BT_CTRL_RUN_IN_FLASH_ONLY CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY
#else
#define BT_CTRL_RUN_IN_FLASH_ONLY (0)
#endif
#if (BT_CTRL_RUN_IN_FLASH_ONLY == 1)
#if defined(CONFIG_BT_CTRL_DTM_ENABLE)
#define BT_CTRL_DTM_ENABLE CONFIG_BT_CTRL_DTM_ENABLE
#else
#define BT_CTRL_DTM_ENABLE (0)
#endif
#if defined(CONFIG_BT_CTRL_BLE_MASTER)
#define BT_CTRL_BLE_MASTER CONFIG_BT_CTRL_BLE_MASTER
#else
#define BT_CTRL_BLE_MASTER (0)
#endif
#if defined(CONFIG_BT_CTRL_BLE_TEST)
#define BT_CTRL_BLE_TEST CONFIG_BT_CTRL_BLE_TEST
#else
#define BT_CTRL_BLE_TEST (0)
#endif
#if defined (CONFIG_BT_NIMBLE_SECURITY_ENABLE) || defined (CONFIG_BT_BLE_SMP_ENABLE)
#ifdef CONFIG_BT_NIMBLE_SECURITY_ENABLE
#define BLE_SECURITY_ENABLE (CONFIG_BT_NIMBLE_SECURITY_ENABLE)
#endif //CONFIG_BT_NIMBLE_SECURITY_ENABLE
#ifdef CONFIG_BT_BLE_SMP_ENABLE
#define BLE_SECURITY_ENABLE (CONFIG_BT_BLE_SMP_ENABLE)
#endif //CONFIG_BT_BLE_SMP_ENABLE
#else
#if defined (CONFIG_BT_CTRL_BLE_SECURITY_ENABLE)
#define BLE_SECURITY_ENABLE (CONFIG_BT_CTRL_BLE_SECURITY_ENABLE)
#else
#define BLE_SECURITY_ENABLE (0)
#endif
#endif // (CONFIG_BT_NIMBLE_SECURITY_ENABLE) || (CONFIG_BT_BLE_SMP_ENABLE)
#if defined (CONFIG_BT_CTRL_BLE_SCAN)
#define BT_CTRL_BLE_SCAN CONFIG_BT_CTRL_BLE_SCAN
#else
#define BT_CTRL_BLE_SCAN (0)
#endif
#else
#define BT_CTRL_BLE_MASTER (1)
#define BT_CTRL_DTM_ENABLE (1)
#define BT_CTRL_BLE_TEST (1)
#define BLE_SECURITY_ENABLE (1)
#define BT_CTRL_BLE_SCAN (1)
#endif // (BT_CTRL_RUN_IN_FLASH_ONLY == 1)
#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() { \
.magic = ESP_BT_CTRL_CONFIG_MAGIC_VAL, \
@ -276,6 +330,12 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status);
.ble_chan_ass_en = BT_CTRL_CHAN_ASS_EN, \
.ble_ping_en = BT_CTRL_LE_PING_EN, \
.ble_llcp_disc_flag = BT_CTRL_BLE_LLCP_DISC_FLAG, \
.run_in_flash = BT_CTRL_RUN_IN_FLASH_ONLY, \
.dtm_en = BT_CTRL_DTM_ENABLE, \
.enc_en = BLE_SECURITY_ENABLE, \
.qa_test = BT_CTRL_BLE_TEST, \
.master_en = BT_CTRL_BLE_MASTER, \
.scan_en = BT_CTRL_BLE_SCAN, \
}
#else
@ -351,6 +411,12 @@ typedef struct {
uint8_t ble_chan_ass_en; /*!< BLE channel assessment enable */
uint8_t ble_ping_en; /*!< BLE ping procedure enable */
uint8_t ble_llcp_disc_flag; /*!< BLE disconnect flag when instant passed */
bool run_in_flash; /*!< Check if controller code is in flash */
bool dtm_en; /*!< Controller DTM feature is enabled or not */
bool enc_en; /*!< Controller encryption feature is enabled or not */
bool qa_test; /*!< Controller QA test feature is enabled or not */
bool master_en; /*!< Controller master feature is enabled or not */
bool scan_en; /*!< Controller scan feature is enabled or not */
} esp_bt_controller_config_t;
/**
@ -504,8 +570,6 @@ esp_err_t esp_bt_controller_disable(void);
*/
esp_bt_controller_status_t esp_bt_controller_get_status(void);
uint16_t esp_bt_get_tx_buf_num(void);
/** @brief esp_vhci_host_callback
* used for vhci call host function to notify what host need to do
*/
@ -660,16 +724,6 @@ void esp_bt_controller_wakeup_request(void);
*/
int esp_bt_h4tl_eif_io_event_notify(int event);
/**
* @brief bt Wi-Fi power domain power on
*/
void esp_wifi_bt_power_domain_on(void);
/**
* @brief bt Wi-Fi power domain power off
*/
void esp_wifi_bt_power_domain_off(void);
/**
* @brief Get the Bluetooth module sleep clock source.
*

View File

@ -156,7 +156,7 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type
*/
esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
#define CONFIG_VERSION 0x20240422
#define CONFIG_VERSION 0x20241121
#define CONFIG_MAGIC 0x5A5AA5A5
/**
@ -213,6 +213,8 @@ typedef struct {
uint8_t ignore_wl_for_direct_adv; /*!< Ignore the whitelist for direct advertising */
uint8_t enable_pcl; /*!< Enable power control */
uint8_t csa2_select; /*!< Select CSA#2*/
uint8_t enable_csr; /*!< Enable CSR */
uint8_t ble_aa_check; /*!< True if adds a verification step for the Access Address within the CONNECT_IND PDU; false otherwise. Configurable in menuconfig */
uint32_t config_magic; /*!< Magic number for configuration validation */
} esp_bt_controller_config_t;
@ -262,6 +264,8 @@ typedef struct {
.ignore_wl_for_direct_adv = 0, \
.enable_pcl = DEFAULT_BT_LE_POWER_CONTROL_ENABLED, \
.csa2_select = DEFAULT_BT_LE_50_FEATURE_SUPPORT, \
.enable_csr = 0, \
.ble_aa_check = DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS, \
.config_magic = CONFIG_MAGIC, \
}
#elif CONFIG_IDF_TARGET_ESP32C61
@ -309,6 +313,8 @@ typedef struct {
.ignore_wl_for_direct_adv = 0, \
.enable_pcl = DEFAULT_BT_LE_POWER_CONTROL_ENABLED, \
.csa2_select = DEFAULT_BT_LE_50_FEATURE_SUPPORT, \
.enable_csr = 0, \
.ble_aa_check = DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS, \
.config_magic = CONFIG_MAGIC, \
}
#endif

View File

@ -161,7 +161,7 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type
*/
esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
#define CONFIG_VERSION 0x20240422
#define CONFIG_VERSION 0x20241121
#define CONFIG_MAGIC 0x5A5AA5A5
/**
@ -214,7 +214,9 @@ typedef struct {
uint8_t cpu_freq_mhz; /*!< CPU frequency in megahertz */
uint8_t ignore_wl_for_direct_adv; /*!< Ignore the white list for directed advertising */
uint8_t enable_pcl; /*!< Enable power control */
uint8_t csa2_select; /*!< Select CSA#2*/
uint8_t csa2_select; /*!< Select CSA#2*/
uint8_t enable_csr; /*!< Enable CSR */
uint8_t ble_aa_check; /*!< True if adds a verification step for the Access Address within the CONNECT_IND PDU; false otherwise. Configurable in menuconfig */
uint32_t config_magic; /*!< Configuration magic value */
} esp_bt_controller_config_t;
@ -262,7 +264,9 @@ typedef struct {
.cpu_freq_mhz = CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ, \
.ignore_wl_for_direct_adv = 0, \
.enable_pcl = 0, \
.csa2_select = DEFAULT_BT_LE_50_FEATURE_SUPPORT, \
.csa2_select = DEFAULT_BT_LE_50_FEATURE_SUPPORT, \
.enable_csr = 0, \
.ble_aa_check = DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS, \
.config_magic = CONFIG_MAGIC, \
}

View File

@ -2,6 +2,14 @@
entries:
.iram1+
[sections:bt_isr_iram_text]
entries:
.isr_iram1+
[sections:bt_conn_iram_text]
entries:
.conn_iram1+
[sections:bt_bss]
entries:
.bss+
@ -19,10 +27,26 @@ entries:
[scheme:bt_default]
entries:
bt_iram_text -> iram0_bt_text
bt_bss -> dram0_bt_bss
bt_common -> dram0_bt_bss
bt_data -> dram0_bt_data
if BT_CTRL_RUN_IN_FLASH_ONLY = y:
bt_iram_text -> flash_text
bt_bss -> dram0_bt_bss
bt_common -> dram0_bt_bss
bt_data -> dram0_bt_data
if BT_LE_PLACE_CONN_RELATED_INTO_IRAM = y:
bt_conn_iram_text -> iram0_bt_text
bt_isr_iram_text -> iram0_bt_text
else:
bt_conn_iram_text -> flash_text
bt_isr_iram_text -> flash_text
else:
bt_iram_text -> iram0_bt_text
bt_bss -> dram0_bt_bss
bt_common -> dram0_bt_bss
bt_data -> dram0_bt_data
bt_conn_iram_text -> iram0_bt_text
bt_isr_iram_text -> iram0_bt_text
# For the following fragments, order matters for
# 'ALIGN(4) ALIGN(4, post) SURROUND(sym)', which generates:
@ -48,3 +72,11 @@ entries:
bt_bss -> dram0_bt_bss ALIGN(4) ALIGN(4, post) SURROUND(bt_controller_bss),
bt_common -> dram0_bt_bss ALIGN(4) ALIGN(4, post) SURROUND(bt_controller_common),
bt_data -> dram0_bt_data ALIGN(4) ALIGN(4, post) SURROUND(bt_controller_data)
[mapping:ble_app_flash]
archive: libble_app_flash.a
entries:
* (bt_default);
bt_bss -> dram0_bt_bss ALIGN(4) ALIGN(4, post) SURROUND(bt_controller_bss),
bt_common -> dram0_bt_bss ALIGN(4) ALIGN(4, post) SURROUND(bt_controller_common),
bt_data -> dram0_bt_data ALIGN(4) ALIGN(4, post) SURROUND(bt_controller_data)

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -7,18 +7,31 @@
#include "esp_attr.h"
#include "esp_heap_caps.h"
#include "sdkconfig.h"
#include "esp_log.h"
#include <assert.h>
static uint8_t log_count;
IRAM_ATTR void *bt_osi_mem_malloc(size_t size)
{
void *mem = NULL;
#ifdef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL
return heap_caps_malloc(size, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
mem = heap_caps_malloc(size, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
#elif CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL
return heap_caps_malloc(size, MALLOC_CAP_SPIRAM|MALLOC_CAP_8BIT);
mem = heap_caps_malloc(size, MALLOC_CAP_SPIRAM|MALLOC_CAP_8BIT);
#elif CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_IRAM_8BIT
return heap_caps_malloc_prefer(size, 2, MALLOC_CAP_INTERNAL|MALLOC_CAP_IRAM_8BIT, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
mem = heap_caps_malloc_prefer(size, 2, MALLOC_CAP_INTERNAL|MALLOC_CAP_IRAM_8BIT, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT);
#else
return malloc(size);
mem = malloc(size);
#endif
if (!mem) {
log_count ++;
if ((log_count % 40) == 0) {
esp_rom_printf("malloc failed (size %zu)",size);
log_count = 0;
}
assert(mem != NULL);
}
return mem;
}
IRAM_ATTR void *bt_osi_mem_calloc(size_t n, size_t size)

View File

@ -810,7 +810,7 @@ esp_err_t i2c_param_config(i2c_port_t i2c_num, const i2c_config_t *i2c_conf)
#if SOC_I2C_SUPPORT_SLAVE
if (i2c_conf->mode == I2C_MODE_SLAVE) { //slave mode
i2c_hal_slave_init(&(i2c_context[i2c_num].hal));
i2c_ll_slave_tx_auto_start_en(i2c_context[i2c_num].hal.dev, true);
i2c_ll_slave_enable_auto_start(i2c_context[i2c_num].hal.dev, true);
I2C_CLOCK_SRC_ATOMIC() {
i2c_ll_set_source_clk(i2c_context[i2c_num].hal.dev, src_clk);
}
@ -1504,7 +1504,7 @@ static void IRAM_ATTR i2c_master_cmd_begin_static(i2c_port_t i2c_num, BaseType_t
}
}
i2c_ll_update(i2c_context[i2c_num].hal.dev);
i2c_ll_master_trans_start(i2c_context[i2c_num].hal.dev);
i2c_ll_start_trans(i2c_context[i2c_num].hal.dev);
return;
}

View File

@ -18,14 +18,14 @@
#include "esp_heap_caps.h"
#include "esp_clk_tree.h"
#include "clk_ctrl_os.h"
#include "driver/gpio.h"
#include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "esp_private/gpio.h"
#include "driver/twai.h"
#include "soc/soc_caps.h"
#include "soc/soc.h"
#include "soc/io_mux_reg.h"
#include "soc/twai_periph.h"
#include "soc/gpio_sig_map.h"
#include "hal/twai_hal.h"
#include "esp_rom_gpio.h"
#if SOC_TWAI_SUPPORT_SLEEP_RETENTION
@ -34,6 +34,7 @@
/* ---------------------------- Definitions --------------------------------- */
//Internal Macros
#define TWAI_TAG "TWAI"
#define TWAI_CHECK(cond, ret_val) ({ \
if (!(cond)) { \
return (ret_val); \
@ -46,7 +47,6 @@
#ifdef CONFIG_TWAI_ISR_IN_IRAM
#define TWAI_MALLOC_CAPS (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)
#else
#define TWAI_TAG "TWAI"
#define TWAI_MALLOC_CAPS MALLOC_CAP_DEFAULT
#endif //CONFIG_TWAI_ISR_IN_IRAM
@ -289,37 +289,26 @@ static void twai_configure_gpio(int controller_id, gpio_num_t tx, gpio_num_t rx,
{
// assert the GPIO number is not a negative number (shift operation on a negative number is undefined)
assert(tx >= 0 && rx >= 0);
// if TX and RX set to the same GPIO, which means we want to create a loop-back in the GPIO matrix
bool io_loop_back = (tx == rx);
gpio_config_t gpio_conf = {
.intr_type = GPIO_INTR_DISABLE,
.pull_down_en = false,
.pull_up_en = false,
};
//Set RX pin
gpio_conf.mode = GPIO_MODE_INPUT | (io_loop_back ? GPIO_MODE_OUTPUT : 0);
gpio_conf.pin_bit_mask = 1ULL << rx;
gpio_config(&gpio_conf);
gpio_func_sel(rx, PIN_FUNC_GPIO);
gpio_input_enable(rx);
esp_rom_gpio_connect_in_signal(rx, twai_controller_periph_signals.controllers[controller_id].rx_sig, false);
//Set TX pin
gpio_conf.mode = GPIO_MODE_OUTPUT | (io_loop_back ? GPIO_MODE_INPUT : 0);
gpio_conf.pin_bit_mask = 1ULL << tx;
gpio_config(&gpio_conf);
gpio_func_sel(tx, PIN_FUNC_GPIO);
esp_rom_gpio_connect_out_signal(tx, twai_controller_periph_signals.controllers[controller_id].tx_sig, false, false);
//Configure output clock pin (Optional)
if (clkout >= 0 && clkout < GPIO_NUM_MAX) {
gpio_set_pull_mode(clkout, GPIO_FLOATING);
gpio_func_sel(clkout, PIN_FUNC_GPIO);
esp_rom_gpio_connect_out_signal(clkout, twai_controller_periph_signals.controllers[controller_id].clk_out_sig, false, false);
esp_rom_gpio_pad_select_gpio(clkout);
}
//Configure bus status pin (Optional)
if (bus_status >= 0 && bus_status < GPIO_NUM_MAX) {
gpio_set_pull_mode(bus_status, GPIO_FLOATING);
gpio_func_sel(bus_status, PIN_FUNC_GPIO);
esp_rom_gpio_connect_out_signal(bus_status, twai_controller_periph_signals.controllers[controller_id].bus_off_sig, false, false);
esp_rom_gpio_pad_select_gpio(bus_status);
}
}
@ -347,11 +336,11 @@ static void twai_free_driver_obj(twai_obj_t *p_obj)
#if TWAI_USE_RETENTION_LINK
const periph_retention_module_t retention_id = twai_reg_retention_info[p_obj->controller_id].module_id;
if (sleep_retention_get_created_modules() & BIT(retention_id)) {
assert(sleep_retention_get_inited_modules() & BIT(retention_id));
if (sleep_retention_is_module_created(retention_id)) {
assert(sleep_retention_is_module_inited(retention_id));
sleep_retention_module_free(retention_id);
}
if (sleep_retention_get_inited_modules() & BIT(retention_id)) {
if (sleep_retention_is_module_inited(retention_id)) {
sleep_retention_module_deinit(retention_id);
}
@ -419,7 +408,7 @@ static esp_err_t twai_alloc_driver_obj(const twai_general_config_t *g_config, tw
.arg = p_obj,
},
},
.depends = BIT(SLEEP_RETENTION_MODULE_CLOCK_SYSTEM)
.depends = RETENTION_MODULE_BITMAP_INIT(CLOCK_SYSTEM)
};
if (sleep_retention_module_init(module, &init_param) != ESP_OK) {
ESP_LOGW(TWAI_TAG, "init sleep retention failed for TWAI%d, power domain may be turned off during sleep", controller_id);

View File

@ -9,7 +9,7 @@
#include <assert.h>
#include "esp_efuse_table.h"
// md5_digest_table 13b0a8106fd483a0fcfa8b2f7388a95f
// md5_digest_table b26e7466c400977081a142076ef1a5bb
// This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY.
// If you want to change some fields, you need to change esp_efuse_table.csv file
// then run `efuse_common_table` or `efuse_custom_table` command it will generate this file.
@ -287,14 +287,102 @@ static const esp_efuse_desc_t WR_DIS_SYS_DATA_PART1[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of BLOCK2,
};
static const esp_efuse_desc_t WR_DIS_ACTIVE_HP_DBIAS[] = {
{EFUSE_BLK0, 20, 1}, // [] wr_dis of ACTIVE_HP_DBIAS,
};
static const esp_efuse_desc_t WR_DIS_ACTIVE_LP_DBIAS[] = {
{EFUSE_BLK0, 20, 1}, // [] wr_dis of ACTIVE_LP_DBIAS,
};
static const esp_efuse_desc_t WR_DIS_LSLP_HP_DBG[] = {
{EFUSE_BLK0, 20, 1}, // [] wr_dis of LSLP_HP_DBG,
};
static const esp_efuse_desc_t WR_DIS_LSLP_HP_DBIAS[] = {
{EFUSE_BLK0, 20, 1}, // [] wr_dis of LSLP_HP_DBIAS,
};
static const esp_efuse_desc_t WR_DIS_DSLP_LP_DBG[] = {
{EFUSE_BLK0, 20, 1}, // [] wr_dis of DSLP_LP_DBG,
};
static const esp_efuse_desc_t WR_DIS_DSLP_LP_DBIAS[] = {
{EFUSE_BLK0, 20, 1}, // [] wr_dis of DSLP_LP_DBIAS,
};
static const esp_efuse_desc_t WR_DIS_LP_HP_DBIAS_VOL_GAP[] = {
{EFUSE_BLK0, 20, 1}, // [] wr_dis of LP_HP_DBIAS_VOL_GAP,
};
static const esp_efuse_desc_t WR_DIS_OPTIONAL_UNIQUE_ID[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of OPTIONAL_UNIQUE_ID,
};
static const esp_efuse_desc_t WR_DIS_TEMPERATURE_SENSOR[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of TEMPERATURE_SENSOR,
};
static const esp_efuse_desc_t WR_DIS_OCODE[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of OCODE,
};
static const esp_efuse_desc_t WR_DIS_ADC1_AVE_INITCODE_ATTEN0[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_AVE_INITCODE_ATTEN0,
};
static const esp_efuse_desc_t WR_DIS_ADC1_AVE_INITCODE_ATTEN1[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_AVE_INITCODE_ATTEN1,
};
static const esp_efuse_desc_t WR_DIS_ADC1_AVE_INITCODE_ATTEN2[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_AVE_INITCODE_ATTEN2,
};
static const esp_efuse_desc_t WR_DIS_ADC1_AVE_INITCODE_ATTEN3[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_AVE_INITCODE_ATTEN3,
};
static const esp_efuse_desc_t WR_DIS_ADC1_HI_DOUT_ATTEN0[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_HI_DOUT_ATTEN0,
};
static const esp_efuse_desc_t WR_DIS_ADC1_HI_DOUT_ATTEN1[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_HI_DOUT_ATTEN1,
};
static const esp_efuse_desc_t WR_DIS_ADC1_HI_DOUT_ATTEN2[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_HI_DOUT_ATTEN2,
};
static const esp_efuse_desc_t WR_DIS_ADC1_HI_DOUT_ATTEN3[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_HI_DOUT_ATTEN3,
};
static const esp_efuse_desc_t WR_DIS_ADC1_CH0_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_CH0_ATTEN0_INITCODE_DIFF,
};
static const esp_efuse_desc_t WR_DIS_ADC1_CH1_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_CH1_ATTEN0_INITCODE_DIFF,
};
static const esp_efuse_desc_t WR_DIS_ADC1_CH2_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_CH2_ATTEN0_INITCODE_DIFF,
};
static const esp_efuse_desc_t WR_DIS_ADC1_CH3_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_CH3_ATTEN0_INITCODE_DIFF,
};
static const esp_efuse_desc_t WR_DIS_ADC1_CH4_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_CH4_ATTEN0_INITCODE_DIFF,
};
static const esp_efuse_desc_t WR_DIS_ADC1_CH5_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_CH5_ATTEN0_INITCODE_DIFF,
};
static const esp_efuse_desc_t WR_DIS_BLOCK_USR_DATA[] = {
{EFUSE_BLK0, 22, 1}, // [WR_DIS.USER_DATA] wr_dis of BLOCK_USR_DATA,
};
@ -648,14 +736,102 @@ static const esp_efuse_desc_t TRIM_P_BIAS[] = {
{EFUSE_BLK1, 101, 5}, // [] PADC CAL P bias,
};
static const esp_efuse_desc_t ACTIVE_HP_DBIAS[] = {
{EFUSE_BLK1, 106, 4}, // [] Active HP DBIAS of fixed voltage,
};
static const esp_efuse_desc_t ACTIVE_LP_DBIAS[] = {
{EFUSE_BLK1, 110, 4}, // [] Active LP DBIAS of fixed voltage,
};
static const esp_efuse_desc_t LSLP_HP_DBG[] = {
{EFUSE_BLK1, 114, 2}, // [] LSLP HP DBG of fixed voltage,
};
static const esp_efuse_desc_t LSLP_HP_DBIAS[] = {
{EFUSE_BLK1, 116, 4}, // [] LSLP HP DBIAS of fixed voltage,
};
static const esp_efuse_desc_t DSLP_LP_DBG[] = {
{EFUSE_BLK1, 120, 4}, // [] DSLP LP DBG of fixed voltage,
};
static const esp_efuse_desc_t DSLP_LP_DBIAS[] = {
{EFUSE_BLK1, 124, 5}, // [] DSLP LP DBIAS of fixed voltage,
};
static const esp_efuse_desc_t LP_HP_DBIAS_VOL_GAP[] = {
{EFUSE_BLK1, 129, 5}, // [] DBIAS gap between LP and HP,
};
static const esp_efuse_desc_t OPTIONAL_UNIQUE_ID[] = {
{EFUSE_BLK2, 0, 128}, // [] Optional unique 128-bit ID,
};
static const esp_efuse_desc_t TEMPERATURE_SENSOR[] = {
{EFUSE_BLK2, 128, 9}, // [] Temperature calibration data,
};
static const esp_efuse_desc_t OCODE[] = {
{EFUSE_BLK2, 137, 8}, // [] ADC OCode,
};
static const esp_efuse_desc_t ADC1_AVE_INITCODE_ATTEN0[] = {
{EFUSE_BLK2, 145, 10}, // [] Average initcode of ADC1 atten0,
};
static const esp_efuse_desc_t ADC1_AVE_INITCODE_ATTEN1[] = {
{EFUSE_BLK2, 155, 10}, // [] Average initcode of ADC1 atten0,
};
static const esp_efuse_desc_t ADC1_AVE_INITCODE_ATTEN2[] = {
{EFUSE_BLK2, 165, 10}, // [] Average initcode of ADC1 atten0,
};
static const esp_efuse_desc_t ADC1_AVE_INITCODE_ATTEN3[] = {
{EFUSE_BLK2, 175, 10}, // [] Average initcode of ADC1 atten0,
};
static const esp_efuse_desc_t ADC1_HI_DOUT_ATTEN0[] = {
{EFUSE_BLK2, 185, 10}, // [] HI DOUT of ADC1 atten0,
};
static const esp_efuse_desc_t ADC1_HI_DOUT_ATTEN1[] = {
{EFUSE_BLK2, 195, 10}, // [] HI DOUT of ADC1 atten1,
};
static const esp_efuse_desc_t ADC1_HI_DOUT_ATTEN2[] = {
{EFUSE_BLK2, 205, 10}, // [] HI DOUT of ADC1 atten2,
};
static const esp_efuse_desc_t ADC1_HI_DOUT_ATTEN3[] = {
{EFUSE_BLK2, 215, 10}, // [] HI DOUT of ADC1 atten3,
};
static const esp_efuse_desc_t ADC1_CH0_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK2, 225, 4}, // [] Gap between ADC1 CH0 and average initcode,
};
static const esp_efuse_desc_t ADC1_CH1_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK2, 229, 4}, // [] Gap between ADC1 CH1 and average initcode,
};
static const esp_efuse_desc_t ADC1_CH2_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK2, 233, 4}, // [] Gap between ADC1 CH2 and average initcode,
};
static const esp_efuse_desc_t ADC1_CH3_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK2, 237, 4}, // [] Gap between ADC1 CH3 and average initcode,
};
static const esp_efuse_desc_t ADC1_CH4_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK2, 241, 4}, // [] Gap between ADC1 CH4 and average initcode,
};
static const esp_efuse_desc_t ADC1_CH5_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK2, 245, 4}, // [] Gap between ADC1 CH5 and average initcode,
};
static const esp_efuse_desc_t USER_DATA[] = {
{EFUSE_BLK3, 0, 256}, // [BLOCK_USR_DATA] User data,
};
@ -1036,16 +1212,126 @@ const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SYS_DATA_PART1[] = {
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ACTIVE_HP_DBIAS[] = {
&WR_DIS_ACTIVE_HP_DBIAS[0], // [] wr_dis of ACTIVE_HP_DBIAS
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ACTIVE_LP_DBIAS[] = {
&WR_DIS_ACTIVE_LP_DBIAS[0], // [] wr_dis of ACTIVE_LP_DBIAS
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LSLP_HP_DBG[] = {
&WR_DIS_LSLP_HP_DBG[0], // [] wr_dis of LSLP_HP_DBG
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LSLP_HP_DBIAS[] = {
&WR_DIS_LSLP_HP_DBIAS[0], // [] wr_dis of LSLP_HP_DBIAS
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_DSLP_LP_DBG[] = {
&WR_DIS_DSLP_LP_DBG[0], // [] wr_dis of DSLP_LP_DBG
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_DSLP_LP_DBIAS[] = {
&WR_DIS_DSLP_LP_DBIAS[0], // [] wr_dis of DSLP_LP_DBIAS
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LP_HP_DBIAS_VOL_GAP[] = {
&WR_DIS_LP_HP_DBIAS_VOL_GAP[0], // [] wr_dis of LP_HP_DBIAS_VOL_GAP
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_OPTIONAL_UNIQUE_ID[] = {
&WR_DIS_OPTIONAL_UNIQUE_ID[0], // [] wr_dis of OPTIONAL_UNIQUE_ID
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_TEMPERATURE_SENSOR[] = {
&WR_DIS_TEMPERATURE_SENSOR[0], // [] wr_dis of TEMPERATURE_SENSOR
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_OCODE[] = {
&WR_DIS_OCODE[0], // [] wr_dis of OCODE
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN0[] = {
&WR_DIS_ADC1_AVE_INITCODE_ATTEN0[0], // [] wr_dis of ADC1_AVE_INITCODE_ATTEN0
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN1[] = {
&WR_DIS_ADC1_AVE_INITCODE_ATTEN1[0], // [] wr_dis of ADC1_AVE_INITCODE_ATTEN1
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN2[] = {
&WR_DIS_ADC1_AVE_INITCODE_ATTEN2[0], // [] wr_dis of ADC1_AVE_INITCODE_ATTEN2
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN3[] = {
&WR_DIS_ADC1_AVE_INITCODE_ATTEN3[0], // [] wr_dis of ADC1_AVE_INITCODE_ATTEN3
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN0[] = {
&WR_DIS_ADC1_HI_DOUT_ATTEN0[0], // [] wr_dis of ADC1_HI_DOUT_ATTEN0
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN1[] = {
&WR_DIS_ADC1_HI_DOUT_ATTEN1[0], // [] wr_dis of ADC1_HI_DOUT_ATTEN1
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN2[] = {
&WR_DIS_ADC1_HI_DOUT_ATTEN2[0], // [] wr_dis of ADC1_HI_DOUT_ATTEN2
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN3[] = {
&WR_DIS_ADC1_HI_DOUT_ATTEN3[0], // [] wr_dis of ADC1_HI_DOUT_ATTEN3
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH0_ATTEN0_INITCODE_DIFF[] = {
&WR_DIS_ADC1_CH0_ATTEN0_INITCODE_DIFF[0], // [] wr_dis of ADC1_CH0_ATTEN0_INITCODE_DIFF
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH1_ATTEN0_INITCODE_DIFF[] = {
&WR_DIS_ADC1_CH1_ATTEN0_INITCODE_DIFF[0], // [] wr_dis of ADC1_CH1_ATTEN0_INITCODE_DIFF
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH2_ATTEN0_INITCODE_DIFF[] = {
&WR_DIS_ADC1_CH2_ATTEN0_INITCODE_DIFF[0], // [] wr_dis of ADC1_CH2_ATTEN0_INITCODE_DIFF
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH3_ATTEN0_INITCODE_DIFF[] = {
&WR_DIS_ADC1_CH3_ATTEN0_INITCODE_DIFF[0], // [] wr_dis of ADC1_CH3_ATTEN0_INITCODE_DIFF
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH4_ATTEN0_INITCODE_DIFF[] = {
&WR_DIS_ADC1_CH4_ATTEN0_INITCODE_DIFF[0], // [] wr_dis of ADC1_CH4_ATTEN0_INITCODE_DIFF
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH5_ATTEN0_INITCODE_DIFF[] = {
&WR_DIS_ADC1_CH5_ATTEN0_INITCODE_DIFF[0], // [] wr_dis of ADC1_CH5_ATTEN0_INITCODE_DIFF
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLOCK_USR_DATA[] = {
&WR_DIS_BLOCK_USR_DATA[0], // [WR_DIS.USER_DATA] wr_dis of BLOCK_USR_DATA
NULL
@ -1486,16 +1772,126 @@ const esp_efuse_desc_t* ESP_EFUSE_TRIM_P_BIAS[] = {
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ACTIVE_HP_DBIAS[] = {
&ACTIVE_HP_DBIAS[0], // [] Active HP DBIAS of fixed voltage
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ACTIVE_LP_DBIAS[] = {
&ACTIVE_LP_DBIAS[0], // [] Active LP DBIAS of fixed voltage
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_LSLP_HP_DBG[] = {
&LSLP_HP_DBG[0], // [] LSLP HP DBG of fixed voltage
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_LSLP_HP_DBIAS[] = {
&LSLP_HP_DBIAS[0], // [] LSLP HP DBIAS of fixed voltage
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_DSLP_LP_DBG[] = {
&DSLP_LP_DBG[0], // [] DSLP LP DBG of fixed voltage
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_DSLP_LP_DBIAS[] = {
&DSLP_LP_DBIAS[0], // [] DSLP LP DBIAS of fixed voltage
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_LP_HP_DBIAS_VOL_GAP[] = {
&LP_HP_DBIAS_VOL_GAP[0], // [] DBIAS gap between LP and HP
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_OPTIONAL_UNIQUE_ID[] = {
&OPTIONAL_UNIQUE_ID[0], // [] Optional unique 128-bit ID
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_TEMPERATURE_SENSOR[] = {
&TEMPERATURE_SENSOR[0], // [] Temperature calibration data
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_OCODE[] = {
&OCODE[0], // [] ADC OCode
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN0[] = {
&ADC1_AVE_INITCODE_ATTEN0[0], // [] Average initcode of ADC1 atten0
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN1[] = {
&ADC1_AVE_INITCODE_ATTEN1[0], // [] Average initcode of ADC1 atten0
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN2[] = {
&ADC1_AVE_INITCODE_ATTEN2[0], // [] Average initcode of ADC1 atten0
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN3[] = {
&ADC1_AVE_INITCODE_ATTEN3[0], // [] Average initcode of ADC1 atten0
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN0[] = {
&ADC1_HI_DOUT_ATTEN0[0], // [] HI DOUT of ADC1 atten0
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN1[] = {
&ADC1_HI_DOUT_ATTEN1[0], // [] HI DOUT of ADC1 atten1
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN2[] = {
&ADC1_HI_DOUT_ATTEN2[0], // [] HI DOUT of ADC1 atten2
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN3[] = {
&ADC1_HI_DOUT_ATTEN3[0], // [] HI DOUT of ADC1 atten3
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH0_ATTEN0_INITCODE_DIFF[] = {
&ADC1_CH0_ATTEN0_INITCODE_DIFF[0], // [] Gap between ADC1 CH0 and average initcode
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH1_ATTEN0_INITCODE_DIFF[] = {
&ADC1_CH1_ATTEN0_INITCODE_DIFF[0], // [] Gap between ADC1 CH1 and average initcode
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH2_ATTEN0_INITCODE_DIFF[] = {
&ADC1_CH2_ATTEN0_INITCODE_DIFF[0], // [] Gap between ADC1 CH2 and average initcode
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH3_ATTEN0_INITCODE_DIFF[] = {
&ADC1_CH3_ATTEN0_INITCODE_DIFF[0], // [] Gap between ADC1 CH3 and average initcode
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH4_ATTEN0_INITCODE_DIFF[] = {
&ADC1_CH4_ATTEN0_INITCODE_DIFF[0], // [] Gap between ADC1 CH4 and average initcode
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH5_ATTEN0_INITCODE_DIFF[] = {
&ADC1_CH5_ATTEN0_INITCODE_DIFF[0], // [] Gap between ADC1 CH5 and average initcode
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_USER_DATA[] = {
&USER_DATA[0], // [BLOCK_USR_DATA] User data
NULL

View File

@ -9,7 +9,7 @@
# this will generate new source files, next rebuild all the sources.
# !!!!!!!!!!! #
# This file was generated by regtools.py based on the efuses.yaml file with the version: b09fa417de505238a601eddce188b696
# This file was generated by regtools.py based on the efuses.yaml file with the version: 287a0ed4951aba84b9571a5f31000275
WR_DIS, EFUSE_BLK0, 0, 32, [] Disable programming of individual eFuses
WR_DIS.RD_DIS, EFUSE_BLK0, 0, 1, [] wr_dis of RD_DIS
@ -79,8 +79,30 @@ WR_DIS.PA_TRIM_VERSION, EFUSE_BLK0, 20, 1, [] wr_dis
WR_DIS.TRIM_N_BIAS, EFUSE_BLK0, 20, 1, [] wr_dis of TRIM_N_BIAS
WR_DIS.TRIM_P_BIAS, EFUSE_BLK0, 20, 1, [] wr_dis of TRIM_P_BIAS
WR_DIS.SYS_DATA_PART1, EFUSE_BLK0, 21, 1, [] wr_dis of BLOCK2
WR_DIS.ACTIVE_HP_DBIAS, EFUSE_BLK0, 20, 1, [] wr_dis of ACTIVE_HP_DBIAS
WR_DIS.ACTIVE_LP_DBIAS, EFUSE_BLK0, 20, 1, [] wr_dis of ACTIVE_LP_DBIAS
WR_DIS.LSLP_HP_DBG, EFUSE_BLK0, 20, 1, [] wr_dis of LSLP_HP_DBG
WR_DIS.LSLP_HP_DBIAS, EFUSE_BLK0, 20, 1, [] wr_dis of LSLP_HP_DBIAS
WR_DIS.DSLP_LP_DBG, EFUSE_BLK0, 20, 1, [] wr_dis of DSLP_LP_DBG
WR_DIS.DSLP_LP_DBIAS, EFUSE_BLK0, 20, 1, [] wr_dis of DSLP_LP_DBIAS
WR_DIS.LP_HP_DBIAS_VOL_GAP, EFUSE_BLK0, 20, 1, [] wr_dis of LP_HP_DBIAS_VOL_GAP
WR_DIS.OPTIONAL_UNIQUE_ID, EFUSE_BLK0, 21, 1, [] wr_dis of OPTIONAL_UNIQUE_ID
WR_DIS.TEMPERATURE_SENSOR, EFUSE_BLK0, 21, 1, [] wr_dis of TEMPERATURE_SENSOR
WR_DIS.OCODE, EFUSE_BLK0, 21, 1, [] wr_dis of OCODE
WR_DIS.ADC1_AVE_INITCODE_ATTEN0, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INITCODE_ATTEN0
WR_DIS.ADC1_AVE_INITCODE_ATTEN1, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INITCODE_ATTEN1
WR_DIS.ADC1_AVE_INITCODE_ATTEN2, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INITCODE_ATTEN2
WR_DIS.ADC1_AVE_INITCODE_ATTEN3, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INITCODE_ATTEN3
WR_DIS.ADC1_HI_DOUT_ATTEN0, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN0
WR_DIS.ADC1_HI_DOUT_ATTEN1, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN1
WR_DIS.ADC1_HI_DOUT_ATTEN2, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN2
WR_DIS.ADC1_HI_DOUT_ATTEN3, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN3
WR_DIS.ADC1_CH0_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_CH0_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH1_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_CH1_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH2_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_CH2_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH3_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_CH3_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH4_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_CH4_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH5_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_CH5_ATTEN0_INITCODE_DIFF
WR_DIS.BLOCK_USR_DATA, EFUSE_BLK0, 22, 1, [WR_DIS.USER_DATA] wr_dis of BLOCK_USR_DATA
WR_DIS.CUSTOM_MAC, EFUSE_BLK0, 22, 1, [WR_DIS.MAC_CUSTOM WR_DIS.USER_DATA_MAC_CUSTOM] wr_dis of CUSTOM_MAC
WR_DIS.BLOCK_KEY0, EFUSE_BLK0, 23, 1, [WR_DIS.KEY0] wr_dis of BLOCK_KEY0
@ -173,8 +195,30 @@ PKG_VERSION, EFUSE_BLK1, 90, 3, [] Packag
PA_TRIM_VERSION, EFUSE_BLK1, 93, 3, [] PADC CAL PA trim version
TRIM_N_BIAS, EFUSE_BLK1, 96, 5, [] PADC CAL N bias
TRIM_P_BIAS, EFUSE_BLK1, 101, 5, [] PADC CAL P bias
ACTIVE_HP_DBIAS, EFUSE_BLK1, 106, 4, [] Active HP DBIAS of fixed voltage
ACTIVE_LP_DBIAS, EFUSE_BLK1, 110, 4, [] Active LP DBIAS of fixed voltage
LSLP_HP_DBG, EFUSE_BLK1, 114, 2, [] LSLP HP DBG of fixed voltage
LSLP_HP_DBIAS, EFUSE_BLK1, 116, 4, [] LSLP HP DBIAS of fixed voltage
DSLP_LP_DBG, EFUSE_BLK1, 120, 4, [] DSLP LP DBG of fixed voltage
DSLP_LP_DBIAS, EFUSE_BLK1, 124, 5, [] DSLP LP DBIAS of fixed voltage
LP_HP_DBIAS_VOL_GAP, EFUSE_BLK1, 129, 5, [] DBIAS gap between LP and HP
OPTIONAL_UNIQUE_ID, EFUSE_BLK2, 0, 128, [] Optional unique 128-bit ID
TEMPERATURE_SENSOR, EFUSE_BLK2, 128, 9, [] Temperature calibration data
OCODE, EFUSE_BLK2, 137, 8, [] ADC OCode
ADC1_AVE_INITCODE_ATTEN0, EFUSE_BLK2, 145, 10, [] Average initcode of ADC1 atten0
ADC1_AVE_INITCODE_ATTEN1, EFUSE_BLK2, 155, 10, [] Average initcode of ADC1 atten0
ADC1_AVE_INITCODE_ATTEN2, EFUSE_BLK2, 165, 10, [] Average initcode of ADC1 atten0
ADC1_AVE_INITCODE_ATTEN3, EFUSE_BLK2, 175, 10, [] Average initcode of ADC1 atten0
ADC1_HI_DOUT_ATTEN0, EFUSE_BLK2, 185, 10, [] HI DOUT of ADC1 atten0
ADC1_HI_DOUT_ATTEN1, EFUSE_BLK2, 195, 10, [] HI DOUT of ADC1 atten1
ADC1_HI_DOUT_ATTEN2, EFUSE_BLK2, 205, 10, [] HI DOUT of ADC1 atten2
ADC1_HI_DOUT_ATTEN3, EFUSE_BLK2, 215, 10, [] HI DOUT of ADC1 atten3
ADC1_CH0_ATTEN0_INITCODE_DIFF, EFUSE_BLK2, 225, 4, [] Gap between ADC1 CH0 and average initcode
ADC1_CH1_ATTEN0_INITCODE_DIFF, EFUSE_BLK2, 229, 4, [] Gap between ADC1 CH1 and average initcode
ADC1_CH2_ATTEN0_INITCODE_DIFF, EFUSE_BLK2, 233, 4, [] Gap between ADC1 CH2 and average initcode
ADC1_CH3_ATTEN0_INITCODE_DIFF, EFUSE_BLK2, 237, 4, [] Gap between ADC1 CH3 and average initcode
ADC1_CH4_ATTEN0_INITCODE_DIFF, EFUSE_BLK2, 241, 4, [] Gap between ADC1 CH4 and average initcode
ADC1_CH5_ATTEN0_INITCODE_DIFF, EFUSE_BLK2, 245, 4, [] Gap between ADC1 CH5 and average initcode
USER_DATA, EFUSE_BLK3, 0, 256, [BLOCK_USR_DATA] User data
USER_DATA.MAC_CUSTOM, EFUSE_BLK3, 200, 48, [MAC_CUSTOM CUSTOM_MAC] Custom MAC
KEY0, EFUSE_BLK4, 0, 256, [BLOCK_KEY0] Key0 or user data

Can't render this file because it contains an unexpected character in line 8 and column 53.

View File

@ -10,7 +10,7 @@ extern "C" {
#include "esp_efuse.h"
// md5_digest_table 13b0a8106fd483a0fcfa8b2f7388a95f
// md5_digest_table b26e7466c400977081a142076ef1a5bb
// This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY.
// If you want to change some fields, you need to change esp_efuse_table.csv file
// then run `efuse_common_table` or `efuse_custom_table` command it will generate this file.
@ -92,8 +92,30 @@ extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_PA_TRIM_VERSION[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_TRIM_N_BIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_TRIM_P_BIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SYS_DATA_PART1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ACTIVE_HP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ACTIVE_LP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LSLP_HP_DBG[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LSLP_HP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_DSLP_LP_DBG[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_DSLP_LP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LP_HP_DBIAS_VOL_GAP[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_OPTIONAL_UNIQUE_ID[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_TEMPERATURE_SENSOR[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_OCODE[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH0_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH1_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH2_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH3_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH4_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH5_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLOCK_USR_DATA[];
#define ESP_EFUSE_WR_DIS_USER_DATA ESP_EFUSE_WR_DIS_BLOCK_USR_DATA
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_CUSTOM_MAC[];
@ -205,8 +227,30 @@ extern const esp_efuse_desc_t* ESP_EFUSE_PKG_VERSION[];
extern const esp_efuse_desc_t* ESP_EFUSE_PA_TRIM_VERSION[];
extern const esp_efuse_desc_t* ESP_EFUSE_TRIM_N_BIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_TRIM_P_BIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_ACTIVE_HP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_ACTIVE_LP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_LSLP_HP_DBG[];
extern const esp_efuse_desc_t* ESP_EFUSE_LSLP_HP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_DSLP_LP_DBG[];
extern const esp_efuse_desc_t* ESP_EFUSE_DSLP_LP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_LP_HP_DBIAS_VOL_GAP[];
extern const esp_efuse_desc_t* ESP_EFUSE_OPTIONAL_UNIQUE_ID[];
extern const esp_efuse_desc_t* ESP_EFUSE_TEMPERATURE_SENSOR[];
extern const esp_efuse_desc_t* ESP_EFUSE_OCODE[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH0_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH1_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH2_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH3_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH4_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH5_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_USER_DATA[];
#define ESP_EFUSE_BLOCK_USR_DATA ESP_EFUSE_USER_DATA
extern const esp_efuse_desc_t* ESP_EFUSE_USER_DATA_MAC_CUSTOM[];

View File

@ -9,7 +9,7 @@
#include <assert.h>
#include "esp_efuse_table.h"
// md5_digest_table 52aee23d9256003919a3d01945678355
// md5_digest_table af9aaa79feb0970d90f35360a5113f03
// This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY.
// If you want to change some fields, you need to change esp_efuse_table.csv file
// then run `efuse_common_table` or `efuse_custom_table` command it will generate this file.
@ -235,6 +235,62 @@ static const esp_efuse_desc_t WR_DIS_OPTIONAL_UNIQUE_ID[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of OPTIONAL_UNIQUE_ID,
};
static const esp_efuse_desc_t WR_DIS_TEMPERATURE_SENSOR[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of TEMPERATURE_SENSOR,
};
static const esp_efuse_desc_t WR_DIS_OCODE[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of OCODE,
};
static const esp_efuse_desc_t WR_DIS_ADC1_AVE_INIT_CODE_ATTEN0[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN0,
};
static const esp_efuse_desc_t WR_DIS_ADC1_AVE_INIT_CODE_ATTEN1[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN1,
};
static const esp_efuse_desc_t WR_DIS_ADC1_AVE_INIT_CODE_ATTEN2[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN2,
};
static const esp_efuse_desc_t WR_DIS_ADC1_AVE_INIT_CODE_ATTEN3[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN3,
};
static const esp_efuse_desc_t WR_DIS_ADC1_HI_DOUT_ATTEN0[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_HI_DOUT_ATTEN0,
};
static const esp_efuse_desc_t WR_DIS_ADC1_HI_DOUT_ATTEN1[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_HI_DOUT_ATTEN1,
};
static const esp_efuse_desc_t WR_DIS_ADC1_HI_DOUT_ATTEN2[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_HI_DOUT_ATTEN2,
};
static const esp_efuse_desc_t WR_DIS_ADC1_HI_DOUT_ATTEN3[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_HI_DOUT_ATTEN3,
};
static const esp_efuse_desc_t WR_DIS_ADC1_CH0_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_CH0_ATTEN0_INITCODE_DIFF,
};
static const esp_efuse_desc_t WR_DIS_ADC1_CH1_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_CH1_ATTEN0_INITCODE_DIFF,
};
static const esp_efuse_desc_t WR_DIS_ADC1_CH2_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_CH2_ATTEN0_INITCODE_DIFF,
};
static const esp_efuse_desc_t WR_DIS_ADC1_CH3_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK0, 21, 1}, // [] wr_dis of ADC1_CH3_ATTEN0_INITCODE_DIFF,
};
static const esp_efuse_desc_t WR_DIS_BLOCK_USR_DATA[] = {
{EFUSE_BLK0, 22, 1}, // [WR_DIS.USER_DATA] wr_dis of BLOCK_USR_DATA,
};
@ -528,6 +584,62 @@ static const esp_efuse_desc_t OPTIONAL_UNIQUE_ID[] = {
{EFUSE_BLK2, 0, 128}, // [] Optional unique 128-bit ID,
};
static const esp_efuse_desc_t TEMPERATURE_SENSOR[] = {
{EFUSE_BLK2, 128, 9}, // [] Temperature calibration data,
};
static const esp_efuse_desc_t OCODE[] = {
{EFUSE_BLK2, 137, 8}, // [] ADC OCode calibration,
};
static const esp_efuse_desc_t ADC1_AVE_INIT_CODE_ATTEN0[] = {
{EFUSE_BLK2, 145, 10}, // [] Average initcode of ADC1 atten0,
};
static const esp_efuse_desc_t ADC1_AVE_INIT_CODE_ATTEN1[] = {
{EFUSE_BLK2, 155, 10}, // [] Average initcode of ADC1 atten1,
};
static const esp_efuse_desc_t ADC1_AVE_INIT_CODE_ATTEN2[] = {
{EFUSE_BLK2, 165, 10}, // [] Average initcode of ADC1 atten2,
};
static const esp_efuse_desc_t ADC1_AVE_INIT_CODE_ATTEN3[] = {
{EFUSE_BLK2, 175, 10}, // [] Average initcode of ADC1 atten3,
};
static const esp_efuse_desc_t ADC1_HI_DOUT_ATTEN0[] = {
{EFUSE_BLK2, 185, 10}, // [] HI_DOUT of ADC1 atten0,
};
static const esp_efuse_desc_t ADC1_HI_DOUT_ATTEN1[] = {
{EFUSE_BLK2, 195, 10}, // [] HI_DOUT of ADC1 atten1,
};
static const esp_efuse_desc_t ADC1_HI_DOUT_ATTEN2[] = {
{EFUSE_BLK2, 205, 10}, // [] HI_DOUT of ADC1 atten2,
};
static const esp_efuse_desc_t ADC1_HI_DOUT_ATTEN3[] = {
{EFUSE_BLK2, 215, 10}, // [] HI_DOUT of ADC1 atten3,
};
static const esp_efuse_desc_t ADC1_CH0_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK2, 225, 4}, // [] Gap between ADC1 CH0 and average initcode,
};
static const esp_efuse_desc_t ADC1_CH1_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK2, 229, 4}, // [] Gap between ADC1 CH1 and average initcode,
};
static const esp_efuse_desc_t ADC1_CH2_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK2, 233, 4}, // [] Gap between ADC1 CH2 and average initcode,
};
static const esp_efuse_desc_t ADC1_CH3_ATTEN0_INITCODE_DIFF[] = {
{EFUSE_BLK2, 237, 4}, // [] Gap between ADC1 CH3 and average initcode,
};
static const esp_efuse_desc_t USER_DATA[] = {
{EFUSE_BLK3, 0, 256}, // [BLOCK_USR_DATA] User data,
};
@ -843,6 +955,76 @@ const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_OPTIONAL_UNIQUE_ID[] = {
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_TEMPERATURE_SENSOR[] = {
&WR_DIS_TEMPERATURE_SENSOR[0], // [] wr_dis of TEMPERATURE_SENSOR
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_OCODE[] = {
&WR_DIS_OCODE[0], // [] wr_dis of OCODE
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INIT_CODE_ATTEN0[] = {
&WR_DIS_ADC1_AVE_INIT_CODE_ATTEN0[0], // [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN0
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INIT_CODE_ATTEN1[] = {
&WR_DIS_ADC1_AVE_INIT_CODE_ATTEN1[0], // [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN1
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INIT_CODE_ATTEN2[] = {
&WR_DIS_ADC1_AVE_INIT_CODE_ATTEN2[0], // [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN2
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INIT_CODE_ATTEN3[] = {
&WR_DIS_ADC1_AVE_INIT_CODE_ATTEN3[0], // [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN3
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN0[] = {
&WR_DIS_ADC1_HI_DOUT_ATTEN0[0], // [] wr_dis of ADC1_HI_DOUT_ATTEN0
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN1[] = {
&WR_DIS_ADC1_HI_DOUT_ATTEN1[0], // [] wr_dis of ADC1_HI_DOUT_ATTEN1
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN2[] = {
&WR_DIS_ADC1_HI_DOUT_ATTEN2[0], // [] wr_dis of ADC1_HI_DOUT_ATTEN2
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN3[] = {
&WR_DIS_ADC1_HI_DOUT_ATTEN3[0], // [] wr_dis of ADC1_HI_DOUT_ATTEN3
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH0_ATTEN0_INITCODE_DIFF[] = {
&WR_DIS_ADC1_CH0_ATTEN0_INITCODE_DIFF[0], // [] wr_dis of ADC1_CH0_ATTEN0_INITCODE_DIFF
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH1_ATTEN0_INITCODE_DIFF[] = {
&WR_DIS_ADC1_CH1_ATTEN0_INITCODE_DIFF[0], // [] wr_dis of ADC1_CH1_ATTEN0_INITCODE_DIFF
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH2_ATTEN0_INITCODE_DIFF[] = {
&WR_DIS_ADC1_CH2_ATTEN0_INITCODE_DIFF[0], // [] wr_dis of ADC1_CH2_ATTEN0_INITCODE_DIFF
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH3_ATTEN0_INITCODE_DIFF[] = {
&WR_DIS_ADC1_CH3_ATTEN0_INITCODE_DIFF[0], // [] wr_dis of ADC1_CH3_ATTEN0_INITCODE_DIFF
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLOCK_USR_DATA[] = {
&WR_DIS_BLOCK_USR_DATA[0], // [WR_DIS.USER_DATA] wr_dis of BLOCK_USR_DATA
NULL
@ -1208,6 +1390,76 @@ const esp_efuse_desc_t* ESP_EFUSE_OPTIONAL_UNIQUE_ID[] = {
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_TEMPERATURE_SENSOR[] = {
&TEMPERATURE_SENSOR[0], // [] Temperature calibration data
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_OCODE[] = {
&OCODE[0], // [] ADC OCode calibration
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INIT_CODE_ATTEN0[] = {
&ADC1_AVE_INIT_CODE_ATTEN0[0], // [] Average initcode of ADC1 atten0
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INIT_CODE_ATTEN1[] = {
&ADC1_AVE_INIT_CODE_ATTEN1[0], // [] Average initcode of ADC1 atten1
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INIT_CODE_ATTEN2[] = {
&ADC1_AVE_INIT_CODE_ATTEN2[0], // [] Average initcode of ADC1 atten2
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INIT_CODE_ATTEN3[] = {
&ADC1_AVE_INIT_CODE_ATTEN3[0], // [] Average initcode of ADC1 atten3
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN0[] = {
&ADC1_HI_DOUT_ATTEN0[0], // [] HI_DOUT of ADC1 atten0
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN1[] = {
&ADC1_HI_DOUT_ATTEN1[0], // [] HI_DOUT of ADC1 atten1
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN2[] = {
&ADC1_HI_DOUT_ATTEN2[0], // [] HI_DOUT of ADC1 atten2
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN3[] = {
&ADC1_HI_DOUT_ATTEN3[0], // [] HI_DOUT of ADC1 atten3
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH0_ATTEN0_INITCODE_DIFF[] = {
&ADC1_CH0_ATTEN0_INITCODE_DIFF[0], // [] Gap between ADC1 CH0 and average initcode
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH1_ATTEN0_INITCODE_DIFF[] = {
&ADC1_CH1_ATTEN0_INITCODE_DIFF[0], // [] Gap between ADC1 CH1 and average initcode
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH2_ATTEN0_INITCODE_DIFF[] = {
&ADC1_CH2_ATTEN0_INITCODE_DIFF[0], // [] Gap between ADC1 CH2 and average initcode
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH3_ATTEN0_INITCODE_DIFF[] = {
&ADC1_CH3_ATTEN0_INITCODE_DIFF[0], // [] Gap between ADC1 CH3 and average initcode
NULL
};
const esp_efuse_desc_t* ESP_EFUSE_USER_DATA[] = {
&USER_DATA[0], // [BLOCK_USR_DATA] User data
NULL

View File

@ -9,7 +9,7 @@
# this will generate new source files, next rebuild all the sources.
# !!!!!!!!!!! #
# This file was generated by regtools.py based on the efuses.yaml file with the version: e564f8042b56a475a7714bb28ecdadfa
# This file was generated by regtools.py based on the efuses.yaml file with the version: 8f05ff9d292b10d2360200fae1d15e8d
WR_DIS, EFUSE_BLK0, 0, 32, [] Disable programming of individual eFuses
WR_DIS.RD_DIS, EFUSE_BLK0, 0, 1, [] wr_dis of RD_DIS
@ -66,6 +66,20 @@ WR_DIS.TEMP, EFUSE_BLK0, 20, 1, [] wr_dis
WR_DIS.PKG_VERSION, EFUSE_BLK0, 20, 1, [] wr_dis of PKG_VERSION
WR_DIS.SYS_DATA_PART1, EFUSE_BLK0, 21, 1, [] wr_dis of BLOCK2
WR_DIS.OPTIONAL_UNIQUE_ID, EFUSE_BLK0, 21, 1, [] wr_dis of OPTIONAL_UNIQUE_ID
WR_DIS.TEMPERATURE_SENSOR, EFUSE_BLK0, 21, 1, [] wr_dis of TEMPERATURE_SENSOR
WR_DIS.OCODE, EFUSE_BLK0, 21, 1, [] wr_dis of OCODE
WR_DIS.ADC1_AVE_INIT_CODE_ATTEN0, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN0
WR_DIS.ADC1_AVE_INIT_CODE_ATTEN1, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN1
WR_DIS.ADC1_AVE_INIT_CODE_ATTEN2, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN2
WR_DIS.ADC1_AVE_INIT_CODE_ATTEN3, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INIT_CODE_ATTEN3
WR_DIS.ADC1_HI_DOUT_ATTEN0, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN0
WR_DIS.ADC1_HI_DOUT_ATTEN1, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN1
WR_DIS.ADC1_HI_DOUT_ATTEN2, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN2
WR_DIS.ADC1_HI_DOUT_ATTEN3, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN3
WR_DIS.ADC1_CH0_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_CH0_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH1_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_CH1_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH2_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_CH2_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH3_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_CH3_ATTEN0_INITCODE_DIFF
WR_DIS.BLOCK_USR_DATA, EFUSE_BLK0, 22, 1, [WR_DIS.USER_DATA] wr_dis of BLOCK_USR_DATA
WR_DIS.CUSTOM_MAC, EFUSE_BLK0, 22, 1, [WR_DIS.MAC_CUSTOM WR_DIS.USER_DATA_MAC_CUSTOM] wr_dis of CUSTOM_MAC
WR_DIS.BLOCK_KEY0, EFUSE_BLK0, 23, 1, [WR_DIS.KEY0] wr_dis of BLOCK_KEY0
@ -143,6 +157,20 @@ PSRAM_VENDOR, EFUSE_BLK1, 86, 2, [] PSRAM
TEMP, EFUSE_BLK1, 88, 2, [] Temperature
PKG_VERSION, EFUSE_BLK1, 90, 3, [] Package version
OPTIONAL_UNIQUE_ID, EFUSE_BLK2, 0, 128, [] Optional unique 128-bit ID
TEMPERATURE_SENSOR, EFUSE_BLK2, 128, 9, [] Temperature calibration data
OCODE, EFUSE_BLK2, 137, 8, [] ADC OCode calibration
ADC1_AVE_INIT_CODE_ATTEN0, EFUSE_BLK2, 145, 10, [] Average initcode of ADC1 atten0
ADC1_AVE_INIT_CODE_ATTEN1, EFUSE_BLK2, 155, 10, [] Average initcode of ADC1 atten1
ADC1_AVE_INIT_CODE_ATTEN2, EFUSE_BLK2, 165, 10, [] Average initcode of ADC1 atten2
ADC1_AVE_INIT_CODE_ATTEN3, EFUSE_BLK2, 175, 10, [] Average initcode of ADC1 atten3
ADC1_HI_DOUT_ATTEN0, EFUSE_BLK2, 185, 10, [] HI_DOUT of ADC1 atten0
ADC1_HI_DOUT_ATTEN1, EFUSE_BLK2, 195, 10, [] HI_DOUT of ADC1 atten1
ADC1_HI_DOUT_ATTEN2, EFUSE_BLK2, 205, 10, [] HI_DOUT of ADC1 atten2
ADC1_HI_DOUT_ATTEN3, EFUSE_BLK2, 215, 10, [] HI_DOUT of ADC1 atten3
ADC1_CH0_ATTEN0_INITCODE_DIFF, EFUSE_BLK2, 225, 4, [] Gap between ADC1 CH0 and average initcode
ADC1_CH1_ATTEN0_INITCODE_DIFF, EFUSE_BLK2, 229, 4, [] Gap between ADC1 CH1 and average initcode
ADC1_CH2_ATTEN0_INITCODE_DIFF, EFUSE_BLK2, 233, 4, [] Gap between ADC1 CH2 and average initcode
ADC1_CH3_ATTEN0_INITCODE_DIFF, EFUSE_BLK2, 237, 4, [] Gap between ADC1 CH3 and average initcode
USER_DATA, EFUSE_BLK3, 0, 256, [BLOCK_USR_DATA] User data
USER_DATA.MAC_CUSTOM, EFUSE_BLK3, 200, 48, [MAC_CUSTOM CUSTOM_MAC] Custom MAC
KEY0, EFUSE_BLK4, 0, 256, [BLOCK_KEY0] Key0 or user data

Can't render this file because it contains an unexpected character in line 8 and column 53.

View File

@ -10,7 +10,7 @@ extern "C" {
#include "esp_efuse.h"
// md5_digest_table 52aee23d9256003919a3d01945678355
// md5_digest_table af9aaa79feb0970d90f35360a5113f03
// This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY.
// If you want to change some fields, you need to change esp_efuse_table.csv file
// then run `efuse_common_table` or `efuse_custom_table` command it will generate this file.
@ -79,6 +79,20 @@ extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_TEMP[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_PKG_VERSION[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SYS_DATA_PART1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_OPTIONAL_UNIQUE_ID[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_TEMPERATURE_SENSOR[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_OCODE[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INIT_CODE_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INIT_CODE_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INIT_CODE_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INIT_CODE_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH0_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH1_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH2_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH3_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLOCK_USR_DATA[];
#define ESP_EFUSE_WR_DIS_USER_DATA ESP_EFUSE_WR_DIS_BLOCK_USR_DATA
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_CUSTOM_MAC[];
@ -175,6 +189,20 @@ extern const esp_efuse_desc_t* ESP_EFUSE_PSRAM_VENDOR[];
extern const esp_efuse_desc_t* ESP_EFUSE_TEMP[];
extern const esp_efuse_desc_t* ESP_EFUSE_PKG_VERSION[];
extern const esp_efuse_desc_t* ESP_EFUSE_OPTIONAL_UNIQUE_ID[];
extern const esp_efuse_desc_t* ESP_EFUSE_TEMPERATURE_SENSOR[];
extern const esp_efuse_desc_t* ESP_EFUSE_OCODE[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INIT_CODE_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INIT_CODE_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INIT_CODE_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INIT_CODE_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH0_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH1_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH2_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH3_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_USER_DATA[];
#define ESP_EFUSE_BLOCK_USR_DATA ESP_EFUSE_USER_DATA
extern const esp_efuse_desc_t* ESP_EFUSE_USER_DATA_MAC_CUSTOM[];

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
# this will generate new source files, next rebuild all the sources.
# !!!!!!!!!!! #
# This file was generated by regtools.py based on the efuses.yaml file with the version: d4a48929387e281bd05db8cfb3a85f60
# This file was generated by regtools.py based on the efuses.yaml file with the version: 73787d3f5ae45b80abca925a7562120b
WR_DIS, EFUSE_BLK0, 0, 32, [] Disable programming of individual eFuses
WR_DIS.RD_DIS, EFUSE_BLK0, 0, 1, [] wr_dis of RD_DIS
@ -79,7 +79,35 @@ WR_DIS.TEMP, EFUSE_BLK0, 20, 1, [] wr_dis
WR_DIS.PSRAM_VENDOR, EFUSE_BLK0, 20, 1, [] wr_dis of PSRAM_VENDOR
WR_DIS.PKG_VERSION, EFUSE_BLK0, 20, 1, [] wr_dis of PKG_VERSION
WR_DIS.SYS_DATA_PART1, EFUSE_BLK0, 21, 1, [] wr_dis of BLOCK2
WR_DIS.LDO_VO1_DREF, EFUSE_BLK0, 20, 1, [] wr_dis of LDO_VO1_DREF
WR_DIS.LDO_VO2_DREF, EFUSE_BLK0, 20, 1, [] wr_dis of LDO_VO2_DREF
WR_DIS.LDO_VO1_MUL, EFUSE_BLK0, 20, 1, [] wr_dis of LDO_VO1_MUL
WR_DIS.LDO_VO2_MUL, EFUSE_BLK0, 20, 1, [] wr_dis of LDO_VO2_MUL
WR_DIS.LDO_VO3_K, EFUSE_BLK0, 20, 1, [] wr_dis of LDO_VO3_K
WR_DIS.LDO_VO3_VOS, EFUSE_BLK0, 20, 1, [] wr_dis of LDO_VO3_VOS
WR_DIS.LDO_VO3_C, EFUSE_BLK0, 20, 1, [] wr_dis of LDO_VO3_C
WR_DIS.LDO_VO4_K, EFUSE_BLK0, 20, 1, [] wr_dis of LDO_VO4_K
WR_DIS.LDO_VO4_VOS, EFUSE_BLK0, 20, 1, [] wr_dis of LDO_VO4_VOS
WR_DIS.LDO_VO4_C, EFUSE_BLK0, 20, 1, [] wr_dis of LDO_VO4_C
WR_DIS.ACTIVE_HP_DBIAS, EFUSE_BLK0, 20, 1, [] wr_dis of ACTIVE_HP_DBIAS
WR_DIS.ACTIVE_LP_DBIAS, EFUSE_BLK0, 20, 1, [] wr_dis of ACTIVE_LP_DBIAS
WR_DIS.LSLP_HP_DBIAS, EFUSE_BLK0, 20, 1, [] wr_dis of LSLP_HP_DBIAS
WR_DIS.DSLP_DBG, EFUSE_BLK0, 20, 1, [] wr_dis of DSLP_DBG
WR_DIS.DSLP_LP_DBIAS, EFUSE_BLK0, 20, 1, [] wr_dis of DSLP_LP_DBIAS
WR_DIS.LP_DCDC_DBIAS_VOL_GAP, EFUSE_BLK0, 20, 1, [] wr_dis of LP_DCDC_DBIAS_VOL_GAP
WR_DIS.OPTIONAL_UNIQUE_ID, EFUSE_BLK0, 21, 1, [] wr_dis of OPTIONAL_UNIQUE_ID
WR_DIS.ADC1_AVE_INITCODE_ATTEN0, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INITCODE_ATTEN0
WR_DIS.ADC1_AVE_INITCODE_ATTEN1, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INITCODE_ATTEN1
WR_DIS.ADC1_AVE_INITCODE_ATTEN2, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INITCODE_ATTEN2
WR_DIS.ADC1_AVE_INITCODE_ATTEN3, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_AVE_INITCODE_ATTEN3
WR_DIS.ADC2_AVE_INITCODE_ATTEN0, EFUSE_BLK0, 21, 1, [] wr_dis of ADC2_AVE_INITCODE_ATTEN0
WR_DIS.ADC2_AVE_INITCODE_ATTEN1, EFUSE_BLK0, 21, 1, [] wr_dis of ADC2_AVE_INITCODE_ATTEN1
WR_DIS.ADC2_AVE_INITCODE_ATTEN2, EFUSE_BLK0, 21, 1, [] wr_dis of ADC2_AVE_INITCODE_ATTEN2
WR_DIS.ADC2_AVE_INITCODE_ATTEN3, EFUSE_BLK0, 21, 1, [] wr_dis of ADC2_AVE_INITCODE_ATTEN3
WR_DIS.ADC1_HI_DOUT_ATTEN0, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN0
WR_DIS.ADC1_HI_DOUT_ATTEN1, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN1
WR_DIS.ADC1_HI_DOUT_ATTEN2, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN2
WR_DIS.ADC1_HI_DOUT_ATTEN3, EFUSE_BLK0, 21, 1, [] wr_dis of ADC1_HI_DOUT_ATTEN3
WR_DIS.BLOCK_USR_DATA, EFUSE_BLK0, 22, 1, [WR_DIS.USER_DATA] wr_dis of BLOCK_USR_DATA
WR_DIS.CUSTOM_MAC, EFUSE_BLK0, 22, 1, [WR_DIS.MAC_CUSTOM WR_DIS.USER_DATA_MAC_CUSTOM] wr_dis of CUSTOM_MAC
WR_DIS.BLOCK_KEY0, EFUSE_BLK0, 23, 1, [WR_DIS.KEY0] wr_dis of BLOCK_KEY0
@ -89,6 +117,25 @@ WR_DIS.BLOCK_KEY3, EFUSE_BLK0, 26, 1, [WR_DIS.K
WR_DIS.BLOCK_KEY4, EFUSE_BLK0, 27, 1, [WR_DIS.KEY4] wr_dis of BLOCK_KEY4
WR_DIS.BLOCK_KEY5, EFUSE_BLK0, 28, 1, [WR_DIS.KEY5] wr_dis of BLOCK_KEY5
WR_DIS.BLOCK_SYS_DATA2, EFUSE_BLK0, 29, 1, [WR_DIS.SYS_DATA_PART2] wr_dis of BLOCK_SYS_DATA2
WR_DIS.ADC2_HI_DOUT_ATTEN0, EFUSE_BLK0, 29, 1, [] wr_dis of ADC2_HI_DOUT_ATTEN0
WR_DIS.ADC2_HI_DOUT_ATTEN1, EFUSE_BLK0, 29, 1, [] wr_dis of ADC2_HI_DOUT_ATTEN1
WR_DIS.ADC2_HI_DOUT_ATTEN2, EFUSE_BLK0, 29, 1, [] wr_dis of ADC2_HI_DOUT_ATTEN2
WR_DIS.ADC2_HI_DOUT_ATTEN3, EFUSE_BLK0, 29, 1, [] wr_dis of ADC2_HI_DOUT_ATTEN3
WR_DIS.ADC1_CH0_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC1_CH0_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH1_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC1_CH1_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH2_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC1_CH2_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH3_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC1_CH3_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH4_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC1_CH4_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH5_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC1_CH5_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH6_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC1_CH6_ATTEN0_INITCODE_DIFF
WR_DIS.ADC1_CH7_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC1_CH7_ATTEN0_INITCODE_DIFF
WR_DIS.ADC2_CH0_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC2_CH0_ATTEN0_INITCODE_DIFF
WR_DIS.ADC2_CH1_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC2_CH1_ATTEN0_INITCODE_DIFF
WR_DIS.ADC2_CH2_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC2_CH2_ATTEN0_INITCODE_DIFF
WR_DIS.ADC2_CH3_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC2_CH3_ATTEN0_INITCODE_DIFF
WR_DIS.ADC2_CH4_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC2_CH4_ATTEN0_INITCODE_DIFF
WR_DIS.ADC2_CH5_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 29, 1, [] wr_dis of ADC2_CH5_ATTEN0_INITCODE_DIFF
WR_DIS.TEMPERATURE_SENSOR, EFUSE_BLK0, 29, 1, [] wr_dis of TEMPERATURE_SENSOR
WR_DIS.USB_DEVICE_EXCHG_PINS, EFUSE_BLK0, 30, 1, [] wr_dis of USB_DEVICE_EXCHG_PINS
WR_DIS.USB_OTG11_EXCHG_PINS, EFUSE_BLK0, 30, 1, [] wr_dis of USB_OTG11_EXCHG_PINS
WR_DIS.USB_PHY_SEL, EFUSE_BLK0, 30, 1, [] wr_dis of USB_PHY_SEL
@ -101,6 +148,25 @@ RD_DIS.BLOCK_KEY3, EFUSE_BLK0, 35, 1, [RD_DIS.K
RD_DIS.BLOCK_KEY4, EFUSE_BLK0, 36, 1, [RD_DIS.KEY4] rd_dis of BLOCK_KEY4
RD_DIS.BLOCK_KEY5, EFUSE_BLK0, 37, 1, [RD_DIS.KEY5] rd_dis of BLOCK_KEY5
RD_DIS.BLOCK_SYS_DATA2, EFUSE_BLK0, 38, 1, [RD_DIS.SYS_DATA_PART2] rd_dis of BLOCK_SYS_DATA2
RD_DIS.ADC2_HI_DOUT_ATTEN0, EFUSE_BLK0, 38, 1, [] rd_dis of ADC2_HI_DOUT_ATTEN0
RD_DIS.ADC2_HI_DOUT_ATTEN1, EFUSE_BLK0, 38, 1, [] rd_dis of ADC2_HI_DOUT_ATTEN1
RD_DIS.ADC2_HI_DOUT_ATTEN2, EFUSE_BLK0, 38, 1, [] rd_dis of ADC2_HI_DOUT_ATTEN2
RD_DIS.ADC2_HI_DOUT_ATTEN3, EFUSE_BLK0, 38, 1, [] rd_dis of ADC2_HI_DOUT_ATTEN3
RD_DIS.ADC1_CH0_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC1_CH0_ATTEN0_INITCODE_DIFF
RD_DIS.ADC1_CH1_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC1_CH1_ATTEN0_INITCODE_DIFF
RD_DIS.ADC1_CH2_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC1_CH2_ATTEN0_INITCODE_DIFF
RD_DIS.ADC1_CH3_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC1_CH3_ATTEN0_INITCODE_DIFF
RD_DIS.ADC1_CH4_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC1_CH4_ATTEN0_INITCODE_DIFF
RD_DIS.ADC1_CH5_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC1_CH5_ATTEN0_INITCODE_DIFF
RD_DIS.ADC1_CH6_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC1_CH6_ATTEN0_INITCODE_DIFF
RD_DIS.ADC1_CH7_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC1_CH7_ATTEN0_INITCODE_DIFF
RD_DIS.ADC2_CH0_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC2_CH0_ATTEN0_INITCODE_DIFF
RD_DIS.ADC2_CH1_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC2_CH1_ATTEN0_INITCODE_DIFF
RD_DIS.ADC2_CH2_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC2_CH2_ATTEN0_INITCODE_DIFF
RD_DIS.ADC2_CH3_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC2_CH3_ATTEN0_INITCODE_DIFF
RD_DIS.ADC2_CH4_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC2_CH4_ATTEN0_INITCODE_DIFF
RD_DIS.ADC2_CH5_ATTEN0_INITCODE_DIFF, EFUSE_BLK0, 38, 1, [] rd_dis of ADC2_CH5_ATTEN0_INITCODE_DIFF
RD_DIS.TEMPERATURE_SENSOR, EFUSE_BLK0, 38, 1, [] rd_dis of TEMPERATURE_SENSOR
USB_DEVICE_EXCHG_PINS, EFUSE_BLK0, 39, 1, [] Enable usb device exchange pins of D+ and D-
USB_OTG11_EXCHG_PINS, EFUSE_BLK0, 40, 1, [] Enable usb otg11 exchange pins of D+ and D-
DIS_USB_JTAG, EFUSE_BLK0, 41, 1, [] Represents whether the function of usb switch to jtag is disabled or enabled. 1: disabled. 0: enabled
@ -177,7 +243,35 @@ PSRAM_CAP, EFUSE_BLK1, 77, 3, [] PSRAM
TEMP, EFUSE_BLK1, 80, 2, [] Operating temperature of the ESP chip
PSRAM_VENDOR, EFUSE_BLK1, 82, 2, [] PSRAM vendor
PKG_VERSION, EFUSE_BLK1, 84, 3, [] Package version
LDO_VO1_DREF, EFUSE_BLK1, 88, 4, [] Output VO1 parameter
LDO_VO2_DREF, EFUSE_BLK1, 92, 4, [] Output VO2 parameter
LDO_VO1_MUL, EFUSE_BLK1, 96, 3, [] Output VO1 parameter
LDO_VO2_MUL, EFUSE_BLK1, 99, 3, [] Output VO2 parameter
LDO_VO3_K, EFUSE_BLK1, 102, 8, [] Output VO3 calibration parameter
LDO_VO3_VOS, EFUSE_BLK1, 110, 6, [] Output VO3 calibration parameter
LDO_VO3_C, EFUSE_BLK1, 116, 6, [] Output VO3 calibration parameter
LDO_VO4_K, EFUSE_BLK1, 122, 8, [] Output VO4 calibration parameter
LDO_VO4_VOS, EFUSE_BLK1, 130, 6, [] Output VO4 calibration parameter
LDO_VO4_C, EFUSE_BLK1, 136, 6, [] Output VO4 calibration parameter
ACTIVE_HP_DBIAS, EFUSE_BLK1, 144, 4, [] Active HP DBIAS of fixed voltage
ACTIVE_LP_DBIAS, EFUSE_BLK1, 148, 4, [] Active LP DBIAS of fixed voltage
LSLP_HP_DBIAS, EFUSE_BLK1, 152, 4, [] LSLP HP DBIAS of fixed voltage
DSLP_DBG, EFUSE_BLK1, 156, 4, [] DSLP BDG of fixed voltage
DSLP_LP_DBIAS, EFUSE_BLK1, 160, 5, [] DSLP LP DBIAS of fixed voltage
LP_DCDC_DBIAS_VOL_GAP, EFUSE_BLK1, 165, 5, [] DBIAS gap between LP and DCDC
OPTIONAL_UNIQUE_ID, EFUSE_BLK2, 0, 128, [] Optional unique 128-bit ID
ADC1_AVE_INITCODE_ATTEN0, EFUSE_BLK2, 128, 10, [] Average initcode of ADC1 atten0
ADC1_AVE_INITCODE_ATTEN1, EFUSE_BLK2, 138, 10, [] Average initcode of ADC1 atten1
ADC1_AVE_INITCODE_ATTEN2, EFUSE_BLK2, 148, 10, [] Average initcode of ADC1 atten2
ADC1_AVE_INITCODE_ATTEN3, EFUSE_BLK2, 158, 10, [] Average initcode of ADC1 atten3
ADC2_AVE_INITCODE_ATTEN0, EFUSE_BLK2, 168, 10, [] Average initcode of ADC2 atten0
ADC2_AVE_INITCODE_ATTEN1, EFUSE_BLK2, 178, 10, [] Average initcode of ADC2 atten1
ADC2_AVE_INITCODE_ATTEN2, EFUSE_BLK2, 188, 10, [] Average initcode of ADC2 atten2
ADC2_AVE_INITCODE_ATTEN3, EFUSE_BLK2, 198, 10, [] Average initcode of ADC2 atten3
ADC1_HI_DOUT_ATTEN0, EFUSE_BLK2, 208, 10, [] HI_DOUT of ADC1 atten0
ADC1_HI_DOUT_ATTEN1, EFUSE_BLK2, 218, 10, [] HI_DOUT of ADC1 atten1
ADC1_HI_DOUT_ATTEN2, EFUSE_BLK2, 228, 10, [] HI_DOUT of ADC1 atten2
ADC1_HI_DOUT_ATTEN3, EFUSE_BLK2, 238, 10, [] HI_DOUT of ADC1 atten3
USER_DATA, EFUSE_BLK3, 0, 256, [BLOCK_USR_DATA] User data
USER_DATA.MAC_CUSTOM, EFUSE_BLK3, 200, 48, [MAC_CUSTOM CUSTOM_MAC] Custom MAC
KEY0, EFUSE_BLK4, 0, 256, [BLOCK_KEY0] Key0 or user data
@ -186,4 +280,22 @@ KEY2, EFUSE_BLK6, 0, 256, [BLOCK_KE
KEY3, EFUSE_BLK7, 0, 256, [BLOCK_KEY3] Key3 or user data
KEY4, EFUSE_BLK8, 0, 256, [BLOCK_KEY4] Key4 or user data
KEY5, EFUSE_BLK9, 0, 256, [BLOCK_KEY5] Key5 or user data
SYS_DATA_PART2, EFUSE_BLK10, 0, 256, [BLOCK_SYS_DATA2] System data part 2 (reserved)
ADC2_HI_DOUT_ATTEN0, EFUSE_BLK10, 0, 10, [] HI_DOUT of ADC2 atten0
ADC2_HI_DOUT_ATTEN1, EFUSE_BLK10, 10, 10, [] HI_DOUT of ADC2 atten1
ADC2_HI_DOUT_ATTEN2, EFUSE_BLK10, 20, 10, [] HI_DOUT of ADC2 atten2
ADC2_HI_DOUT_ATTEN3, EFUSE_BLK10, 30, 10, [] HI_DOUT of ADC2 atten3
ADC1_CH0_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 40, 4, [] Gap between ADC1_ch0 and average initcode
ADC1_CH1_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 44, 4, [] Gap between ADC1_ch1 and average initcode
ADC1_CH2_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 48, 4, [] Gap between ADC1_ch2 and average initcode
ADC1_CH3_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 52, 4, [] Gap between ADC1_ch3 and average initcode
ADC1_CH4_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 56, 4, [] Gap between ADC1_ch4 and average initcode
ADC1_CH5_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 60, 4, [] Gap between ADC1_ch5 and average initcode
ADC1_CH6_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 64, 4, [] Gap between ADC1_ch6 and average initcode
ADC1_CH7_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 68, 4, [] Gap between ADC1_ch7 and average initcode
ADC2_CH0_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 72, 4, [] Gap between ADC2_ch0 and average initcode
ADC2_CH1_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 76, 4, [] Gap between ADC2_ch1 and average initcode
ADC2_CH2_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 80, 4, [] Gap between ADC2_ch2 and average initcode
ADC2_CH3_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 84, 4, [] Gap between ADC2_ch3 and average initcode
ADC2_CH4_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 88, 4, [] Gap between ADC2_ch4 and average initcode
ADC2_CH5_ATTEN0_INITCODE_DIFF, EFUSE_BLK10, 92, 4, [] Gap between ADC2_ch5 and average initcode
TEMPERATURE_SENSOR, EFUSE_BLK10, 96, 9, [] Temperature calibration data

Can't render this file because it contains an unexpected character in line 8 and column 53.

View File

@ -10,7 +10,7 @@ extern "C" {
#include "esp_efuse.h"
// md5_digest_table 0d4e1f49db99de4dd9d3eac8d8e6078b
// md5_digest_table c56ed98dde7a08c8f70d57a01faba96a
// This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY.
// If you want to change some fields, you need to change esp_efuse_table.csv file
// then run `efuse_common_table` or `efuse_custom_table` command it will generate this file.
@ -92,7 +92,35 @@ extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_TEMP[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_PSRAM_VENDOR[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_PKG_VERSION[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SYS_DATA_PART1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LDO_VO1_DREF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LDO_VO2_DREF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LDO_VO1_MUL[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LDO_VO2_MUL[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LDO_VO3_K[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LDO_VO3_VOS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LDO_VO3_C[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LDO_VO4_K[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LDO_VO4_VOS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LDO_VO4_C[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ACTIVE_HP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ACTIVE_LP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LSLP_HP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_DSLP_DBG[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_DSLP_LP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_LP_DCDC_DBIAS_VOL_GAP[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_OPTIONAL_UNIQUE_ID[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_AVE_INITCODE_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_AVE_INITCODE_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_AVE_INITCODE_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_AVE_INITCODE_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_AVE_INITCODE_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_HI_DOUT_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLOCK_USR_DATA[];
#define ESP_EFUSE_WR_DIS_USER_DATA ESP_EFUSE_WR_DIS_BLOCK_USR_DATA
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_CUSTOM_MAC[];
@ -112,6 +140,25 @@ extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLOCK_KEY5[];
#define ESP_EFUSE_WR_DIS_KEY5 ESP_EFUSE_WR_DIS_BLOCK_KEY5
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLOCK_SYS_DATA2[];
#define ESP_EFUSE_WR_DIS_SYS_DATA_PART2 ESP_EFUSE_WR_DIS_BLOCK_SYS_DATA2
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_HI_DOUT_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_HI_DOUT_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_HI_DOUT_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_HI_DOUT_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH0_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH1_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH2_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH3_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH4_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH5_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH6_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC1_CH7_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_CH0_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_CH1_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_CH2_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_CH3_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_CH4_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_ADC2_CH5_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_TEMPERATURE_SENSOR[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_USB_DEVICE_EXCHG_PINS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_USB_OTG11_EXCHG_PINS[];
extern const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_USB_PHY_SEL[];
@ -131,6 +178,25 @@ extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_BLOCK_KEY5[];
#define ESP_EFUSE_RD_DIS_KEY5 ESP_EFUSE_RD_DIS_BLOCK_KEY5
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_BLOCK_SYS_DATA2[];
#define ESP_EFUSE_RD_DIS_SYS_DATA_PART2 ESP_EFUSE_RD_DIS_BLOCK_SYS_DATA2
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC2_HI_DOUT_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC2_HI_DOUT_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC2_HI_DOUT_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC2_HI_DOUT_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC1_CH0_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC1_CH1_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC1_CH2_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC1_CH3_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC1_CH4_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC1_CH5_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC1_CH6_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC1_CH7_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC2_CH0_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC2_CH1_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC2_CH2_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC2_CH3_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC2_CH4_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_ADC2_CH5_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_TEMPERATURE_SENSOR[];
extern const esp_efuse_desc_t* ESP_EFUSE_USB_DEVICE_EXCHG_PINS[];
extern const esp_efuse_desc_t* ESP_EFUSE_USB_OTG11_EXCHG_PINS[];
extern const esp_efuse_desc_t* ESP_EFUSE_DIS_USB_JTAG[];
@ -209,7 +275,35 @@ extern const esp_efuse_desc_t* ESP_EFUSE_PSRAM_CAP[];
extern const esp_efuse_desc_t* ESP_EFUSE_TEMP[];
extern const esp_efuse_desc_t* ESP_EFUSE_PSRAM_VENDOR[];
extern const esp_efuse_desc_t* ESP_EFUSE_PKG_VERSION[];
extern const esp_efuse_desc_t* ESP_EFUSE_LDO_VO1_DREF[];
extern const esp_efuse_desc_t* ESP_EFUSE_LDO_VO2_DREF[];
extern const esp_efuse_desc_t* ESP_EFUSE_LDO_VO1_MUL[];
extern const esp_efuse_desc_t* ESP_EFUSE_LDO_VO2_MUL[];
extern const esp_efuse_desc_t* ESP_EFUSE_LDO_VO3_K[];
extern const esp_efuse_desc_t* ESP_EFUSE_LDO_VO3_VOS[];
extern const esp_efuse_desc_t* ESP_EFUSE_LDO_VO3_C[];
extern const esp_efuse_desc_t* ESP_EFUSE_LDO_VO4_K[];
extern const esp_efuse_desc_t* ESP_EFUSE_LDO_VO4_VOS[];
extern const esp_efuse_desc_t* ESP_EFUSE_LDO_VO4_C[];
extern const esp_efuse_desc_t* ESP_EFUSE_ACTIVE_HP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_ACTIVE_LP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_LSLP_HP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_DSLP_DBG[];
extern const esp_efuse_desc_t* ESP_EFUSE_DSLP_LP_DBIAS[];
extern const esp_efuse_desc_t* ESP_EFUSE_LP_DCDC_DBIAS_VOL_GAP[];
extern const esp_efuse_desc_t* ESP_EFUSE_OPTIONAL_UNIQUE_ID[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_AVE_INITCODE_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_AVE_INITCODE_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_AVE_INITCODE_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_AVE_INITCODE_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_AVE_INITCODE_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_HI_DOUT_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_USER_DATA[];
#define ESP_EFUSE_BLOCK_USR_DATA ESP_EFUSE_USER_DATA
extern const esp_efuse_desc_t* ESP_EFUSE_USER_DATA_MAC_CUSTOM[];
@ -227,8 +321,25 @@ extern const esp_efuse_desc_t* ESP_EFUSE_KEY4[];
#define ESP_EFUSE_BLOCK_KEY4 ESP_EFUSE_KEY4
extern const esp_efuse_desc_t* ESP_EFUSE_KEY5[];
#define ESP_EFUSE_BLOCK_KEY5 ESP_EFUSE_KEY5
extern const esp_efuse_desc_t* ESP_EFUSE_SYS_DATA_PART2[];
#define ESP_EFUSE_BLOCK_SYS_DATA2 ESP_EFUSE_SYS_DATA_PART2
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_HI_DOUT_ATTEN0[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_HI_DOUT_ATTEN1[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_HI_DOUT_ATTEN2[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_HI_DOUT_ATTEN3[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH0_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH1_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH2_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH3_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH4_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH5_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH6_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC1_CH7_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_CH0_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_CH1_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_CH2_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_CH3_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_CH4_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_ADC2_CH5_ATTEN0_INITCODE_DIFF[];
extern const esp_efuse_desc_t* ESP_EFUSE_TEMPERATURE_SENSOR[];
#ifdef __cplusplus
}

View File

@ -294,6 +294,22 @@ esp_err_t adc_continuous_start(adc_continuous_handle_t handle)
}
#endif //#if SOC_ADC_ARBITER_SUPPORTED
#if SOC_ADC_MONITOR_SUPPORTED
adc_ll_digi_monitor_clear_intr();
for (int i = 0; i < SOC_ADC_DIGI_MONITOR_NUM; i++) {
adc_monitor_t *monitor_ctx = handle->adc_monitor[i];
if (monitor_ctx) {
// config monitor hardware
adc_hal_digi_monitor_set_thres(monitor_ctx->monitor_id, monitor_ctx->config.adc_unit, monitor_ctx->config.channel, monitor_ctx->config.h_threshold, monitor_ctx->config.l_threshold);
// if monitor not enabled now, just using monitor api later
if (monitor_ctx->fsm == ADC_MONITOR_FSM_ENABLED) {
// restore the started FSM
adc_ll_digi_monitor_user_start(monitor_ctx->monitor_id, ((monitor_ctx->config.h_threshold >= 0) || (monitor_ctx->config.l_threshold >= 0)));
}
}
}
#endif //#if SOC_ADC_MONITOR_SUPPORTED
if (handle->use_adc1) {
adc_hal_set_controller(ADC_UNIT_1, ADC_HAL_CONTINUOUS_READ_MODE);
}

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -173,10 +173,6 @@ esp_err_t adc_new_continuous_monitor(adc_continuous_handle_t handle, const adc_m
ESP_GOTO_ON_ERROR(adc_monitor_intr_alloc(), intr_err, MNTOR_TAG, "esp intr alloc failed");
}
// config hardware
adc_ll_digi_monitor_clear_intr();
adc_ll_digi_monitor_set_thres(monitor_ctx->monitor_id, monitor_ctx->config.adc_unit, monitor_ctx->config.channel, monitor_ctx->config.h_threshold, monitor_ctx->config.l_threshold);
*ret_handle = monitor_ctx;
return ESP_OK;
@ -191,7 +187,6 @@ esp_err_t adc_continuous_monitor_register_event_callbacks(adc_monitor_handle_t m
{
ESP_RETURN_ON_FALSE(monitor_handle && cbs, ESP_ERR_INVALID_ARG, MNTOR_TAG, "invalid argument: null pointer");
ESP_RETURN_ON_FALSE(monitor_handle->fsm == ADC_MONITOR_FSM_INIT, ESP_ERR_INVALID_STATE, MNTOR_TAG, "monitor should be in init state");
ESP_RETURN_ON_FALSE(!(monitor_handle->cbs.on_over_high_thresh || monitor_handle->cbs.on_below_low_thresh), ESP_ERR_INVALID_STATE, MNTOR_TAG, "callbacks had been registered");
#if CONFIG_IDF_TARGET_ESP32S2
ESP_RETURN_ON_FALSE(!(cbs->on_below_low_thresh && cbs->on_over_high_thresh), ESP_ERR_NOT_SUPPORTED, MNTOR_TAG, "ESP32S2 support only one threshold");
#endif
@ -216,45 +211,31 @@ esp_err_t adc_continuous_monitor_register_event_callbacks(adc_monitor_handle_t m
esp_err_t adc_continuous_monitor_enable(adc_monitor_handle_t monitor_handle)
{
ESP_RETURN_ON_FALSE(monitor_handle, ESP_ERR_INVALID_ARG, MNTOR_TAG, "invalid argument: null pointer");
ESP_RETURN_ON_FALSE(monitor_handle->fsm == ADC_MONITOR_FSM_INIT, ESP_ERR_INVALID_STATE, MNTOR_TAG, "monitor should be in init state");
ESP_RETURN_ON_FALSE_ISR(monitor_handle, ESP_ERR_INVALID_ARG, MNTOR_TAG, "invalid argument: null pointer");
ESP_RETURN_ON_FALSE_ISR(monitor_handle->fsm == ADC_MONITOR_FSM_INIT, ESP_ERR_INVALID_STATE, MNTOR_TAG, "monitor should be in init state");
// enable peripheral intr_ena
if ((monitor_handle->config.h_threshold >= 0)) {
adc_ll_digi_monitor_enable_intr(monitor_handle->monitor_id, ADC_MONITOR_MODE_HIGH, true);
}
if ((monitor_handle->config.l_threshold >= 0)) {
adc_ll_digi_monitor_enable_intr(monitor_handle->monitor_id, ADC_MONITOR_MODE_LOW, true);
}
adc_ll_digi_monitor_user_start(monitor_handle->monitor_id, true);
// start monitor
adc_ll_digi_monitor_user_start(monitor_handle->monitor_id, ((monitor_handle->config.h_threshold >= 0) || (monitor_handle->config.l_threshold >= 0)));
monitor_handle->fsm = ADC_MONITOR_FSM_ENABLED;
return esp_intr_enable(s_adc_monitor_platform.monitor_intr_handle);
return ESP_OK;
}
esp_err_t adc_continuous_monitor_disable(adc_monitor_handle_t monitor_handle)
{
ESP_RETURN_ON_FALSE(monitor_handle, ESP_ERR_INVALID_ARG, MNTOR_TAG, "invalid argument: null pointer");
ESP_RETURN_ON_FALSE(monitor_handle->fsm == ADC_MONITOR_FSM_ENABLED, ESP_ERR_INVALID_STATE, MNTOR_TAG, "monitor not in running");
// disable peripheral intr_ena
if ((monitor_handle->config.h_threshold >= 0)) {
adc_ll_digi_monitor_enable_intr(monitor_handle->monitor_id, ADC_MONITOR_MODE_HIGH, false);
}
if ((monitor_handle->config.l_threshold >= 0)) {
adc_ll_digi_monitor_enable_intr(monitor_handle->monitor_id, ADC_MONITOR_MODE_LOW, false);
}
ESP_RETURN_ON_FALSE_ISR(monitor_handle, ESP_ERR_INVALID_ARG, MNTOR_TAG, "invalid argument: null pointer");
ESP_RETURN_ON_FALSE_ISR(monitor_handle->fsm == ADC_MONITOR_FSM_ENABLED, ESP_ERR_INVALID_STATE, MNTOR_TAG, "monitor not in running");
// stop monitor
adc_ll_digi_monitor_user_start(monitor_handle->monitor_id, false);
monitor_handle->fsm = ADC_MONITOR_FSM_INIT;
return esp_intr_disable(s_adc_monitor_platform.monitor_intr_handle);
return ESP_OK;
}
esp_err_t adc_del_continuous_monitor(adc_monitor_handle_t monitor_handle)
{
ESP_RETURN_ON_FALSE(monitor_handle, ESP_ERR_INVALID_ARG, MNTOR_TAG, "invalid argument: null pointer");
ESP_RETURN_ON_FALSE((monitor_handle->fsm == ADC_MONITOR_FSM_INIT) && (s_adc_monitor_platform.continuous_ctx->fsm == ADC_FSM_INIT), \
ESP_ERR_INVALID_STATE, MNTOR_TAG, "monitor and ADC continuous driver should all be in init state");
ESP_ERR_INVALID_STATE, MNTOR_TAG, "monitor and ADC continuous driver should all stopped");
ESP_RETURN_ON_ERROR(s_adc_monitor_release(monitor_handle), MNTOR_TAG, "monitor not find or isn't in use");
for (int i = 0; i < SOC_ADC_DIGI_MONITOR_NUM; i++) {
@ -265,7 +246,7 @@ esp_err_t adc_del_continuous_monitor(adc_monitor_handle_t monitor_handle)
}
}
// If no monitor is using, the release intr handle as well
// If no monitor is using, then release intr handle as well
ESP_RETURN_ON_ERROR(esp_intr_free(s_adc_monitor_platform.monitor_intr_handle), MNTOR_TAG, "esp intr release failed\n");
s_adc_monitor_platform.monitor_intr_handle = NULL;
free(monitor_handle);

View File

@ -65,7 +65,8 @@ typedef struct {
esp_err_t adc_new_continuous_monitor(adc_continuous_handle_t handle, const adc_monitor_config_t *monitor_cfg, adc_monitor_handle_t *ret_handle);
/**
* @brief Register threshold interrupt callbacks for allocated monitor.
* @brief Register/Unregister threshold interrupt callbacks for allocated monitor.
* Passing `cbs` contain the NULL `over_high/below_low` will unregister relative callbacks.
*
* @param[in] monitor_handle Monitor handle
* @param[in] cbs Pointer to a adc_monitor_evt_cbs_t struct

View File

@ -382,9 +382,6 @@ TEST_CASE("ADC continuous monitor init_deinit", "[adc]")
TEST_ESP_OK(adc_del_continuous_monitor(monitor_handle_2));
TEST_ESP_ERR(ESP_ERR_INVALID_ARG, adc_del_continuous_monitor(monitor_handle_3));
//try register cbs again
TEST_ESP_ERR(ESP_ERR_INVALID_STATE, adc_continuous_monitor_register_event_callbacks(monitor_handle, &monitor_cb, &monitor_cb));
//try delete it when adc is running but monitor not running
TEST_ESP_OK(adc_continuous_start(handle));
TEST_ESP_ERR(ESP_ERR_INVALID_STATE, adc_del_continuous_monitor(monitor_handle));
@ -400,23 +397,8 @@ TEST_CASE("ADC continuous monitor init_deinit", "[adc]")
TEST_ESP_OK(adc_continuous_deinit(handle));
}
/**
* NOTE: To run this special feature test case, you need wire ADC channel pin you want to monit
* to a wave output pin defined below.
*
* +---------+
* | |
* | (adc)|------------+
* | | |
* | (wave)|------------+
* | |
* | ESP32 |
* +---------+
*
* or you can connect your signals from signal generator to ESP32 pin which you monitoring
**/
#define TEST_ADC_CHANNEL ADC_CHANNEL_0 //GPIO_1
#define TEST_WAVE_OUT_PIN GPIO_NUM_2 //GPIO_2
#if SOC_ADC_CALIBRATION_V1_SUPPORTED
#define TEST_ADC_CHANNEL ADC_CHANNEL_0
static uint32_t m1h_cnt, m1l_cnt;
bool IRAM_ATTR m1h_cb(adc_monitor_handle_t monitor_handle, const adc_monitor_evt_data_t *event_data, void *user_data)
@ -429,7 +411,7 @@ bool IRAM_ATTR m1l_cb(adc_monitor_handle_t monitor_handle, const adc_monitor_evt
m1l_cnt ++;
return false;
}
TEST_CASE("ADC continuous monitor functionary", "[adc][manual][ignore]")
TEST_CASE("ADC continuous monitor functionary", "[adc]")
{
adc_continuous_handle_t handle = NULL;
adc_continuous_handle_cfg_t adc_config = {
@ -462,9 +444,9 @@ TEST_CASE("ADC continuous monitor functionary", "[adc][manual][ignore]")
#if CONFIG_IDF_TARGET_ESP32S2
.h_threshold = -1, //S2 support only one threshold for one monitor
#else
.h_threshold = 3000,
.h_threshold = ADC_TEST_HIGH_VAL_DMA - (ADC_TEST_HIGH_VAL_DMA - ADC_TEST_LOW_VAL) / 4,
#endif
.l_threshold = 1000,
.l_threshold = ADC_TEST_LOW_VAL + (ADC_TEST_HIGH_VAL_DMA - ADC_TEST_LOW_VAL) / 4,
};
adc_monitor_evt_cbs_t monitor_cb = {
#if !CONFIG_IDF_TARGET_ESP32S2
@ -474,35 +456,40 @@ TEST_CASE("ADC continuous monitor functionary", "[adc][manual][ignore]")
};
TEST_ESP_OK(adc_new_continuous_monitor(handle, &adc_monitor_cfg, &monitor_handle));
TEST_ESP_OK(adc_continuous_monitor_register_event_callbacks(monitor_handle, &monitor_cb, NULL));
//config a pin to generate wave
gpio_config_t gpio_cfg = {
.pin_bit_mask = (1ULL << TEST_WAVE_OUT_PIN),
.mode = GPIO_MODE_INPUT_OUTPUT,
.pull_up_en = GPIO_PULLDOWN_ENABLE,
};
TEST_ESP_OK(gpio_config(&gpio_cfg));
TEST_ESP_OK(adc_continuous_monitor_enable(monitor_handle));
TEST_ESP_OK(adc_continuous_start(handle));
for (uint8_t i = 0; i < 8; i++) {
vTaskDelay(1000);
int adc_io;
adc_continuous_channel_to_io(ADC_UNIT_1, TEST_ADC_CHANNEL, &adc_io);
printf("Using ADC_CHANNEL_%d on GPIO%d\n", TEST_ADC_CHANNEL, adc_io);
// check monitor cb
printf("%d\t high_cnt %4ld\tlow_cnt %4ld\n", i, m1h_cnt, m1l_cnt);
if (gpio_get_level(TEST_WAVE_OUT_PIN)) {
// Test with internal gpio pull up/down, detail and order refer to `gpio_pull_mode_t`
// pull_up + pull_down to get half ADC convert
for (uint8_t i = 0; i < 8; i++) {
int pull_mode = i % GPIO_FLOATING;
gpio_set_pull_mode(adc_io, pull_mode);
vTaskDelay(10); // wait some time for GPIO level be stable
m1h_cnt = 0;
m1l_cnt = 0;
vTaskDelay(1000); //time to count monitor interrupt
printf("%d\t %s\t high_cnt %4ld\tlow_cnt %4ld\n", i, (pull_mode == 0) ? "up " : (pull_mode == 1) ? "down" : "mid ", m1h_cnt, m1l_cnt);
switch (pull_mode) {
case GPIO_PULLUP_ONLY:
#if !CONFIG_IDF_TARGET_ESP32S2
// TEST_ASSERT_UINT32_WITHIN(SOC_ADC_SAMPLE_FREQ_THRES_LOW*0.1, SOC_ADC_SAMPLE_FREQ_THRES_LOW, m1h_cnt);
// TEST_ASSERT_LESS_THAN_UINT32(5, m1l_cnt); //Actually, it will still encountered 1~2 times because hardware run very quickly
TEST_ASSERT_UINT32_WITHIN(SOC_ADC_SAMPLE_FREQ_THRES_LOW * 0.1, SOC_ADC_SAMPLE_FREQ_THRES_LOW, m1h_cnt);
TEST_ASSERT_EQUAL(0, m1l_cnt); //low limit should NOT triggrted when pull_up
#endif
m1h_cnt = 0;
gpio_set_level(TEST_WAVE_OUT_PIN, 0);
} else {
break;
case GPIO_PULLDOWN_ONLY:
TEST_ASSERT_UINT32_WITHIN(SOC_ADC_SAMPLE_FREQ_THRES_LOW * 0.1, SOC_ADC_SAMPLE_FREQ_THRES_LOW, m1l_cnt);
TEST_ASSERT_LESS_THAN_UINT32(5, m1h_cnt); //Actually, it will still encountered 1~2 times because hardware run very quickly
m1l_cnt = 0;
gpio_set_level(TEST_WAVE_OUT_PIN, 1);
TEST_ASSERT_EQUAL(0, m1h_cnt);
break;
case GPIO_PULLUP_PULLDOWN:
TEST_ASSERT_EQUAL(0, m1h_cnt); //half votage, both limit should NOT triggered
TEST_ASSERT_EQUAL(0, m1l_cnt);
break;
default: printf("unknown gpio pull mode !!!\n");
}
}
TEST_ESP_OK(adc_continuous_stop(handle));
@ -510,5 +497,5 @@ TEST_CASE("ADC continuous monitor functionary", "[adc][manual][ignore]")
TEST_ESP_OK(adc_del_continuous_monitor(monitor_handle));
TEST_ESP_OK(adc_continuous_deinit(handle));
}
#endif //SOC_ADC_CALIBRATION_V1_SUPPORTED
#endif //SOC_ADC_MONITOR_SUPPORTED && CONFIG_SOC_ADC_DMA_SUPPORTED

View File

@ -59,6 +59,7 @@ const __attribute__((weak)) __attribute__((section(".rodata_desc"))) esp_app_de
#endif
.min_efuse_blk_rev_full = CONFIG_ESP_EFUSE_BLOCK_REV_MIN_FULL,
.max_efuse_blk_rev_full = CONFIG_ESP_EFUSE_BLOCK_REV_MAX_FULL,
.mmu_page_size = 31 - __builtin_clz(CONFIG_MMU_PAGE_SIZE),
};
#ifndef CONFIG_APP_EXCLUDE_PROJECT_VER_VAR

View File

@ -35,7 +35,9 @@ typedef struct {
uint8_t app_elf_sha256[32]; /*!< sha256 of elf file */
uint16_t min_efuse_blk_rev_full; /*!< Minimal eFuse block revision supported by image, in format: major * 100 + minor */
uint16_t max_efuse_blk_rev_full; /*!< Maximal eFuse block revision supported by image, in format: major * 100 + minor */
uint32_t reserv2[19]; /*!< reserv2 */
uint8_t mmu_page_size; /*!< MMU page size in log base 2 format */
uint8_t reserv3[3]; /*!< reserv3 */
uint32_t reserv2[18]; /*!< reserv2 */
} esp_app_desc_t;
/** @cond */

View File

@ -18,6 +18,8 @@ typedef enum {
void esp_coex_ieee802154_txrx_pti_set(ieee802154_coex_event_t event);
void esp_coex_ieee802154_ack_pti_set(ieee802154_coex_event_t event);
void esp_coex_ieee802154_coex_break_notify(void);
void esp_coex_ieee802154_extcoex_tx_stage(void);
void esp_coex_ieee802154_extcoex_rx_stage(void);
#endif
#endif

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