AnsweredAssumed Answered

iMX28 Windows CE 6.0 - Implement RTC through I2C

Question asked by Pravin Yadav on Aug 26, 2015
Latest reply on Sep 17, 2015 by Jim Merkle



We have custom hardware with iMX28 porting Windows CE 6.0. We are using external RTC (M41T81S) which are connected through I2C interface. I am trying to modify some functions like OALIoCtlHalInitRTC, OEMGetRealTime and OEMSetRealTime from rtc.c file (located at C:\WINCE600\PLATFORM\COMMON\SRC\SOC\MX28_FSL_V2_PDK1_9\OAL\RTC). Instead of internal RTC read, we trying to set and get date, time from external RTC through I2C. The I2C implementation lies within i2c_io.cpp and i2cClass.cpp (located at C:\WINCE600\PLATFORM\COMMON\SRC\SOC\MX28_FSL_V2_PDK1_9\I2C\PDK). So questions are -


- How do i initialize I2C interface from RTC files (rtc.c)? If we consider I2C is initializing (through driver initialization) then how do i call ProcessPackets function from rtc.c

- There are no functions like ReadPacket(...) and WritePacket(...) in i2cClass.cpp. only ProcessPackets is available and only accessible through I2C_IOControl(...) (deviceIOControl)


Please share your thoughts on simplest way to implement RTC through I2C.