- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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) |
Solved! Go to Solution.
- Labels:
-
I2C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Documentation for these functions has been updated in SDK 2.0.1. See <SDK>/include/Drivers/i2cm.h
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Documentation for these functions has been updated in SDK 2.0.1. See <SDK>/include/Drivers/i2cm.h
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sirs,
Does i2cm support in SDK1.1?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does it means, I have to execute i2cm_setTransactionSpeed() after i2cm_setSpeed()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I always call i2cm_setTransactionSpeed() just after i2cm_setSpeed().