Please help with I2c on S3c processor
Guido Piasenza <[email protected]>
| Newsgroups | gmane.linux.ports.arm.general |
|---|---|
| Message-ID | <[email protected]> |
Hi everyone, I tried to look up this topic everywhere but could not find any reference to it... I am writing a software which interfaces a S3C processor to an A/D through I2C. I am controlling everything in user mode, i.e. I write a strobe and channel selection command to the I2C and I read the results with a word read. The problem is that each read and write operation eats up 10ms. I am not sure where these ms come from, I will try to put some traces in the bus driver to see where it's lost but I suspect that the calling thread is not immediately rescheduled when the interrupt comes and wakes it up. I tried setting the scheduler to FIFO and RR, with priority 99, with and without preemption in the kernel but nothing changes. What am I doing wrong ? I checked data with the oscilloscope to see if the baud rate is too slow but it seems data get sent out very fast and then there is a 10ms delay before further data comes out. Any help really appreciated ! Thanks Guido