Jump to content
OMRON Forums

Time and Date not working on PPMAC


KEJR
 Share

Recommended Posts

Hello,

 

I keep losing time on the PPMAC (two different systems). This is what I do and yet it comes back wrong after a while:

 

date -s wed jul 30 19:41:00 EST 2008″ (set linux time)

hwclock –systohc (set hardware clock time)

 

Is there a different command to issue since this is an embedded PowerPC system?

 

Thanks,

KEJR

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

There was an issue in the u-boot loader that was causing battery drain. The serial real-time clock part used in the design is an STMicro M41T62. This part has a full-time 32KHz square wave output that is connected to the TmrClk input to the processor. The default state for this square wave output is enabled so the output runs continuously when the board is powered normally and also from the battery. The TmrClk input to the processor goes to ground when the power is removed from the board/processor, and therefore the running square wave output is driving ground which drains the battery quickly.

 

Way too much information but the bottom line is we upgraded to a newer u-boot loader along with the vendor changing the CPU to lower power and I am using a board that has held its date for ~2-3 months.

 

Hello,

 

I keep losing time on the PPMAC (two different systems). This is what I do and yet it comes back wrong after a while:

 

date -s wed jul 30 19:41:00 EST 2008″ (set linux time)

hwclock –systohc (set hardware clock time)

 

Is there a different command to issue since this is an embedded PowerPC system?

 

Thanks,

KEJR

 

 

Link to comment
Share on other sites

Hello again,

 

Way too much information but the bottom line is we upgraded to a newer u-boot loader along with the vendor changing the CPU to lower power and I am using a board that has held its date for ~2-3 months.

 

I'm an engineer, I appreciate this information. Anyhow, can we get the bootloader updated, or are we stuck with this issue on these two boards? I guess I can rig an NTP time sync for now on these two boards. Its really only a pain at this point when I need to write new data to the disk and don't want old timestamps on everything. So far that is only installing packages and init scripts but at some point we'll add logging and things like that to the system.

 

Thanks again,

KEJR

 

Link to comment
Share on other sites

  • 1 year later...

I am also having this issue. Is there a fix for boards that have this issue?

 

 

Hello again,

 

Way too much information but the bottom line is we upgraded to a newer u-boot loader along with the vendor changing the CPU to lower power and I am using a board that has held its date for ~2-3 months.

 

I'm an engineer, I appreciate this information. Anyhow, can we get the bootloader updated, or are we stuck with this issue on these two boards? I guess I can rig an NTP time sync for now on these two boards. Its really only a pain at this point when I need to write new data to the disk and don't want old timestamps on everything. So far that is only installing packages and init scripts but at some point we'll add logging and things like that to the system.

 

Thanks again,

KEJR

 

Link to comment
Share on other sites

  • 5 months later...

Hello again,

 

Way too much information but the bottom line is we upgraded to a newer u-boot loader along with the vendor changing the CPU to lower power and I am using a board that has held its date for ~2-3 months.

 

I'm an engineer, I appreciate this information. Anyhow, can we get the bootloader updated, or are we stuck with this issue on these two boards? I guess I can rig an NTP time sync for now on these two boards. Its really only a pain at this point when I need to write new data to the disk and don't want old timestamps on everything. So far that is only installing packages and init scripts but at some point we'll add logging and things like that to the system.

 

Thanks again,

KEJR

 

 

Any feedback on getting the NTP up and running? We are tired of dealing with the time issue... and we're thinking on doing the same..

 

Thanks, Luis

Link to comment
Share on other sites

Any feedback on getting the NTP up and running? We are tired of dealing with the time issue... and we're thinking on doing the same..

 

I just looked at my notes and I had to install the "ntpdate" debian package. Its been a while since I did this, but I seem to recall it being a very simple install and it just worked. Keep in mind that with any debian package install you need to deal with the read only filesystem as described in many other posts on this forum. Its probably been over a year since I've installed any deb packages, I hope that debian is still maintaining this version on their servers. For me, I have made all the changes and imaged the flash on the PPMAC so I haven't had to go through this process recently, I just keep restoring the image on new PPMACs that we get. Let me know if you need any more help.

 

KEJR

Link to comment
Share on other sites

  • 3 years later...

Hi KEJR,

 

I was just wondering if you have experienced any issues with "ntpdate" taking up to many resources or messing anything up on the PMAC side. I understand that installing and running ntpdate is a standard linux thing to do, but I just wanted to check since the PMAC is using a real time operating system.

 

Right now I'm writing over our network to a time synced logserver, but considering that I'm sometimes writing strings are 1 kHz rates, I think it would be better to do so locally, so now the timestamps matter.

 

thanks,

windell

 

Any feedback on getting the NTP up and running? We are tired of dealing with the time issue... and we're thinking on doing the same..

 

I just looked at my notes and I had to install the "ntpdate" debian package. Its been a while since I did this, but I seem to recall it being a very simple install and it just worked. Keep in mind that with any debian package install you need to deal with the read only filesystem as described in many other posts on this forum. Its probably been over a year since I've installed any deb packages, I hope that debian is still maintaining this version on their servers. For me, I have made all the changes and imaged the flash on the PPMAC so I haven't had to go through this process recently, I just keep restoring the image on new PPMACs that we get. Let me know if you need any more help.

 

KEJR

Link to comment
Share on other sites

HI Windell,

 

So far I have had no issues. If anything it would probably be at bootup trying to reach the server but I don't know that for sure. Since your application relies on the correct time you would want to check the date/time for validity of some sort.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...