Im making a driver for a serial port over gpio operating assynchronous, so i need make sure that the samples are made at precise time intervals. Using ndelay makes the job, but the first bit sometimes takes to much time to be sampled and the byte is corrupted. The first bit is sampled after a interrupt by a tasklet and the time elapsed between the interrupt and the start of the tasklet is not always the same, what makes the first bit corrupted. Im using an ARM processor and the ARM family dont have a clock counter, what would be a great solution. The time between two bits is 8us (115200 bps) and im using the kernel 2.4.6. Anyone have any idea of what i could use instead, or, how could i solve the first bit issue? PS.:Sorry if i wrote something wrong, im brazilian.