Hi ,
I evaluate the I2c communication of your chip nrf52832. I have few problem.
- 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.
- 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));
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