Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Accessing the Timer/Counter block


  • Please log in to reply
1 reply to this topic

#1 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 25 March 2014 - 12:20 PM

Look at the Atmel data sheet, there seems to be quite a sophisticated Timer/Counter block in the ARM7. However I can't find any reference to it anywhere in the .net MF or Netduino SDK. Of course there is System.Threading.Timer but that is limited to 1ms resolution and I'm not sure how 'deterministic' it is.

 

I would like to run a timer faster than 1ms intervals and ideally have an interrupt handler that runs every time it elapses.

 

It this straightforward to do within the NetMF/Netduino framework? Any pointers?

 

Thanks,

Tim Long



#2 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 26 March 2014 - 08:38 AM

Well, there are no classes for direct timer access in the current version of .NET Micro Framework, mainly due to the fact that the managed (C#) code is interpreted and running considerably slowly than native (C++) code. IIRC simple pin toggling loop on Netduino gen. 1 can achieve ~10 kHz. Even if you were able to access the timers, you would not have much time to run managed code in the interrupt handler (if at all).

 

What do you want to do?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.