MSPM0G1X0X_G3X0X TI-Driver Library
2.00.00.03
|
Data Structures | |
struct | I2CMSPM0_I2CPinCfg |
I2C Pin Configuration. More... | |
struct | I2CMSPM0_HWAttrs |
I2C Hardware attributes. More... | |
struct | I2CMSPM0_Object |
I2C Object. More... | |
Macros | |
#define | I2C_CONTROLLER_INTERRUPTS_MASK 0xFFFF |
I2C controller interrupt mask. | |
Refer to ti_drivers_I2C_Overview for a complete description of APIs and examples of use.
The general I2C API is normally used in application code, e.g. I2C_open() is used instead of I2CMSPM0_open(). The board file will define the device specific config, and casting in the general API will ensure that the correct device specific functions are called.
Before using the I2C:
The following is true for receive operation:
The following apply for transmit operation:
After I2C operation has ended:
If an error occurs during operation:
The I2C driver sets a power constraint during transactions to keep the device out of standby; so when all tasks are blocked, the device will enter idle mode instead of standby. When the transactions have finished, the power constraint to prohibit standby is released. The following statements are valid:
Generic API Function | API Function | Description |
---|---|---|
I2C_init() | I2CMSPM0_initHw() | Initialize I2C driver |
I2C_open() | I2C_open() | Initialize I2C HW and set system dependencies |
I2C_close() | I2C_close() | Disable I2C HW and release system dependencies |
I2C_transfer() | I2CSupport_primeTransfer() | Start I2C transfer |
The I2C driver currently does not support:
Receive 10 bytes over I2C in I2C_MODE_BLOCKING.
Transmit 16 bytes over I2C in I2C_MODE_CALLBACK.
Transmit 10 bytes and then 32 bytes over I2C in I2C_MODE_CALLBACK.
The I2C driver interface produces log statements if instrumentation is enabled.
Diagnostics Mask | Log details |
---|---|
Diags_USER1 | basic I2C operations performed |
Diags_USER2 | detailed I2C operations performed |