Hi,
After seen this post http://e2e.ti.com/support/wireless_connectivity/f/158/p/140917/726639.aspx#726639. I tried to read a value from sensor. The same file I used. I am using P0_0 as SDA and P0_1 as SCL. So I revised the code as
#ifndef OCM_CLK_PORT
#define OCM_CLK_PORT 0
#endif
#ifndef OCM_DATA_PORT
#define OCM_DATA_PORT 0
#endif
#ifndef OCM_CLK_PIN
#define OCM_CLK_PIN 1
#endif
#ifndef OCM_DATA_PIN
#define OCM_DATA_PIN 0
#endif
void HalI2CInit( void )
{
if (!s_xmemIsInit) {
s_xmemIsInit = 1;
// Set for general I/O operation
IO_FUNC_PORT_PIN( OCM_CLK_PORT, OCM_CLK_PIN, IO_GIO );
IO_FUNC_PORT_PIN( OCM_DATA_PORT, OCM_DATA_PIN, IO_GIO );
}
Then from Application I am calling
#define DEVICE_ADDRESS 0x02
HalI2CReceive(DEVICE_ADDRESS, buf, 10);
After calling this my buffer is still Zero and some times it gives junk values. Did I missed any thing. I need to change any thing.