Hi to all,
i’m new on this forum and almost new at .NETMF world. I’m ready to get my first .NETMF board, a Cerbuino NET, but I really need some advices about a particular thing: how many pins are interrupt-capable? And if some of this interrupt fire at the same time (e.g. 6 different motion sensors connected to 6 different pins), how many simultaneous interrupt calls can this board manage?
With NETMF, the core handles the hardware interrupts and puts them on a queue. There is a single thread that dispatches the queued interrupts to the user’s interrupt handlers. There can be several milliseconds delay, from the time the hardware interrupt is handled until the user’s handler sees it, but the interrupt handler’s arguments contain a timestamp when the hardware interrupt occurred.
Since there is a delay, between the hardware interrupt and the calling of the users interrupt handler, you should not read an InterruptPort to get the value associated with an interrupt. Again the handler’s arguments contain the port value at the time of the hardware interrupt.
While it is unlikely that 6 interrupts will occur “simultaneously”, the hardware and core can handle it, and you will see the interrupts in your handler sequentially.
If interrupts occur at a high rate, and you do not process them fast enough, it is possible to run out of memory due to queued interrupts.
Firstly, many thanks to everyone, both replies was very helpful. Meanwhile, GHI support on Facebook answered my question like this: “this processor supports interrupts on all pins but with maximum of 16 can be activated”. Is this sentence related to the fact that same pins from different ports share an interrupt? And, if so, does this kind of “limit” apply only to Gadgeteer ports or also to other GPIOs (i mean the others “arduino style” pins)?