This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TPS659113 with DM8148 RTC time error issue

Hi,

We use the DM8148 EVM with PMIC tps659113 to set the RTC time,
20 minutes PMIC RTC will be about 10 seconds the error, (PS EVM conditions in the boot)

Please help clarify this issue, thank you!!

The detail set RTC step list below:

1. Trun on EVM and enter EZSDK root filesystem,

2. Set PMIC TPS659113 RTC_CTRL_REG register bit 0 to 1(RTC is running).

3. Set the current time to system "data -s xx:xx:xx"

4. write data to hwclock "hwlock -w"

5. Run script "8148toPMIC.sh to set hwclock time to PMIC RTC"

6. Wait about 20 minutes to run script "get-PMIC-RTC.sh" to read RTC time and hwclock time"

#!/bin/sh

# seconds
regval=`echo $(devmem2 0x480C0000) | cut -d ' ' -f 13 | cut -c 9-10`
i2cset -f -y 1 0x2d 0x00 0x$regval 

# minutes
regval=`echo $(devmem2 0x480C0004) | cut -d ' ' -f 13 | cut -c 9-10`
i2cset -f -y 1 0x2d 0x01 0x$regval 

# hours
regval=`echo $(devmem2 0x480C0008) | cut -d ' ' -f 13 | cut -c 9-10`
i2cset -f -y 1 0x2d 0x02 0x$regval 

# days
regval=`echo $(devmem2 0x480C000C) | cut -d ' ' -f 13 | cut -c 9-10`
i2cset -f -y 1 0x2d 0x03 0x$regval 

# months
regval=`echo $(devmem2 0x480C0010) | cut -d ' ' -f 13 | cut -c 9-10`
i2cset -f -y 1 0x2d 0x04 0x$regval 

# years
regval=`echo $(devmem2 0x480C0014) | cut -d ' ' -f 13 | cut -c 9-10`
i2cset -f -y 1 0x2d 0x05 0x$regval 

#!/bin/sh

# get years
regval=$(i2cget -f -y 1 0x2d 0x05)
valYEAR=`echo ${regval} | cut -c 3-4`

# get months
regval=$(i2cget -f -y 1 0x2d 0x04)
valMONTH=`echo ${regval} | cut -c 3-4`

# get days
regval=$(i2cget -f -y 1 0x2d 0x03)
valDAY=`echo ${regval} | cut -c 3-4`

# get hours
regval=$(i2cget -f -y 1 0x2d 0x02)
valHOUR=`echo ${regval} | cut -c 3-4`

# get minutes
regval=$(i2cget -f -y 1 0x2d 0x01)
valMINUTE=`echo ${regval} | cut -c 3-4`

# get seconds
regval=$(i2cget -f -y 1 0x2d 0x00)
valSECOND=`echo ${regval} | cut -c 3-4`

echo $valMONTH.$valDAY $valHOUR:$valMINUTE:$valSECOND 20$valYEAR
hwclock -r