I need a high speed timer (faster than the 1ms that the internal timer can do) and I was thinking that it should be possible to setup a PWM port to cause an interrupt on a pin every n cycles. The question is, can an interrupt be triggered only once to avoid race conditions? (This applies to the CNC project)
Are you intending to handle the interrupt in managed code? If so, you should know that your code may be called up to 20ms AFTER the interrupt has fired. NETMF isn’t real-time, there are no guarantees about when your code will run.
I suggest RLPLite, you should be able to easily achieve what you want there (as long as no managed code is involved…).
Thanks for the advice, and I will use RDPLite.
An entry point for leaning about RLPLite might be the wiki article “RLPLite Demo”, GHI Electronics – Where Hardware Meets Software.
You might also take a look at my codeshare that counts pulses on an input line. It is using RLP from premium lib so you’ll have to adopt it for RLPLite.