Skip to main content
User1655833706281357277
Associate III
February 8, 2023
Solved

We have a product using the stm32wb55 that can be exposed to strong electromagnetic files. We occasionally see the HCI_HARDWARE_ERROR_EVENT (time overrun) error from the radio and lose the BLE link. Is there a way to restart the radio when this happe

  • February 8, 2023
  • 9 replies
  • 6702 views

Ideally using something like the HCI_RESET command is preferable for our application rather than simply cycling power or resetting the system. Is there some procedure for recycling the M0 processor in the stm32wb while leaving the application processor running? I'm not finding any informatio on what to do after issuing HCI_RESET to try to get the BLE radio back up.

Thank you.

This topic has been closed for replies.
Best answer by Remy ISSALYS

Hello,

There isn't any command to restart the radio without resetting the system. The HCI_RESET command performs a radio system and a HW BLE core reset through RFRST bit of RCC_APB3RSTR register and then switch back ON the BLE core and reinitialize software part. In majority of the case, the HCI_RESET command will recover the system but it's difficult to confirm that at one hundred percent in your case because perturbation can affect other parts of the system.

After the HCI_RESET, you should re initialize the SHCI, GAP and GATT parts to re enable the BLE.

Best Regards

9 replies

Javier1
Principal
February 10, 2023

>>strong electromagnetic files

?????

>>while leaving the application processor running?

How sure are you the error comes from the M0+ radio and not from your logic.

It would make sense for me to reset the whole thing

hit me up in https://www.linkedin.com/in/javiermuñoz/
User1655833706281357277
Associate III
February 10, 2023

Yes, I'm sure it's coming from the M0 processor. Here's the switch statement:

SVCCTL_UserEvtFlowStatus_t

SVCCTL_App_Notification( void *pckt )

{

    hci_event_pckt *ep = (hci_event_pckt*) ((hci_uart_pckt *) pckt)->data;

    switch (ep->evt) {

    case HCI_DISCONNECTION_COMPLETE_EVT_CODE:

        handle_DISCONNECTION_COMPLETE( (hci_disconnection_complete_event_rp0 *) ep->data );

        break;

    case HCI_LE_META_EVT_CODE:

        handle_LE_META( (evt_le_meta_event *) ep->data );

        break;

    case HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE:

        handle_VENDOR_SPECIFIC_DEBUG( (evt_blecore_aci *) ep->data );

        break;

    case HCI_ENCRYPTION_CHANGE_EVT_CODE:

        break;

<******* NOTE: THIS CODE IS EXECUTING: *******>

    case HCI_HARDWARE_ERROR_EVT_CODE:

        sysevent_put( SYSEVENT_HCI_HARDWARE_ERROR, 1, &((hci_hardware_error_event_rp0 *) ep->data)->Hardware_Code );

        break;

    default:

        APP_DBG_MSG(("** UNHANDLED hci event %04x", ep->evt));

        break;

    }

    return SVCCTL_UserEvtFlowEnable;

}

I really don't see how this could be coming from anything but the M0.

User1655833706281357277
Associate III
February 10, 2023

Also, I have the stm32wb doing more that just running bluetooth and would prefer NOT to reboot the whole thing. Surely there is some way to stop the radio processor and restart it?

User1655833706281357277
Associate III
February 10, 2023

Sorry, one final note: the BLE radio does stop working when I see the error message.

User1655833706281357277
Associate III
February 10, 2023

Final thing -- it's electromagnet FIELDs, sorry about the misprint.

User1655833706281357277
Associate III
February 10, 2023

Does anyone out there have a definitive technical answer to the question: If, for any reason, I want to restart the radio ONLY in the stm32wb how to go about doing that? If not, what is the HCI_RESET command supposed to be used for?

User1655833706281357277
Associate III
February 14, 2023

All right, let's take this up a notch: Javier's "answer" is neither technical nor helpful. It's not an answer at all. Is there anyone who can answer: 1) Is it possible to restart the radio without resetting the entire processor, and 2) what does the HCI_RESET command actually do?

Remy ISSALYS
Remy ISSALYSBest answer
Technical Moderator
February 17, 2023

Hello,

There isn't any command to restart the radio without resetting the system. The HCI_RESET command performs a radio system and a HW BLE core reset through RFRST bit of RCC_APB3RSTR register and then switch back ON the BLE core and reinitialize software part. In majority of the case, the HCI_RESET command will recover the system but it's difficult to confirm that at one hundred percent in your case because perturbation can affect other parts of the system.

After the HCI_RESET, you should re initialize the SHCI, GAP and GATT parts to re enable the BLE.

Best Regards

User1655833706281357277
Associate III
February 20, 2023

Thank you. I'm not seeing an example on this, I'll give it a try and see what happens.

SAli.8
Associate II
March 8, 2023

Sorry for jumping in, I have similar issue in a different scenario that when I jump from bootloader at 0x08000000 to application binary at 0x08024000, BLE advertisement does not work.

Both bootloader and application use BLE with different services.

It is suggested here to stop or re-init BLE stack somehow:

ble_reinit_issue

So, I wish to do the same but calling SHCI_C2_Reinit or SHCI_C2_802_15_4_DeInit in hopes that we can later re-init BLE does not work and CPU1 code remains blocked waiting for response from CPU2 (wireless core).

Calling hci_reset() from ble_hci_le.h header included gives link time error and I could not find any work around for this.