Skip to main content
Nikhil Gayke
Associate III
November 30, 2021
Question

what is the use of SPI_IRQ pin in IDB05A1 BLE module.

  • November 30, 2021
  • 1 reply
  • 623 views

/**

 * @brief Reports if the BlueNRG has data for the host micro.

 *

 * @param None

 * @retval int32_t: 1 if data are present, 0 otherwise

 */

static int32_t IsDataAvailable(void)

{

 return (HAL_GPIO_ReadPin(HCI_TL_SPI_EXTI_PORT, HCI_TL_SPI_EXTI_PIN) == GPIO_PIN_SET);

}

if it indicate that it has data for mater can we use this as a wake up to controller. by checking pin status can we wakeup the MCU when the data is available.

    This topic has been closed for replies.

    1 reply

    Sebastien DENOUAL
    ST Employee
    December 1, 2021

    Hi @Nikhil Gayke​ ,

    This is true. I confirm this SPI IRQ pin of IDBO5A1 (BlueNRG-MS) is raise High by BlueNRG-MS network processor to indicate that there is some data available and host MCU (STM32) can perform SPI read. I do not see blocking point to use it for waking up Host MCU (of course, host MCU remains SPI master and is in charge of control/configure BlueNRG-MS)

    Regards,

    Sebastien.

    Nikhil Gayke
    Associate III
    December 2, 2021

    does this code wake the MCU from low power mode

    static int32_t IsDataAvailable(void)

    {

    if(HAL_GPIO_ReadPin(HCI_TL_SPI_EXTI_PORT, HCI_TL_SPI_EXTI_PIN) == GPIO_PIN_SET)

    {

    Flag=True;

    }

       else

       {

       Flag=False;

       }

    }

    void MX_BlueNRG_MS_Process(void)

    {

    if(set_connectable==TRUE && Flag==True)

    {

    User_Process();

    hci_user_evt_proc();

    }

    else

    {

    __disable_irq();

    LPM_Enter_Mode();

    }

    __enable_irq();

    }

    @Agnieszka Stawiarska​ @Sebastien DENOUAL​ @s2399​ @s_abbot​ @s_michas​