Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
michaelbrookswfs
Posts: 12
Registered: ‎06-21-2012
0
Accepted Solution

RTC on Zynq 7000 Linux?

Given that the Zynq 7000 EPP series appears not to include a real time clock, how does the Linux kernel image for this platform handle keeping track of the time of day?

If one were to add an RTC to a design that incorporates the Zynq, what would one have to do to get Linux to make use of it for its datetime knowledge?

 

Regards,

Michael Brooks

Xilinx Employee
austin
Posts: 3,681
Registered: ‎02-27-2008
0

Re: RTC on Zynq 7000 Linux?

Michael,

 

A RTC is usually "just software" not hardware.  If you really wanted to build a hardware RTC, you could do so in the FPGA fabric.

 

I would either use GPS to get precise time, or use the internet for PTTP, if I needed that sort of precision.

 

What is you requirement?

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
Visitor
michaelbrookswfs
Posts: 12
Registered: ‎06-21-2012
0

Re: RTC on Zynq 7000 Linux?

Thanks Austin. It's for a device that will live on the bottom of the sea, so sync-ing with the Internet isn't an option. Our hardware designer is considering adding an external hardware RTC to the design. As you say though, perhaps one could be implemented in FPGA, but we're reserving the FPGA for DSP work.

I suppose the way Linux would make use of an external RTC depends upon how the system imtegrates with it. If it uses one of the available busses (e.g. SPI or I2C) then it's either a matter of replacing the Linux RTC code with new code that communicates with the RTC when necessary, or of writing a cron job that from time to time queries the RTC and then updates the system clock accordingly.

Expert Contributor
linnj
Posts: 1,038
Registered: ‎09-10-2008
0

Re: RTC on Zynq 7000 Linux?

The ZC702 board does have an I2C RTC chip on it. It is a chip, not software.  There is a driver in the kernel for the RTC and it integrates into Linux well for the system time.  This is typical of most embedded systems as a battery backed timer is needed to be a RTC.

 

We don't do a lot of testing of the RTC on the ZC702 yet.

 

Thanks.

John Linn
Xilinx Employee
austin
Posts: 3,681
Registered: ‎02-27-2008
0

Re: RTC on Zynq 7000 Linux?

m,

 

OK, that is fair.  Here is what I would do.  I would use the Symmetricom 'tiny cesium' (perhaps 10,000 times smaller than a cesium) clock reference oscillator.

 

http://www.symmetricom.com/products/frequency-references/chip-scale-atomic-clock-csac/

 

I would use this for the system's timebase, and also for the FPGA timebase (anything that requires precise frequency/time).

 

The OS time-keeping thus referenced should then be just fine for any reasonable time-stamp requirement, and any DSP in the FPGA should also have sufficent accuracy and stability.

 

No extra hardware required for RTC....

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
Expert Contributor
linnj
Posts: 1,038
Registered: ‎09-10-2008
0

Re: RTC on Zynq 7000 Linux?

The 1st question when using a device is does it have a Linux driver. If not, then you'll need to write a driver for it, if you want it to integrate into Linux.
John Linn
Xilinx Employee
austin
Posts: 3,681
Registered: ‎02-27-2008
0

Re: RTC on Zynq 7000 Linux?

John,


Oh yes, there is that "what if the power fails" issue for a RTC.  Like you say, any small RTC chip does this job far cheaper and easier that anything we can do, so the choice of a RTC chip, and a lithium coin cell, is probably required for making sure you do not lose track of time if the power fails.  We we did not do it, is that the flash needed isn't in the 28nm TSMC HPL process (such mixed processes are not available for some time AFTER the the others, so it is of no commercial use to us -- being late to market is not an option!).

 

In this application, I imagine the information is either transferred to the systems on shore for as long as it is running, or the information is stored in a flash in the system, until the euipment is retrieved from the bottom of the sea.  In either case, the power is there, uninterrupted, so no RTC chip is needed.

Austin Lesea
Principal Engineer
Xilinx San Jose
Xilinx Employee
austin
Posts: 3,681
Registered: ‎02-27-2008
0

Re: RTC on Zynq 7000 Linux?

[ Edited ]

John,


And, having a driver for the RTC is going to make life a lot easier, so the Zynq board  (ZC702) is definitely a good place to start, as it has the hardware, and the software!

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
Visitor
michaelbrookswfs
Posts: 12
Registered: ‎06-21-2012
0

Re: RTC on Zynq 7000 Linux?

Austin and John, thanks for your contributions - all very much appreciated.

 

Michael