I2C

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决
1,119 次查看
jacewalton
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);

 

What am I doing wrong?

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

Original Attachment has been moved to: worktrax.zip

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
904 次查看
jacewalton
Contributor III

Just Realized that I am not getting an ack bit.... my bad never mind please ignore.

在原帖中查看解决方案

0 项奖励
回复
1 回复
905 次查看
jacewalton
Contributor III

Just Realized that I am not getting an ack bit.... my bad never mind please ignore.

0 项奖励
回复