Hi.
I downloaded code from http://e2e.ti.com/support/low_power_rf/f/538/t/172539.aspx this page.
But I cannot find any document for CC2533 I2C code.
This code has 3 major function.
HalI2CInit, HalI2CRead, and HalI2CWrite.
I already have manual for HAL code but it has been updated.
Updated one has different function that's why I try to find old version for those 3 major function.
Hello Bomi,
You can find some documentation on the I2C in the HAL diver API found here:
http://e2e.ti.com/cfs-file.ashx/__key/CommunityServer-Discussions-Components-Files/155/8117.HAL-Driver-API.pdf#page35
There is also a thread that discusses the I2C here:
http://e2e.ti.com/support/low_power_rf/f/538/t/172539.aspx
You can also find the files and a modified file that allows you to access chips that require the reseeding of the address, needed for EPROM and I/O expanders here:
http://e2e.ti.com/support/low_power_rf/f/158/t/140917.aspx.
The CC254x and CC253x are similar if not identical in the implementation of I2C.
Hi greenja.
Those links are about <HalI2CReceive> and <HalI2Csend>.
What I want is the document about <halI2Cread> and <halI2Cwrite>.
Can I get those documents?
The best info I can give you is from the file located in this posting:
It contains the following functions:
i2cLen_t HalI2CRead(i2cLen_t len, uint8 *pBuf);i2cLen_t HalI2CWrite(i2cLen_t len, uint8 *pBuf);
There isn't a lot going on in either of those functions since most of the work is done through hardware. If you want to get an understanding of what is being done, then the software examples that I posted explain exactly what the hardware version does. That is because I2C has to follow that protocol no matter how it is implemented.
In section 20 of the CC253x/CC254x guide everything about the I2C is explained. The <halI2Cread> and <halI2Cwrite> are broken down in the I2C ...Receiver Mode and I2C ...Transmitter Mode parts of the guide:
http://www.ti.com/lit/ug/swru191c/swru191c.pdf
If you need any more clarification or understanding of how the I2C works you may want to find the original I2C Guide from Philips (NXP). If your code isn't working, then perhaps you can post it.