cancel
Showing results for 
Search instead for 
Did you mean: 

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

SikandarLF
Associate III

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(); 
            }
 
 
  }
1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

3 REPLIES 3
liaifat85
Senior III

Which particular board/chip are you using?

STM32WB55 Nucleo board

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