Problems with I2C

Showing results for 
Search instead for 
Did you mean: 

Problems with I2C

Contributor III

I am working on I2C (as well as UART)

however I cannot get it to work. Non of the example projects work.

I'll attach my project in case that is needed 

when I send data this is what I see on the data line

Green is Data  Yellow is clock



The data is not sending the write command..



my code block


// I2C Variables and Buffers
uint8_t cmd_buff_write = 0x00;
uint8_t cmd_buff_read = 0x01;
#define DATA_LENGTH 64
uint8_t tx_buff[DATA_LENGTH] = {0};

uint32_t cmd_size = sizeof(cmd_buff_write);
uint32_t tx_size = sizeof(tx_buff);
uint32_t count = 1;


I2C_DRV_MasterSendData(I2C_INSTANCE, &i2cCom1_MasterConfig0, &cmd_buff_write, cmd_size, &tx_buff, tx_size);


When I pass NULL in to cmd_buff_write I can send data correctly but without changing the address, I cannot control my target device of address 6a



What am I doing wrong?

the I2C_Init() funtion is called already what do I do?

Labels (1)
Tags (2)
0 Kudos
0 Replies