This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

newbie question regarding i2c device drivers


I've just finished a hal port of an I2C driver to an Philips LPC2124.  I'm new to embedded software having come from a Windows background, so I've got a few questions..

I took the brute-force-and-ignorance approach and based my driver on a template for an atmel arm 9 (at91rm9200).  All I did was rework register definitions and the like.

Ok

The LPC2124 provides integrated I2C support.  The data sheet for the LPC2124 states that if (a) the generation of a start condition is requested by software and (b) an external device is acting as bus master that the integrated I2C handler will wait (indefinitely) for an oppotunity to generate a start condition AND not generate an interrupt in the interim.

Now I may have got this the wrong way, but with structure of the I2C drivers that I've seen couldn't this result in the I2C client thread being suspended indefinitely.  I'm concerned that some physical condition on the bus may prevent the generation of an I2C interrupt.  This would prevent the release of the client thread, would it not??  WOuld it be appropriate to introduce a watchdog timer for the interrupt handler to safeguard against such conditions?

Cheers,

Steve

-- 
----------------------------------------------------
Steve Simpson

Genesys Design Pty Ltd
Unit 5, 33 Ryde Road
Pymble NSW 2073
AUSTRALIA

ph:     +61 2 9499 7677
fax:    +61 2 9499 7877
email:  s.simpson@genesysdesign.com.au
www: http://www.genesysdesign.com.au/
----------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]