TWIM (I2C) on NCS is not working properly.

First of all, the fast mode should be 400kHz, but it seems to be only 200kHz according to the waveform. Also, the duty cycle seems to be wrong.

Secondly, It seems that CONFIG_I2C_CALLBACK is not working at all. I have written the callback function as follows, but it is not called.

/* Callback */
K_SEM_DEFINE(k_sem, 0, 1);
static void twim_callback(const struct device *dev, int result, void *data)
{
    printk("Callback\n");
    k_sem_give(&k_sem);
}
That is obvious since there is no log display and no semaphore to go through.
I am working on a project using TWIM and I hope these bugs will be fixed soon.
Parents Reply Children
No Data
Related