Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Smart Bluetooth

Anonymous
Not applicable

Hi...

I am using the I2C communication with EEPROM read / write, you must handle.

I2c API below for a description and parameters, thank you.

And the use of known examples would be appreciated.

void i2cm_init (void)
void i2cm_setSpeed (UINT8 speed)
void i2cm_setTransactionSpeed (void)
UINT8 i2cm_getSpeed (void)
UINT8 i2cm_write (UINT8 *data, UINT16 length, UINT8 slave)
UINT8 i2cm_read (UINT8 *data, UINT16 length, UINT8 slave)
UINT8 i2cm_comboRead (UINT8 *secondTranBuf, UINT16 secondTranCount, UINT8 *firstTranBuf, UINT8 firstTranCount, UINT8 slaveAdr)
UINT8 i2cm_comboWrite (UINT8 *secondTranBuf, UINT16 secondTranCount, UINT8 *firstTranBuf, UINT8 firstTranCount, UINT8 slaveAdr)

0 Likes
1 Solution
ArvindS_76
Employee
500 likes received 250 likes received 100 likes received
Employee

Documentation for these functions has been updated in SDK 2.0.1. See <SDK>/include/Drivers/i2cm.h

View solution in original post

0 Likes
8 Replies
ArvindS_76
Employee
500 likes received 250 likes received 100 likes received
Employee

Documentation for these functions has been updated in SDK 2.0.1. See <SDK>/include/Drivers/i2cm.h

0 Likes
Anonymous
Not applicable

Thank you for answer.

0 Likes
Anonymous
Not applicable

Hi Sirs,

Does i2cm support in SDK1.1?

Thanks,

0 Likes
MichaelF_56
Moderator
Moderator 250 sign-ins 25 comments on blog 10 comments on blog
Moderator

I2C is supported on all versions of the BCM2073XS SIP module as this is the bus that's used to communicate with the onboard EEPROM.

The I2C documentation is just more current on SDK 2.X and later. Most of the functions should work across modules.

Anonymous
Not applicable

I have another question about the i2cm_setTransactionSpeed(). What's this for?

/// Allows the I2C speed to be selected. Default is 100 KHz.

/// \param divisor The divisor to use on the 24 MHz reference to get the

///     desired I2C SCL speed.

void i2cm_setSpeed(UINT8 divisor);

/// Internal helper function to set speed.

void i2cm_setTransactionSpeed(void);

Here is my init code.

  /* initialize the i2c master */

  i2cm_init();

  /* set i2cm speed to 400KHZ */

  i2cm_setSpeed(I2CM_SPEED_400KHZ);

  // i2cm_setTransactionSpeed(); // ? what's this for?

  i2c_speed = i2cm_getSpeed();

  ble_trace1("i2c speed:%d\n", i2c_speed);

0 Likes
BoonT_56
Employee
500 likes received 250 likes received 100 likes received
Employee

It is to set the speed of the i2c bus explicitly as we do not support multiple master. The two rates are 100khz (default) and 400khz.

Anonymous
Not applicable

Does it means, I have to execute i2cm_setTransactionSpeed() after i2cm_setSpeed()?

0 Likes
Anonymous
Not applicable

I always call i2cm_setTransactionSpeed() just after i2cm_setSpeed().