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

Access to timers / registers inside the netduino MCU? Is there a way? Interop?

timers registers Interop

  • Please log in to reply
5 replies to this topic

#1 gismo

gismo

    Advanced Member

  • Members
  • PipPipPip
  • 110 posts

Posted 12 February 2014 - 10:49 PM

I've been working on a project for some time now and I'm researching quite a bit. It brought me back to the Netduino, but would require some access deeper into the timers. I came across an older thread: http://forums.netdui...timerscounters/ Is there any update regarding direct access to the timers in the chip? Or a method/implementation to do so? I'd really like to use the counters and input capture features of the chip. It would reduce the peripherals and maybe complexity needed for my project. Thanks!

#2 gismo

gismo

    Advanced Member

  • Members
  • PipPipPip
  • 110 posts

Posted 14 February 2014 - 09:46 PM

Something like this would be great: https://www.ghielect...register-access

#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 14 February 2014 - 10:37 PM

Hi gismo, NETMF uses the timers for various features inside the runtime (PWMs, thread scheduling, etc.) If you'd like to hack deeper and use some of them for custom purposes, I'd recommend creating native code for that and compiling it into the core firmware. Arbitrarily using timers could mess with other features--but since you're delving down that deep you're already aware of that :) Chris

#4 gismo

gismo

    Advanced Member

  • Members
  • PipPipPip
  • 110 posts

Posted 14 February 2014 - 11:30 PM

Hi gismo,NETMF uses the timers for various features inside the runtime (PWMs, thread scheduling, etc.) If you'd like to hack deeper and use some of them for custom purposes, I'd recommend creating native code for that and compiling it into the core firmware.Arbitrarily using timers could mess with other features--but since you're delving down that deep you're already aware of that :)Chris

Hey Chris, Thanks for the reply. I've downloaded the netduino 2 firmware from the downloads page and have combed through the files, but not sure where to start. Which files/directories should I look at so I can see what timers are currently being used and so I can start to poke around and make changes? It would be nice if I could make a layer of abstraction to get at the available timers for my project without major modifications to the core. Maybe a new class or something. Thanks!

#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 15 February 2014 - 12:09 AM

Hey Gismo,  

Thanks for the reply. I've downloaded the netduino 2 firmware from the downloads page and have combed through the files, but not sure where to start. Which files/directories should I look at so I can see what timers are currently being used and so I can start to poke around and make changes?

After copying the source over the MicroFrameworkPK_v4_2 folder, do a search for the text "TIM" in .c, .cpp, and .settings files. That will give you a rundown of where each TIMER is used. The PWM timers is particular are physically tied to pins and assigned in the settings file in the SolutionsNetduino2 folder. A few timers are used to create the core clock that NETMF uses for scheduling. Those are the main ones to watch out for in the Netduino firmware. [In the firmware for AGENT and other products, we sometimes use timers for other purposes...but the current Netduino firmware generally uses them for core purposes like thread scheduling and PWMs.] Chris
  • gismo likes this

#6 gismo

gismo

    Advanced Member

  • Members
  • PipPipPip
  • 110 posts

Posted 16 February 2014 - 02:29 PM

Hey Chris, I forgot to reference this in my post above, but this thread seemed to get a lot of attention a while ago: Netduino runtime interop, which is what I'm really looking for instead of customizing firmware. http://forums.netdui...e-code-interop/ Any updates regarding the netduino runtime interop?





Also tagged with one or more of these keywords: timers, registers, Interop

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.