element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Robotics
  • Technologies
  • More
Robotics
Forum RTC (Real Time clock) Cypress oscillator fails (oscf flag = 1), what happens ?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Robotics to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 6 replies
  • Subscribers 61 subscribers
  • Views 1375 views
  • Users 0 members are here
  • "real
  • clock"
  • rtc
  • time
  • cypress
Related

RTC (Real Time clock) Cypress oscillator fails (oscf flag = 1), what happens ?

mmtsuchi
mmtsuchi over 16 years ago

Hi,

 

On a custom bord, I have a RTC Cypress CY14B101k wich is a nvRAM, with Real Time Clock Calendar, Alarm Clock and Watchdog.

This board uses a superCapacity (not battery) for this "RTC".

 

When the board is OFF, RTC is running quite well : the time seems correct.

 

The problem is when the board is ON, the RTC seems stopped and OSCF (Oscillator Failure) flag is set to 1.

My question is : What are the reasons that causes oscillator stop ?

 

I don't use Watchdog, alarm, interrupt.

Writing a 0 to OSCEN_n causes OSCF=0 (good) but 6 seconds later OSCF=1 and the time is not running.

 

Best regards,

  • Sign in to reply
  • Cancel
  • Oliver
    0 Oliver over 16 years ago
    Hi:
     
    “RTC seems stopped and OSCF (Oscillator Failure) flag is set to 1” does not mean that the oscillator stopped working. You should check either it works or not.
     
    Following is the description in CY14B101K datasheet:
     
    “When the device is powered on (VCC goes above VSWITCH), the OSCEN bit is checked for “enabled” status. If the OSCEN bit is enabled and the oscillator is not active within the first 5 ms, the OSCF bit is set to “1”. The system must check for this condition and then write ‘0’ to clear the flag. Note that in addition to setting the OSCF flag bit, the time registers are reset to the “Base Time” (see “Setting the Clock” on page 7), which is the value last written to the time keeping registers. The Control or Calibration registers and the OSCEN bit are not affected by the “oscillator failed” condition.”
    The OSCF is Set to 1 on power up if the oscillator is enabled and not running in the first 5 ms of operation. This indicates that RTC backup power failed and clock value is no longer valid. The user must reset this bit to 0 to clear this condition (Flag). The chip does not clear this flag.
     
    It seems that the clock value is no longer valid, not “RTC seems stopped”, Maybe.
     
    Best wishes,
    Oliver zhang
    Attachments:
    imageCY14B101K1.pdf
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mmtsuchi
    0 mmtsuchi over 16 years ago in reply to Oliver

    Thanks for the answer.

     

    I "scoped" the quartz signals. I may introduce impedance with the oscilloscope.

     

    When the RTC chip is on CAPacitor, I can see sinusoïdal waveform with an offset. VX1= 0.4Vac + 0.6Vdc

     

    When the RTC chip is not sollicited (Address bus and data bus not changed during 10  seconds), I can see high sinusoïdal waveform VX1= 1.4Vac + 0.7Vdc

     

    This RTC chip shares its address bus and data bus with SRAM and FLash.

    Tests of address bus and data bus (verify if one is "stuck") are OK.

     

    On a Application Note form Cypress, it is reported that undershoot may stop Oscillator. I put Schottky diode on critical signals to limit undershoot.

    But no changes.

     

    It is like Oscillations are "pumped" to 0V.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Oliver
    0 Oliver over 16 years ago
    I "scoped" the quartz signals. I may introduce impedance with the oscilloscope.
    When the RTC chip is on CAPacitor, I can see sinusoïdal waveform with an offset. VX1= 0.4Vac + 0.6Vdc
    ÞThat is right! When the RTC chip is on capacitor, the /OSCEN bit should be set to 1 to turn off the oscillator to extend the battery life.
    When the RTC chip is not sollicited (Address bus and data bus not changed during 10  seconds), I can see high sinusoïdal waveform VX1= 1.4Vac + 0.7Vdc
    ÞIt seems that the oscillator is working, because that you can see high sine waveform on VX1 pin. I think if you can see vx1=1.4v ac, the data and address buses should be changed definitely.
    This RTC chip shares its address bus and data bus with SRAM and FLash.
    Tests of address bus and data bus (verify if one is "stuck") are OK.
    On a Application Note form Cypress, it is reported that undershoot may stop Oscillator. I put Schottky diode on critical signals to limit undershoot.But no changes.
    ÞWhere you put the schottky diode? On an app note from Cypress, the undershoot less than -0.5v may stop oscillator, but there is an offset on vx1 pin, so the minimum value of sine waveform is zero.
    You can debug the trouble step by step:
    Move the capacitor away, then power on the system, set /OSCEN bit=0 to enable oscillator. Use scope to test the vx1 pin after 5-10s. Pls monitor the OSCF bit continuous, if the oscillator is stopped, OSCF bit will be set to 1, and you should write a zero to clear the flag.
    Do not care the time is correct or not.
    Best wishes,
    Oliver zhang
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mmtsuchi
    0 mmtsuchi over 16 years ago in reply to Oliver

    Hi,

     

    I put SMD Schottky Diodes on DO, A[3..0].

    It is better but not enough : oscillations can be observed but they are attenuated slowly.

     

    "move the capacitor away" Do you mean the supercapacitor ?

     

    I also wrote a thread on Cypress site. They answer well and quickly. do not see any concurrence :-)

    My problem is still here.

     

    I may suspect my quartz because of marketing information.

    Best regards.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Oliver
    0 Oliver over 16 years ago

    yes, move the supercapacitor away, because the RTC is correct when system is power off. move it to avoid any negative impact.

     

    it is a good choose to replace a good crystal .

     

    best regard!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mmtsuchi
    0 mmtsuchi over 16 years ago in reply to Oliver

    At Cypress', they are aware of oscillations problems. The reasons are undershoot on some signals and antenna problem.

    They release other ships which avoid undershoot issues and they will release an application note to make a better design.

     

    Thanks for all.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube