This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NR52832 I2C problem

Hi ,

I evaluate the I2c communication of your chip nrf52832. I have few problem.

  1. Write fonction

Is use your Tx fonction,

uint8_t reg[2] = {CCS811_REG_MODE, NORMAL_MODE};
err_code = nrf_drv_twi_tx(&m_twi, CCS811_ADDR, reg, sizeof(reg), false);

Whatever the configuration I can not manage the stop at the end of frameI2cNoStop.png.

  1. Write, restart and Read fonction.

Is use your Tx fonction and your RX fonction,

uint8_t reg[1] = {CCS811_REG_MODE};
err_code = nrf_drv_twi_tx(&m_twi, CCS811_ADDR, reg, sizeof(reg), false);
err_code = nrf_drv_twi_rx(&m_twi, CCS811_ADDR, &sample_data, sizeof(sample_data));

RestartAndReadI2c.png

I join my main.main.c

Can you help me to customize the i2c frames. Do you have other examples?

Thanks by advance Best Regards Guillaume

Related