I have spent hours and hours trying to code native functions to measure duty cycle with my new Raptor board. Although datasheet of Atmel MCU has 1300 pages there is no any code example. Where else to look? It is obvious that examples are always good if someone is learning something new… Arduino is all about examples and documentation. OK, you could argue that here it is all about Netmf and managed code, who need native functions?.. We all sometimes have to use native functions… Anyway, I would appreciate if some expert could declassify his knowledge and share his code. 8) After all it’s only manipulating with registers… I think that best way to measure duty cycle is by Timer/Counter operating in capture mode, triggered by external signal which is actually subject of examination. (I’m curious if that boy exists - Google not found him. Do not beat me, I’m new here.
there’s also a excellent document written by Simon from Vilnius
The Signal Capture class might do what you want In managed code.
There are a good block of examples of RLP in codeshare. When it comes to taking full advantage of some of the really manufacturer specific peripherals you might have to work it out for yourself or find other examples in C from other systems, eg mBed.
As leboroban says Simon’s RLP in depth is an excellent guide to get you started
Unfortunately the SignalCapture do not work for now…
Yes, RLP is well documented. I have learned all about RLP from this site.
MCUs registers are specific, ok. But it is pity that there is no examples which would be so helpful. Keil uVision is probably good application for debugging native code but for me it does not work also. It needs some INI file with memory configuration. Now I have to move to other systems to learn how things work and after that return back and code what I need. Freaking easy.