Problem with interrupt

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

cross mob
Anonymous
Not applicable

In SDK 2.1.0 in hello_client app I noticed that interrupt handler is called always twice on very event. Why is that ?

Hello_sensor app from the same SDK does not have this issue.

The button in hello_client is configured additionally with:

GPIO_BOTHEDGE_INT

and as a result the interrupt handler is called twice when the button is pressed and twice when released.

0 Likes
1 Solution

In hello_client_create(), remove calls to bleprofile_Init() and bleprofile_GPIOInit(). blecen_Create() called later invokes these. This will cause two callbacks (both pointing to the same callback function) to be registered with the GPIO driver for interrupts on the 'button' GPIO.

View solution in original post

3 Replies