Interfacing of RTC in I.MX28EVK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interfacing of RTC in I.MX28EVK

1,711 Views
Ramtry
Contributor III

Hi

I am developing new custom board based on i.mx283 processor

with porting linux on it. Main power supply is 5V without Li-ion

Battery. Is there way to connect 3V coin cell to support on-board

RTC?. Battery current for On-Board RTC is 20uA. if am using the

coin-cell of 38mAh then the battery life is 1330h. Which is not

enough for my application. Or any other way to support on-board

RTC battery?


if i try to use externel RTC (ISL1208) which interface through I2C

protocol. I2C0 is already using for Audio codec IC. But i found the

RTC driver are available for ISL1208 in LTIB.

Please suggest me what is the right way to use RTC? Waiting for

your response.



Thanks & Regards,

RAM

Labels (2)
0 Kudos
7 Replies

859 Views
Ramtry
Contributor III

Hi,

I fixed this problem.. Thank you very much guys.. The solutions are as follows

static const struct i2c_device_id isl1208_id[] = {

      { "isl1208", 0 },

      { }

};

static struct i2c_driver isl1208_driver = {

      .driver = {

               .name = "rtc-isl1208",

               },

      .probe = isl1208_probe,

      .remove = isl1208_remove,

      .id_table = isl1208_id,

};

So please change i2c device id name like the following, then test it if you can read clock:

static const struct i2c_device_id isl1208_id[] = {

      { " rtc-isl1208", 0 },

      { }

};

Thank you,

RAM

0 Kudos

859 Views
Ramtry
Contributor III

Hi,

I connected RTC (ISL1208) to I2C0 channel and selected RTC driver in LTIB (Device Drivers -> Real Time Clock -> Intersil ISL1208)

Made changes in MX28EVK.C file as follows.

static struct i2c_board_info __initdata mxs_i2c_device[] = {

  //{ I2C_BOARD_INFO("sgtl5000-i2c", 0xa), .flags = I2C_M_TEN }

  { I2C_BOARD_INFO("rtc-isl1208", 0x6f), .flags = I2C_M_TEN }

};

Complied the kernel and boot the board. But am not able to find any files in /sys/class/rtc.

I don't know where am missing to edit. Suggest me to find it.

Thanks & Regards,

RAM

0 Kudos

859 Views
GraceH
Senior Contributor II

you should use  { I2C_BOARD_INFO("isl1208", 0x6f), .flags = I2C_M_TEN }, because the i2c device name in rtc-isl1208.c is

"isl1208".   You can also trace function isl1208_probe to check whether the device is registered successfully.

0 Kudos

859 Views
imxcommunitysco
Senior Contributor II

Hi RAM,

Just want to clarify what you are looking for first.

Are you looking for a circuit for connecting a coin cell to i.MX28 or looking for way to connect a external RTC via I2C?

Thanks,

Arthur

0 Kudos

859 Views
Ramtry
Contributor III


A little clarification about the Battery Life. Formula: Battery Life = (Battery capacity in mAh)/(Load Current mA) From the observation of i.mx28 Datasheet. 21uA of current draw in offstate current at 32-kHz RTC off. For instance if am using the coin- cell of 38mAh then Battery life = 38mAh/21uA Battery Life = 1064 hour. which is almost 45 days. So, my coin-cell battery will last only for 45 days when the board is not powered up. Is it right about my calculation and understanding? Please clarify if it's wrong.



Thank you, RAM

0 Kudos

859 Views
Yuri
NXP Employee
NXP Employee

Your calculation regarding battery life are correct in general.


Please pay attention - to get i.MX28 working - battery voltage should be in range 3.1 V - 4.242 V,
that is, the battery should not be fully discharged.

Next, it makes sense to be oriented on max values of current consumption (~50uA).  

Also, when 5V is applied, additional current from the battery may be drained.
This is not problem for chargeable sources (supercap, accumulator), but will
decrease lifetime of non-chargeable battery.  

859 Views
Ramtry
Contributor III

Hi Yuri,

Thank you for valuable information.

0 Kudos