-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Description of defect
In InterruptIn::fall(..)
and InterruptIn::rise(..)
calling gpio_irq_set
in target https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_NORDIC/TARGET_NRF5x/gpio_api.c#L221 , the interrupts get activated per default. This results in direct ISR calls on hardware if the interrupt input pin is floating during boot up for example. Per default interrupts shouldn't be activated after hooking up an ISR with fall or rise, right? Only after explicitly calling InterruptIn::enable_irq()
.
Target(s) affected by this defect ?
NRF52832
Toolchain(s) (name and version) displaying this defect ?
- (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 7.12.1.20170417-git
What version of Mbed-os are you using (tag or sha) ?
mbed-os-5.9.0
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
mbed-cli 1.8.1
How is this defect reproduced ?
-
empty mbed project
-
main.cpp
#include "mbed.h" volatile uint8_t count = 0; void handler() { count++; } void main() { InterruptIn interrupt(p0); interrupt.fall(callback(&handler)); while(1); }
and then toggling p0 on hw e.g. calls handler() for me