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

TWI communication doesn't work

Hello,

I'm writing a driver for an I2C device (it's an external led driver). My current code executes following steps ...

First I changed I2C configuration :

static const nrf_drv_twi_config_t twi_config = {
.frequency = NRF_TWI_FREQ_400K,
.scl = 11,
.sda = 19,
.interrupt_priority = 1 // TODO : mettere APP_IRQ_PRIORITY_HIGH };

then I call :

nrf_drv_twi_init(&twi, &twi_config, NULL);
nrf_drv_twi_enable(&twi);

finally I need to transmit following data :

uint8_t init_array0[] = { AUTO_INCREMENT | REGISTER_START,  0x01, 0x00 };

and I do it in the following way :

nrf_drv_twi_tx(&twi, DEFAULT_I2C_ADDR,  init_array0, 3, true);

What's wrong in this code ?

Using oscilloscope I can't see any variation on the SDA and SCL signals.

Thanks, Paolo.

Parents Reply Children
No Data
Related