BLE: ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:305 k_sem_take failed with err -11

Hi

I'm flashing hci_lpuart on the nrf52 chip and peripheral_hr on the nrf9160 chip from the nrf9160dk. Everything goes well, but when I look in Link Monitor, I get this fail (and I can't connect with Bluetooth):

ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:305
k_sem_take failed with err -11

Looking at line 305, it looks like a thread can't be taken (anymore):

err = k_sem_take(&sync_sem, HCI_CMD_TIMEOUT);
BT_ASSERT_MSG(err == 0, "k_sem_take failed with err %d", err);

I also tried flashing lte sensor gateway, and it gives the same error.

This one: #CONFIG_BT_DEBUG_LOG=y is already in comment and there is no CONFIG_SETTINGS in prj.conf-file.

Thanks in advance!

Parents
  • I'll add my 2¢ here. I've noticed that if you're not careful about how you power your nRF52, it could cause a brown out which will then will cause the hci_lpuart state to go out of wack causing the above. If it's happening sporadically during runtime this may be your cause.

    Also, another cause is simply mapping the pins wrong.  Double check your config and you may find your solution there. If your pins are not mapped correctly, this will happen every time on boot no matter what.

  • Hi

    The problem automatically solved after a while. I just kept flashing different programs on the 2 chips  and after a while it worked.

    When I changed the prj.conf-file of the lp_uart and flashed this on the nRF52840, the error occurred again. And again it got solved by flashing some other programs.

    I think it has something to do with the config-file. But I can't find which line responsible is it.

    Thanks for sharing and answering!

Reply
  • Hi

    The problem automatically solved after a while. I just kept flashing different programs on the 2 chips  and after a while it worked.

    When I changed the prj.conf-file of the lp_uart and flashed this on the nRF52840, the error occurred again. And again it got solved by flashing some other programs.

    I think it has something to do with the config-file. But I can't find which line responsible is it.

    Thanks for sharing and answering!

Children
Related