cancel
Showing results for 
Search instead for 
Did you mean: 

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 happens?

User1655833706281357277
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Remy ISSALYS
ST Employee

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

View solution in original post

10 REPLIES 10
Javier1
Principal

>>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

we dont need to firmware by ourselves, lets talk
User1655833706281357277
Associate III

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

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

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

User1655833706281357277
Associate III

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

User1655833706281357277
Associate III

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

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
ST Employee

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

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