You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The fire_callbacks in gpio_nrfx.c is suppose to notify connected functions that interrupt happened on the GPIO they observe.
There is a bug there - when callback if fired it informs the linked function about all pins that have active isr at the time. In our code we use this information to disable the isr lines for specific pins. Since we can get information about some random pin we may disable callback that somebody else is waiting for.
if ((cb->pin_mask & pins) & data->int_en) {
__ASSERT(cb->handler, "No callback handler!");
cb->handler(port, cb, pins);
}
the above code should have
cb->handler(port, cb, cb->pin_mask & pins);
To Reproduce
Setup two gpio callbacks, one for each pin.
Expected behavior
When callback is fired it should get information about pins it is connected to.
Impact
Showstopper.
Screenshots or console output
N/A
Environment (please complete the following information):
master
Additional context
N/A
The text was updated successfully, but these errors were encountered:
When notifying the handler that GPIO interrupt has occurred
pass only pins that are associated with this handler.
Fixes: zephyrproject-rtos#24634
Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
When notifying the handler that GPIO interrupt has occurred
pass only pins that are associated with this handler.
Fixes: #24634
Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
When notifying the handler that GPIO interrupt has occurred
pass only pins that are associated with this handler.
Fixes: zephyrproject-rtos#24634
Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
hakehuang
pushed a commit
to hakehuang/zephyr
that referenced
this issue
Jun 20, 2020
When notifying the handler that GPIO interrupt has occurred
pass only pins that are associated with this handler.
Fixes: zephyrproject-rtos#24634
Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
Describe the bug
The
fire_callbacks
in gpio_nrfx.c is suppose to notify connected functions that interrupt happened on the GPIO they observe.There is a bug there - when callback if fired it informs the linked function about all pins that have active isr at the time. In our code we use this information to disable the isr lines for specific pins. Since we can get information about some random pin we may disable callback that somebody else is waiting for.
the above code should have
To Reproduce
Setup two gpio callbacks, one for each pin.
Expected behavior
When callback is fired it should get information about pins it is connected to.
Impact
Showstopper.
Screenshots or console output
N/A
Environment (please complete the following information):
master
Additional context
N/A
The text was updated successfully, but these errors were encountered: