Anonymous
Not applicable
Apr 06, 2017
01:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 06, 2017
01:01 AM
Hi,
i have copied some code from the examples. My problem is that without an Slave is connected, the code is not halted in the loop.
Why?
I expect that the first do-while loop should run until a slave acknowldged / the statusbyte should be 0x20 (I2C_MSTAT_ERR_ADDR_NAK /* Slave did not ACK */) .
thanks a lot
Heres the code:
//Write to Slave
do{
temp = I2C_MasterWriteBuf(slAddress,(uint8 *)i2c_txArray,i2c_TxBufferSize,I2C_MODE_COMPLETE_XFER);
}
while (temp != I2C_MSTR_NO_ERROR);
/* Wait for the data transfer to complete */
while(I2C_MasterStatus() & I2C_MSTAT_XFER_INP){};
temp = I2C_MasterClearStatus();
Labels
- Labels:
-
PSoC 3
1 Reply
Apr 10, 2017
12:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 10, 2017
12:50 AM
Can you please provide us with your project