Interrupt handler callback is not called sometimes

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

In WICED-SMART-SDK2.1.0,  I use hello-sensor.

For interrupt, I uses P0 GPIO which is SW1 in BCM920737 Tag board.

I use deep sleep mode to save power, but interrupt handler callback function is not called sometimes.

I set the deep sleep mode to be toggled with button SW1.

It can wake up but some times it can not be into deep sleep mode although I press SW1.

I checked SW1 is high before I pressed (I modified P0 into pull up) and goes low when I pressed.

Through reset, it can be called. When I remove deep sleep mode function, interrupt handler can be called well.

I put the board to go deepsleep mode using devlpm_init(), devlpm_enableWakeFrom(GPIO_PIN_BUTTON).

At the end of hello_sensor_create(), I put bleprofile_PrepareHidOff().

and I put pull up resistor on P0, so PO acts like pull up port and goes to low when I press SW1.

My code is added,

I hope to know what is wrong with this.

0 Likes
1 Solution
Anonymous
Not applicable

I reinstalled IDE and the issue has gone.

I don't understand why, but IDE behaves sometimes wrong.

View solution in original post

3 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

I couldn't for sure pinpoint what is the issue here. But I recommend you take a read of this post on how deep sleep is done: Sleep Deep_Sleep Explanation and Techniques

0 Likes
Anonymous
Not applicable

The issue is that gpio interrupt seems not to be recognized after wake up from deep sleep.

My board can go deep sleep mode well, but it can not call interrupt handler call back function even though I press button.

I made deep sleep mode toggled by button.

After executing hello_sensor_create, it goes to deep sleep . With pressing SW1, it wakes up.

Again pressing SW1 makes board go to deep sleep mode..

Sometimes It can not wake up with button during deep sleep mode.

Sometimes it can wake up from deep sleep but can not go deep sleep mode again.

0 Likes
Anonymous
Not applicable

I reinstalled IDE and the issue has gone.

I don't understand why, but IDE behaves sometimes wrong.