2023-02-08 01:55 PM
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.
Solved! Go to Solution.
2023-02-17 09:16 AM
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
2023-02-10 06:00 AM
>>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
2023-02-10 06:07 AM
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.
2023-02-10 06:09 AM
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?
2023-02-10 06:19 AM
Sorry, one final note: the BLE radio does stop working when I see the error message.
2023-02-10 07:06 AM
Final thing -- it's electromagnet FIELDs, sorry about the misprint.
2023-02-10 10:22 AM
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?
2023-02-14 04:28 AM
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?
2023-02-17 09:16 AM
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
2023-02-20 07:32 AM
Thank you. I'm not seeing an example on this, I'll give it a try and see what happens.