zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.94k stars 6.66k forks source link

ESP32s3 BLE peripheral hids sample - BLE assert ke_mem.c #81671

Open jeronimoagullo opened 5 days ago

jeronimoagullo commented 5 days ago

Describe the bug I am trying to check out the samples/bluetooth/peripheral_hids sample with the `esp32s3

The sample builds successfully and starts advertising correctly. My host device (PC) can find the esp32s3 Zephyr device. However, when I try to connect, the error BLE assert ke_mem.c 267, param 00000000 00000000 raised freezing the esp32s3 board. I don't know ho to figure out the reason since I cannot find the ke_mem.c file.

NOTE: The same result if I define the kconfig variable SAMPLE_BT_USE_AUTHENTICATION=n, that is, it doesn't seem to be related to the authentication phase.

NOTE 2: I have tested this sample successfully with the nrf52840dk and stm32f746g_disco boards.

To Reproduce Build the sample for the esp32s3 board:

west build -b esp32s3_devkitm/esp32s3/procpu

Logs and console output

---- Opened the serial port COM8 ----
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0xa (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fc96270,len:0x2b34
load:0x40374000,len:0x12250
SHA-256 comparison failed:
Calculated: 3e4078c05308666e445fef7a224b9755be1db59c0c411f7583e015cffa9a392c
Expected: 0000000040b20000000000000000000000000000000000000000000000000000
Attempting to boot anyway...
entry 0x403801c0
I (101) boot: ESP Simple boot
I (101) boot: compile time Nov 20 2024 17:39:00
W (101) boot: Unicore bootloader
I (102) spi_flash: detected chip: gd
I (103) spi_flash: flash io: dio
W (106) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (118) boot: chip revision: v0.1
I (121) boot.esp32s3: Boot SPI Speed : 40MHz
I (125) boot.esp32s3: SPI Mode       : DIO
I (129) boot.esp32s3: SPI Flash Size : 8MB
I (133) boot: Enabling RNG early entropy source...
I (138) boot: DRAM: lma 0x00000020 vma 0x3fc96270 len 0x2b34   (11060)
I (144) boot: IRAM: lma 0x00002b5c vma 0x40374000 len 0x12250  (74320)
I (150) boot: padd: lma 0x00014db8 vma 0x00000000 len 0xb240   (45632)
I (156) boot: IMAP: lma 0x00020000 vma 0x42000000 len 0x285c4  (165316)
I (163) boot: padd: lma 0x000485cc vma 0x00000000 len 0x7a2c   (31276)
I (169) boot: DMAP: lma 0x00050000 vma 0x3c030000 len 0x7444   (29764)
I (175) boot: Image with 6 segments
I (178) boot: DROM segment: paddr=00050000h, vaddr=3c030000h, size=07450h ( 29776) map
I (186) boot: IROM segment: paddr=00020000h, vaddr=42000000h, size=285C2h (165314) map
I (229) heap_runtime: ESP heap runtime init at 0x3fca15d8 size 288 kB.

I (229) spi_flash: flash io: dio
*** Booting Zephyr OS build v4.0.0 ***
[00:00:00.242,000] <inf> fs_nvs: 8 Sectors of 4096 bytes
[00:00:00.242,000] <inf> fs_nvs: alloc wra: 0, fd0
[00:00:00.242,000] <inf> fs_nvs: data wra: 0, 1c
[00:00:00.242,000] <inf> esp32_bt_adapter: BT controller compile version [f583012]
[00:00:00.359,000] <inf> bt_hci_core: No ID address. App must call settings_load()
Bluetooth initialized
[00:00:00.360,000] <inf> bt_hci_core: Identity: F4:12:FA:43:6E:48 (public)
[00:00:00.361,000] <inf> bt_hci_core: HCI: version 5.0 (0x09) revision 0x0016, manufacturer 0x02e5
[00:00:00.361,000] <inf> bt_hci_core: LMP: version 5.0 (0x09) subver 0x0016
Advertising successfully started
Bluetooth authentication callbacks registered.
BLE assert ke_mem.c 267, param 00000000 00000000
sylvioalves commented 4 days ago

@jeronimoagullo I have asked support from BLE team. Thanks for reporting.