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

Will a battery and 32.768 crystal keep the SystemTime updated?


  • Please log in to reply
5 replies to this topic

#1 TDVDesign

TDVDesign

    New Member

  • Members
  • Pip
  • 2 posts

Posted 08 May 2013 - 09:16 PM

Hi,

I am working on a custom version of the Plus 2 using a board I am developing.  I see that the STM32F4 has a 32.768 khz crystal input on PC14 and 15.  If I attach a backup battery to VBAT and a crystal to these terminals, will this keep the SystemTime accurately up to date?

 

Since I would want to use the same firmware as the Plus 2, how can I compensate for those terminals being used for this instead of /PWR_CTRL_ETHERNET and the other pin, whose function I cannot fully understand?  Can I use another pin and rename its location somewhere to use the same ethernet drivers? Thanks, Tom



#2 TDVDesign

TDVDesign

    New Member

  • Members
  • Pip
  • 2 posts

Posted 17 May 2013 - 03:41 PM

Hmm... No-one has a clue, eh?  I will try to attach a battery and crystal to the Discovery board I have to check it out and report back.

Tom



#3 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 17 May 2013 - 04:21 PM

yeah id test it.

iam not sure if that will work without firmware modifications.

 

edit: id also make sure before if the pins not used otherwise, and all is correct (capacitors, vbat not connected anywhere else...)

 

or it will burn :D



#4 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 17 May 2013 - 04:46 PM

I have just had a quick read of the data sheet for the ARM.

I think you are correct - the Vbatt supply can be used to supply the RTC and a some other areas of the ARM core.

 

There may be some bits that need to be set in the ARM control registers. The data sheet talks about power switches....

 

If you are putting together your own PCB, I would keep your options open on the PCB.

For example, when you layout the PCB, put down some extra pads / holes that will allow you to select where each of the power lines is connected. It will just make things easier to change if it does not work.

 

Paul



#5 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 17 May 2013 - 05:03 PM

another solution would be just adding an external rtc ic. well, that adds some extra costs (wich doesent matter for low run stuff, only when you really gonna make a lot and maybe sell them)

 

the benefit would be: the newer and better ones have a temerature compensated crystal inside.

so they only need a battery connected. aviable in both spi and i2c

they would also add some battery backed sram as storage space (some bytes, not that much, but also not really bad)



#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 May 2013 - 01:16 AM

Hi Tom, The internal RTC is separate from the system timer which is used by NETMF. The system timer is based on cycles-since-boot whereas the RTC is driven by the RTC peripherals and encapsulated in the RTC register. If you want to tweak the firmware to save the time to the RTC registers whenever it is set...and read the time from those registers whenever DateTime.Now is requested...you can leverage the RTC for higher-accuracy timekeeping. BTW, the RTC does keep time even during resets. So as long as it has power, it doesn't need to be reset. Chris




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.