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

nrf_drv_twi_tx is returning error code 33281

I'm trying to use the TWI talking to a I2C device (LED driver TLC59116). I have some working arduino code which I have converted to use on my nRF52 custom board. I'm using the twi master example code to convert. I tried the non-blocking initialization of the TWI, but I never got the finished event back. I changed to the blocking initialization to see what error comes back.

When I try to write to the device, I'm getting back an error code of 33281. Any ideas on what this error is?

Here is an example of the code....

void twi_LED_set_register(uint8_t LED_register, uint8_t value )

{

ret_code_t err_code;

uint8_t reg[2] = {LED_register, value};

err_code = nrf_drv_twi_tx(&m_twi, TLC59116_BASEADDR, reg, sizeof(reg), false);

APP_ERROR_CHECK(err_code);

}

Related