can you post / share the code on github what you have ported just in time and can we trydldtechnology wrote:
.. If it helps, I've ported the Arduino i2c driver to a IDF FreeRTOS C project, and get similar results.
I'm trying to write 2 bytes to a small OLED using i2cWrite(), and only see the address and first byte on the logic analyzer.
Looking at the i2c registers, all the status bits look as expected, but the last command (I2C_CMD_STOP) never completes and the i2c driver gets stuck in a loop waiting for it.
your code?
if not possible, can you test your "register write", "register clear" code with this add after each write, clear:
Code: Select all
void reg_delay (void) {
__asm__ __volatile__("nop;nop;nop;nop;nop;nop;nop;nop;");
}
do you "toggle shake" the gpio pins before use it?
do you setup GPIO pins as "openDrain" and set it to high in init?
thanks!
best wishes
rudi