Using CyBle_RegisterBlessInterruptCallback()

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
jumic_1610531
Level 1
Level 1
First like received

Using CyBle_RegisterBlessInterruptCallback() I want to trigger a interrupt after an advertising message has been transmitted.

So I setup a call back function with:-

static CYBLE_BLESS_EVENT_PARAM_T evt_param;

evt_param.BlessStateMask = CYBLE_ISR_BLESS_ADV_CLOSE;

evt_param.bless_evt_app_cb = BlessInterruptHandler;

ret = CyBle_RegisterBlessInterruptCallback(&evt_param);

//No error is reported

//And I handle the callback function with:-

void BlessInterruptHandler(uint32 event, void *eventparam);

void BlessInterruptHandler(uint32 event, void *eventparam)

{  

         CY_NOP;

    switch(event)

    {

                  case CYBLE_ISR_BLESS_ADV_CLOSE: break; //set flag

    }

}

But it is not working for me. What am I missing?

0 Likes
1 Solution
Anonymous
Not applicable

You also need to start the BLE module with something named similar to: "CYBLE_Start()" before it will start interrupting/running.

View solution in original post

0 Likes
2 Replies
Anonymous
Not applicable

You also need to start the BLE module with something named similar to: "CYBLE_Start()" before it will start interrupting/running.

0 Likes

I was doing "CyBLE_start()"

Problem was I was not waiting for the CYBLE_EVT_STACK_ON event.

Problem now solved, thank you.