4 Replies Latest reply on Jul 10, 2019 2:20 AM by alou_4345641

    RTC values not changing using FM3164

    alou_4345641

      Hi,

      I am using FM3164 for reading RTC. I interface the F-RAM with my controller(TM4C123) and able to read and write values in to the  Time registers. I2C communication is working properly. I have connected the 32.768KHz crystal and made the OSCEN bit low in the 01h address. If the RTC is working properly then it should change the time value in those registers but it is not changing the values. why it is not changing.I don't know I need to set any other register for enabling RTC or I need to use event counter for enabling RTC. If I need to use event counter then for edge triggering of the counter I need to give supply for the controller.Then it won't work in power off condition of the controller. Now CNT1 and CNT2 are connected to ground. Please let me know how to enable the RTC. Is I need to set any register for enabling the RTC or the external crystal itself will change the time.

       

      Thank you,

      Alphy

        • 1. Re: RTC values not changing using FM3164
          PradiptaB_11

          Hi Alphy,

           

          The RTC will run continuously even if the main power fails as long as a 3-V backup power source is connected to the VBAK input pin. A backup source can be either a 3-V battery or a super capacitor. The default factory settings disable the RTC oscillator. To start and configure the RTC, the C bit (register 01h, bit 7) must first be set to 0. Then, the clock and calendar registers must be written to reflect the current time, day, and date.

          Can you once follow the below steps and let us know your observations

          1. Apply VDD power.

          2. Apply battery to VBAK.

          3. Set the VDD voltage trip point bit, VTP, if you prefer a setting higher than the default setting.

          4. Enable the RTC oscillator (set OSCEN# = 0).

          5. Enter the RTC calibration mode (CAL = 1).

          6. Determine the RTC clock error and sign by monitoring the 512-Hz output (CAL/PFO pin). Use a frequency counter. You should get a output here indicating the RTC circuitry is working. Please check for this

          7. Write the error correction value to CALS and CAL (4:0). See the calibration adjustments table in the datasheet. You can enter the values as zero also indicating no error

          8. Exit the calibration mode (CAL = 0).

          9. Set the Write bit (W bit) to enable writing the time-day-date values to the RTC.

          10. Write the time-day-date values to registers 02h–08h.

          11. Clear the W bit to start the RTC with new values.

          12. Resume Normal operation.

           

          To read the RTC, follow this simple three-step procedure:

          1. Set the Read bit (R bit), which takes a snapshot of the RTC registers (assumes R is previously at logic 0).

          2. Issue the Read Processor Companion command (slave ID 1101b), starting at address 02h, and read seven RTC bytes (02h–08h).

          3. Clear the R bit to prepare for the next RTC read. You should see updated values.

           

          Thanks,

          Pradipta.

          • 2. Re: RTC values not changing using FM3164
            alou_4345641

            Hi,    

                Thank you for your quick reply. I tried to check the device with the steps what you told in the previous mail.

            I took VTP as default setting and made the 01h register as 0x00 and 00h(made OSCEN# as 0) register as 0x04(CAL bit high). I flash the code on the controller, I was getting some signal which is going high and low state but not in the form of a pulse. Then I check the capacitor which connected to the crystal and the value was wrong, so that issue came. So I changed the capacitor value to 18pf and again connect the device and tried to flash the same code then I am getting "no direct memory access" I am not able to flash the code.what is causing the problem to this device.The crystal I am using is having frequency 32.768KHz.

            In step 10 you are telling to write time and date details, those values I need to write in hex format or not.For example,for time 10:05:3,  register 0x02 write  value as 0x03 for second, register 0x03 write  value as  0x05 for minute and register 0x04 write  value as  0x0A for hour.Is this format is write.

            Thank you,Alphy

                On Tuesday, July 9, 2019, 12:20:09 PM GMT+5:30, PradiptaB_11 <community-manager@cypress.com> wrote: 

             

              #yiv2898962489 * #yiv2898962489 a #yiv2898962489 body {font-family:Helvetica, Arial, sans-serif;}#yiv2898962489 #yiv2898962489 h1, #yiv2898962489 h2, #yiv2898962489 h3, #yiv2898962489 h4, #yiv2898962489 h5, #yiv2898962489 h6, #yiv2898962489 p, #yiv2898962489 hr {}#yiv2898962489 .yiv2898962489button td {}

            |

             

              Cypress Developer Community 

             

             

             

            |

            RTC values not changing using FM3164

             

            reply from PradiptaB_11 in Nonvolatile RAM (F-RAM and nvSRAM) - View the full discussion

             

            Hi Alphy,

             

             

             

            The RTC will run continuously even if the main power fails as long as a 3-V backup power source is connected to the VBAK input pin. A backup source can be either a 3-V battery or a super capacitor. The default factory settings disable the RTC oscillator. To start and configure the RTC, the C bit (register 01h, bit 7) must first be set to 0. Then, the clock and calendar registers must be written to reflect the current time, day, and date.

             

            Can you once follow the below steps and let us know your observations

             

            1. Apply VDD power.

             

            2. Apply battery to VBAK.

             

            3. Set the VDD voltage trip point bit, VTP, if you prefer a setting higher than the default setting.

             

            4. Enable the RTC oscillator (set OSCEN# = 0).

             

            5. Enter the RTC calibration mode (CAL = 1).

             

            6. Determine the RTC clock error and sign by monitoring the 512-Hz output (CAL/PFO pin). Use a frequency counter. You should get a output here indicating the RTC circuitry is working. Please check for this

             

            7. Write the error correction value to CALS and CAL (4:0). See the calibration adjustments table in the datasheet. You can enter the values as zero also indicating no error

             

            8. Exit the calibration mode (CAL = 0).

             

            9. Set the Write bit (W bit) to enable writing the time-day-date values to the RTC.

             

            10. Write the time-day-date values to registers 02h–08h.

             

            11. Clear the W bit to start the RTC with new values.

             

            12. Resume Normal operation.

             

             

             

            To read the RTC, follow this simple three-step procedure:

             

            1. Set the Read bit (R bit), which takes a snapshot of the RTC registers (assumes R is previously at logic 0).

             

            2. Issue the Read Processor Companion command (slave ID 1101b), starting at address 02h, and read seven RTC bytes (02h–08h).

             

            3. Clear the R bit to prepare for the next RTC read. You should see updated values.

             

             

             

            Thanks,

             

            Pradipta.

             

            Reply to this message by replying to this email, or go to the message on Cypress Developer Community

            Start a new discussion in Nonvolatile RAM (F-RAM and nvSRAM) by email or at Cypress Developer Community

            Following RTC values not changing using FM3164 in these streams: Inbox

             

             

            This email was sent by Cypress Developer Community because you are a registered user.

            You may unsubscribe instantly from Cypress Developer Community, or adjust email frequency in your email preferences

               

             

             

             

            • 3. Re: RTC values not changing using FM3164
              PradiptaB_11

              Hi Alphy,

               

              You have to enter time and date as follows

              For example

              if you want to enter time 2:30:45 pm

              you will set

              sec as 0x45

              min as 0x30

              hrs as 0x14 (2 pm)

               

              We have two app notes to help you out further which explain the RTC circuitry and the oscillator circuit and the caps to go with it. Kindly go through it once.

              https://www.cypress.com/file/135881/download

              https://www.cypress.com/file/136486/download

               

               

              Thanks,

              Pradipta.

              • 4. Re: RTC values not changing using FM3164
                alou_4345641

                Hi,

                Sorry for the late reply. I resolved the issue yesterday only.The data it is displaying on my LCD.

                Thank you so much for your help.

                 

                Thank you,Alphy

                 

                    On Wednesday, July 10, 2019, 02:34:50 PM GMT+5:30, PradiptaB_11 <community-manager@cypress.com> wrote: 

                 

                #yiv2144275031 * #yiv2144275031 a #yiv2144275031 body {font-family:Helvetica, Arial, sans-serif;}#yiv2144275031 #yiv2144275031 h1, #yiv2144275031 h2, #yiv2144275031 h3, #yiv2144275031 h4, #yiv2144275031 h5, #yiv2144275031 h6, #yiv2144275031 p, #yiv2144275031 hr {}#yiv2144275031 .yiv2144275031button td {}

                |

                 

                  Cypress Developer Community 

                 

                 

                 

                |

                RTC values not changing using FM3164

                 

                reply from PradiptaB_11 in Nonvolatile RAM (F-RAM and nvSRAM) - View the full discussion

                 

                Hi Alphy,

                 

                 

                 

                You have to enter time and date as follows

                 

                For example

                 

                if you want to enter time 2:30:45 pm

                 

                you will set

                 

                sec as 0x45

                 

                min as 0x30

                 

                hrs as 0x14 (2 pm)

                 

                 

                 

                We have two app notes to help you out further which explain the RTC circuitry and the oscillator circuit and the caps to go with it. Kindly go through it once.

                 

                https://www.cypress.com/file/135881/download

                 

                https://www.cypress.com/file/136486/download

                 

                 

                 

                 

                 

                Thanks,

                 

                Pradipta.

                 

                Reply to this message by replying to this email, or go to the message on Cypress Developer Community

                Start a new discussion in Nonvolatile RAM (F-RAM and nvSRAM) by email or at Cypress Developer Community

                Following RTC values not changing using FM3164 in these streams: Inbox

                 

                 

                This email was sent by Cypress Developer Community because you are a registered user.

                You may unsubscribe instantly from Cypress Developer Community, or adjust email frequency in your email preferences