I have set up i2c bit banging (bashing) on my Orange Pi one – not without
difficulty,  There are three issues I would like to explore:

- existing drivers, gpioiic

- nanosleep

- input/output on same gpio pin

 

Nanosleep

 

What is the resolution on arm?

 

When I tried to use to  stretch the output pulses the timing was unusable.

 

When creating a square wave with ioctl the shortest period I can get is
about 4 to 6 microseconds due to the execution time of the code.

If I try to stretch the pulse width with nanosleep the pulse width goes to a
minimum of 20 milliseconds even with a count of only 1 nanosecond.

I tried running nanosleep for ½ second (count of 500,000,000) for 1000
iterations and the timing seems to be correct.

Could nanosleep take 20 milliseconds to set up?

Reply via email to