Skip to main content
SikandarLF
Associate II
October 12, 2023
Solved

How to get out from the BLE Function or How to turn off BLE.

Hi hope you guys are well,  When i call the function to turn the BLE on, it starts to advertise but i dont know to get out of that function , means in the main while loop the code is stuck at MX_APPE_Proccess(), i did the debugging but its just looping the same function  (void UTIL_SEQ_Run( UTIL_SEQ_bm_t Mask_bm )
{) 

i want to move to next statements  in the main while loop 

 

 

FLASH->KEYR =  0x02030405;
  while (1)
  {
 
  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, 0);
         HAL_Delay(100);
          HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, 1);
          HAL_Delay(100);
        HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, 0);
        HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, 1);
    /* USER CODE END WHILE */
    if (HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_4) == 0)
    {
     MX_APPE_Process(); 
            }
 
 
  }
This topic has been closed for replies.
liaifat85Best answer
Visitor II
October 14, 2023

Here somebody suggested using the hci_reset() function. You can check these answers if it helps.

https://community.st.com/t5/stm32-mcus-wireless/stm32wb55-ble-on-off-function/td-p/114345

3 replies

Visitor II
October 12, 2023

Which particular board/chip are you using?

SikandarLF
Associate II
October 12, 2023

STM32WB55 Nucleo board

liaifat85Best answer
Visitor II
October 14, 2023

Here somebody suggested using the hci_reset() function. You can check these answers if it helps.

https://community.st.com/t5/stm32-mcus-wireless/stm32wb55-ble-on-off-function/td-p/114345