I2C bus timing on BOE & propgcc
jimmy_boy
Posts: 2
Hi All. How is the bus timing achived on I2C bus when using the i2c drivers with propgcc?
Comments
It looks like PropGCC I2C driver is i2c_driver.c, located in /lib/sys/propeller/i2c_driver.c: https://code.google.com/searchframe#1rh7kcLST58/demos/propboe/libsrc/i2c_driver.c
Or, at least that's one of them. It's all C code, compiled down to a cog image. To answer your specific question: it uses waitcnt.
There is also /lib/sys/propeller/i2c_simple.c, which is not cog based (ie, *MM): https://code.google.com/searchframe#1rh7kcLST58/lib/sys/propeller/i2c_simple.c
i2c_simple.c seems to just run as fast as possible, without any timing. This seems a bit awkward, since some I2C devices might not be able to operate as fast as the Propeller runs that code (not to mention the timing jitters).