This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/CC2650: CC2650 pin interrupt problem

Part Number: CC2650

Tool/software: TI C/C++ Compiler

Hi, i'm using a push button and i need to detect, how many times does button pressed. When i pressed one time, i send one byte and when i pressed two times, i send another one byte. I've tried it with project zero example.

In first picture, i'm detecting button when presset via PIN_IRQ_POSEDGE further, 

In second picture, you see, i'm sending wing_id while button is pressing and when release button, first time i want to send battLevel and second time alert. This is not working. I know i need to add delay or something like that as, 

You can see,i've tried task_sleep function also __nop() however i did not work.

I know that, when first times pressed button, i should wait some seconds for sense another click. That's why i need delay. If only one time pressed, button state goes back again after some seconds as 3 sec. 

Briefly, i want to ask that is that possible to detect button in interrupt ? Because i can not see delay effect in interrupt ? Or i need to create another task parallel to interrupt ?

Thanks for your helps.