I’m reading in PWM signals from my RC controller, the pulse width is from approx 1 to 1.85 ms, so it has to be pretty fast. I’m using the interrupt pin for reading signals in and the PWM pin for the outputs. It all works fine, but to make the interrupt handler fast enough I had to set the SynchronousUnsafeEventInvocation to true. I don’t truly understand what this is doing to my application, thread handling and such.
According to the docs:
“An interupt may occur on a thread other than the application thread. When SynchronousUnsafeEventInvocation is false (the default), the Interrupt event, which is raised in response to the interrupt on the interface, is marshalled to your application thread and raised asynchronously; whenSynchronousUnsafeEventInvocation is true, the Interrupt event is raised synchronously on the same thread that generated the interupt.”
Anyone out there with a deeper understanding on this that could shed some light on this? It seems to me not to mean much as the application is running now, but if I have other threads running etc, I’m wondering how it would work. It’s hard to debug these things as well, so I guess the best way about it is to truly understand this.
I did by the newest book on .NET 4.1/4.2 from Annabooks, but I did not find much on this.
I have some more detailed information and code in my blog
(Tried asking this in the gadgeteer forum, at netmf.com, but not much response)