Re: Synchronization between ISR and IST - I2C Based device
- From: "Srivathsan" <srivathsan.a@xxxxxxxxx>
- Date: 23 Dec 2006 07:52:28 -0800
Geff
This is our Device architecture
Au1200 Processssor->SmbusController->Philips Uart
->Device 2
-> Device 3
The Smbus Controller doesnot int mechism it uses progrmmed IO to read
and write from the SMBus .
The UART is a DUAL channel with single IRQ.
when interrupt occurs we need to resolve the UART so that correct IST
can service the interrupt.
We have driver with critical section in the SMbus driver.
We are accessing the SMBus in the ISR to read the Interrrupt
Identification Register of the UART so as to find out the correct UART
that producesd the interrupt and trigger the appropriate logical
interrupt of the UART.
When the SMBus is in use by the driver and the interrupt occurs from
the UART the ISR ckecks the BUS BUSY and waits in an infinate loop.
This causes a deadlock in the OS.
We would like to know whether any method is there to sync the ISR and
the driver so that the deadlock is not happening.
Is is correct to disable the UART interrupt when a device access the
SMBus Driver for Read or Write.
Can we write a seperate driver to handle the UART Interrupt using the
SMBus driver and trigger the UART IST. This requires the MDD meeds to
be modified. Since the Driver is having the critical sections this will
not hang the system but delay the Interrupt servicing for the UART.
We would like to know whether there is any mechanism to restrtict ISR
from the uart from operation.
We tried to use the SMBus driver in the ISR i think the Stream driver
interface cannot be accessed in the ISR, we also tried the GIIsr even
this tells that u need to use only Fulllibc and not the corelib.dll
which contails the create file implementations.
Waiting for the reply.
mams and team
Geoff wrote:
Never ever block in an ISR, leave that to the IST.
It sounds to me that your system design is a little flawed, your idea of
a layered I2C driver is probably better then having the I2C driver in
for each of your devices.
The i2c driver will service all interrupts then marshall the data to
attached i2c devices.
Geoff
--
Mams wrote:
Dear Greats,
We are using dual I2C Philips UART with single interrupt line source.
We have implemented ISR that reads the Interrupt Status Register
through I2C communication and resolves the proper UART1/UART2 logical
interrupt.
We having 3 devices communicating in I2C line from application layer
continuously. We are using I2C drivers (with critical sections in
place) to restrict I2C bus access.
The problem we are facing one of the device holds the I2C bus longer
time and if an interrupt comes from I2C UART. Then the ISR service may
not get the bus and the ISR will wait for bus release (dead lock occurs
here and the system hangs).
We like to know how to getrid of this deadlock condition by
1. applying any intermediate level driver (Which will resolve the
interrupt (UART1/UART2) in the driver level)
2. any mechanism to have synchronization between ISR and Driver
3. Sharing of interrupts
Kindly provide us some information, we are in high pressure.
With regards,
mams
.
- Follow-Ups:
- Re: Synchronization between ISR and IST - I2C Based device
- From: Steve Maillet \(eMVP\)
- Re: Synchronization between ISR and IST - I2C Based device
- References:
- Prev by Date: Re: DHCP not renewing lease
- Next by Date: Re: Synchronization between ISR and IST - I2C Based device
- Previous by thread: Re: Synchronization between ISR and IST - I2C Based device
- Next by thread: Re: Synchronization between ISR and IST - I2C Based device
- Index(es):
Relevant Pages
|