Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RTC driver

156 views
Skip to first unread message

Rameshchandra

unread,
Sep 3, 2008, 1:11:00 AM9/3/08
to
Hi all,

I am working on AT91SAM9263 arm based board. I am in the process of writing
RTC driver for it. I am using DS1337s chip as my rtc. It is connected via
I2C(two wire) interface. I have a i2c driver in my board which is up and
running completely. But developing the entire driver from scratch seems to
take time. I could see the rtc stub driver in the public directory. Whether
anyone built rtc driver in wince using this chipset?. Apologize me for
mentioning linux here. Linux is providing ds1337s driver with its kernel.
Whether wince is giving such kind of stuffs for any standard rtc chip like
ds1337s? Please guide me if someone has worked on this rtc chip on wince...

Thanks in advance..
--
Ramesh.c
Innovate Software Solutions.
Bangalore.

Luca Calligaris

unread,
Sep 3, 2008, 2:18:46 AM9/3/08
to
You probably can avoid writing a driver for the RTC chip: you can implement
the HW access in OEMSetRealTime, OEMGetRealTime, OEMSetAlarmTime in the OAL;
if the I2C driver
accesses other devices you need to sync the operation beteween the driver
and the OAL. The chip is quite simple, so if you already have the primitives
to R/W on the I2C bus you shouldn't
spend much time for it

--

Luca Calligaris
www.eurotech.it

"Rameshchandra" <Ramesh...@discussions.microsoft.com> ha scritto nel
messaggio news:A583E525-8EEA-47E0...@microsoft.com...

Valter Minute

unread,
Sep 3, 2008, 3:51:55 AM9/3/08
to
"Luca Calligaris" <anon...@discussions.microsoft.com> wrote in
news:e437pyYD...@TK2MSFTNGP06.phx.gbl:

> You probably can avoid writing a driver for the RTC chip: you can
> implement the HW access in OEMSetRealTime, OEMGetRealTime,
> OEMSetAlarmTime in the OAL; if the I2C driver
> accesses other devices you need to sync the operation beteween
> the driver and the OAL. The chip is quite simple, so if you
> already have the primitives to R/W on the I2C bus you shouldn't
> spend much time for it

You can avoid to use I2C each time OEMGetRealTime is called.
Usually you can read the external RTC via I2C at OS startup (inside
OEMInit), so you don't have to care about I2C sharing issues, and use
that value to initialize the microprocessor own internal RTC or one of
its timers.
OEMGetRealTime could simply read it without the need to sync and
access a slow I2C connection.
If you need to sync the two RTC (maybe the internal RTC isn't very
accurate) you can do that inside a "dummy" driver that spin its own
thread and read the external I2C clock using your standard I2C driver.
OEMSetRealTime should write to the external I2C controller or provide
some kind of "wake-up" for an upper level driver that can perform this
operation using your standard I2C driver.


--
Valter Minute
www.fortechembeddedlabs.it
Training, support and development for Windows CE
(the reply address of this message is invalid)

K. S. Huang

unread,
Sep 3, 2008, 9:12:40 PM9/3/08
to
If you have installed CE6, the OMAP2420 / H4Sample BSP which is using I2C to
access the external RTC.
This BSP implements an I2C driver (part of OAL) and demonstrate that how a
generic stream interface I2C driver could interact with the OAL I2C driver.
The RTC relative code could be found in
$(_WINCEROOT)\PLATFORM\COMMON\SRC\SOC\OMAP2420_MS_V1\OAL\RTC

Other OMAP based BSPs say OMAP2430 or OMAP1030 dose implment a stand alone
RTC driver and communite with OAL with Event and Kernel IOCTLs but these
code may not be available in regualr CE BSP but only for Windows Mobile
Adaption Kit.

"Valter Minute" <v_a_l_t_e_r.m_i_n_u_t_e@g_m_a_i_l.com> wrote in message
news:Xns9B0E645B1C3...@207.46.248.16...

Elio Dell'Acqua

unread,
Jan 22, 2012, 4:15:10 PM1/22/12
to
Salve , ho sviluppato su una card con AT91SAM9261 e piattaforma windows CE 6.0 R3 una comunicazione E2C con un orologio esterno DS3231. Tutto sembra funzionare quando utilizzo la funzione OEMGetRealTime , pero' quando cerco di scrivere il componente utilizzando la casella di impostazione orologio la routine OEMSetRealTime non viene lanciata e mi compare il messaggio :Notification Error : Cannot execute calnot.exe
e non capisco cosa devo fare.
Vi ringrazio per qualsiasi idea mi inviate.


Hi.
I have developed a card with AT91SAM9261 Windows CE 6.0 R3 platform and a communication with an external clock DS3231 E2C. Everything seems to work when I use OEMGetRealTime, but 'when I try to write the part with the box setup routine OEMSetRealTime clock is not launched, and I get the message:
Notification Error: Can not execute calnot.exe
and do not understand what to do.
Thank you for any ideas you send me.

Dell'Acqua
















> On Wednesday, September 03, 2008 1:11 AM Rameshchandr wrote:

> Hi all,
>
> I am working on AT91SAM9263 arm based board. I am in the process of writing
> RTC driver for it. I am using DS1337s chip as my rtc. It is connected via
> I2C(two wire) interface. I have a i2c driver in my board which is up and
> running completely. But developing the entire driver from scratch seems to
> take time. I could see the rtc stub driver in the public directory. Whether
> anyone built rtc driver in wince using this chipset?. Apologize me for
> mentioning linux here. Linux is providing ds1337s driver with its kernel.
> Whether wince is giving such kind of stuffs for any standard rtc chip like
> ds1337s? Please guide me if someone has worked on this rtc chip on wince...
>
> Thanks in advance..
> --
> Ramesh.c
> Innovate Software Solutions.
> Bangalore.


>> On Wednesday, September 03, 2008 2:18 AM Luca Calligaris wrote:

>> You probably can avoid writing a driver for the RTC chip: you can implement
>> the HW access in OEMSetRealTime, OEMGetRealTime, OEMSetAlarmTime in the OAL;
>> if the I2C driver
>> accesses other devices you need to sync the operation beteween the driver
>> and the OAL. The chip is quite simple, so if you already have the primitives
>> to R/W on the I2C bus you shouldn't
>> spend much time for it
>>
>> --
>>
>> Luca Calligaris
>> www.eurotech.it
>>
>> "Rameshchandra" <Ramesh...@discussions.microsoft.com> ha scritto nel
>> messaggio news:A583E525-8EEA-47E0...@microsoft.com...


>>> On Wednesday, September 03, 2008 3:51 AM Valter Minute wrote:

>>> "Luca Calligaris" <anon...@discussions.microsoft.com> wrote in
>>> news:e437pyYD...@TK2MSFTNGP06.phx.gbl:
>>>
>>>
>>> You can avoid to use I2C each time OEMGetRealTime is called.
>>> Usually you can read the external RTC via I2C at OS startup (inside
>>> OEMInit), so you don't have to care about I2C sharing issues, and use
>>> that value to initialize the microprocessor own internal RTC or one of
>>> its timers.
>>> OEMGetRealTime could simply read it without the need to sync and
>>> access a slow I2C connection.
>>> If you need to sync the two RTC (maybe the internal RTC isn't very
>>> accurate) you can do that inside a "dummy" driver that spin its own
>>> thread and read the external I2C clock using your standard I2C driver.
>>> OEMSetRealTime should write to the external I2C controller or provide
>>> some kind of "wake-up" for an upper level driver that can perform this
>>> operation using your standard I2C driver.
>>>
>>>
>>> --
>>> Valter Minute
>>> www.fortechembeddedlabs.it
>>> Training, support and development for Windows CE
>>> (the reply address of this message is invalid)


0 new messages