By design, the TI LP55231 LED driver IC will fail the TWI write of the reset register (0x3D). It's necessary to reset the IC in an edge use case. I'm using the nRF51822 HW TWI driver and cannot recover from this. The first write returns without error (NRF_SUCCESS). Successive TWI writes return with an internal error (NRF_ERROR_INTERNAL). Manually clearing the bus does not seem to work. Re-initializing the driver seems an extreme workaround. Is there a trick to this?
snip:
data[0]=LP55231_RESET_REGISTER;
data[1]=LP55231_RESET_VALUE;
retcode = nrf_drv_twi_tx( &TWI_DRIVER, IC_ADDRESS, data, 2, false );
APP_ERROR_CHECK( retcode );
nRF51822_xxAC/256/32/S130