hci: send reset after uploading patchram

This commit is contained in:
Matthias Ringwald 2025-02-26 15:32:29 +01:00
parent 5bc42cf57c
commit c3616ea987
2 changed files with 7 additions and 2 deletions

View File

@ -1854,8 +1854,8 @@ static void hci_initialization_timeout_handler(btstack_timer_source_t * ds){
break;
case HCI_INIT_W4_CUSTOM_INIT_BCM_DELAY:
// otherwise continue
hci_stack->substate = HCI_INIT_W4_READ_LOCAL_SUPPORTED_COMMANDS;
hci_send_cmd(&hci_read_local_supported_commands);
hci_stack->substate = HCI_INIT_W4_CUSTOM_INIT_BCM_RESET;
hci_send_cmd(&hci_reset);
break;
default:
break;
@ -2572,6 +2572,10 @@ static void hci_initializing_event_handler(const uint8_t * packet, uint16_t size
return;
#endif
case HCI_INIT_W4_CUSTOM_INIT_BCM_RESET:
// skip read local version and name after PatchRAM was uploaded
hci_stack->substate = HCI_INIT_READ_LOCAL_SUPPORTED_COMMANDS;
return;
case HCI_INIT_W4_READ_LOCAL_SUPPORTED_COMMANDS:
if (need_baud_change && (hci_stack->chipset_result != BTSTACK_CHIPSET_NO_INIT_SCRIPT) &&
((hci_stack->manufacturer == BLUETOOTH_COMPANY_ID_BROADCOM_CORPORATION) ||

View File

@ -812,6 +812,7 @@ typedef enum hci_init_state{
HCI_INIT_W4_CUSTOM_INIT_CSR_WARM_BOOT_LINK_RESET,
HCI_INIT_W4_CUSTOM_INIT_BCM_DELAY,
HCI_INIT_W4_CUSTOM_INIT_BCM_RESET,
// Support for Pre-Init before HCI Reset
HCI_INIT_CUSTOM_PRE_INIT,