You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+90-2Lines changed: 90 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,9 +19,9 @@ This package provides a CMSIS-DRIVER inteface to peripherals on [TI MSPM0 microc
19
19
20
20
This package currently supports the following CMSIS-Driver modules:
21
21
- Driver_USART (configurable with DMA or interrupt driven I/O)
22
+
- Driver_I2C (configurable with DMA or interrupt driven I/O)
22
23
23
24
The following additional CMSIS-Driver modules are planned for future versions of this package:
24
-
- Driver_I2C (configurable with DMA or interrupt driven I/O)
25
25
- Driver_SPI (configurable with DMA or interrupt driven I/O)
26
26
- Driver_GPIO (configurable with DMA or interrupt driven I/O)
27
27
@@ -53,24 +53,35 @@ The repository contains the following directories:
53
53
- /CMSIS/Drivers (These are the Arm standard interface files)
54
54
- Driver_Common.h
55
55
- Driver_USART.h
56
+
- Driver_I2C.h
56
57
- /Drivers (These are the TI implementation back end source files)
57
58
- /V0
58
59
- Driver_USART_MSP_Priv.h
59
60
- Driver_USART_MSP_Priv.c
61
+
- Driver_I2C_MSP_Priv.h
62
+
- Driver_I2C_MSP_Priv.c
60
63
- /Drivers_Interface (These are the TI implementation front end source files)
61
64
- Driver_Common_MSP.h
62
65
- Driver_USART_MSP.h
63
66
- Driver_USART_MSP.c
67
+
- Driver_I2C_MSP.h
68
+
- Driver_I2C_MSP.c
64
69
- /examples (These are the code examples for the LaunchPad EVMs and Code Composer Studio)
65
70
- /nortos
66
71
- /LP_MSPM0G3507
67
72
- /cmsis_driver_uart
68
73
- /cmsis-driver-usart-echo (This is the USART echo code example for MSPM0G3507)
69
74
- /cmsis-driver-usart-loopback-dma (This is the USART dual-driver / DMA code example for MSPM0G3507)
75
+
- /cmsis_driver_i2c
76
+
- /cmsis-driver-i2c-transmit-receive (This is the I2C transmit and receieve code example for MSPM0G3507)
77
+
- /cmsis-driver-i2c-transmit-receive-dma (This is the I2C transmit and receieve w/ DMA code example for MSPM0G3507)
70
78
- /LP_MSPM0G3519
71
79
- /cmsis_driver_uart
72
80
- /cmsis-driver-usart-echo (This is the USART echo code example for MSPM0G3507)
73
81
- /cmsis-driver-usart-loopback-dma (This is the USART dual-driver / DMA code example for MSPM0G3519)
82
+
- /cmsis_driver_i2c
83
+
- /cmsis-driver-i2c-transmit-receive (This is the I2C transmit and receieve code example for MSPM0G3507)
84
+
- /cmsis-driver-i2c-transmit-receive-dma (This is the I2C transmit and receieve w/ DMA code example for MSPM0G3507)
74
85
75
86
### Quick Start
76
87
@@ -92,7 +103,7 @@ The MSP-CMSIS-DRIVER package is delivered as source only. Build of the drivers
92
103
93
104
### CMSIS-Driver Static Configuration Procedures
94
105
95
-
The MSP-CMSIS-DRIVER modules (at this time, the USART module) do not require any configuration in the SysConfig visual configuration tool. The following static properties of each driver instance must be configured in a file named *Driver_Config_MSP.h*"* and subsequently included in the build include path.
106
+
The MSP-CMSIS-DRIVER modules do not require any configuration in the SysConfig visual configuration tool. The static properties of each driver instance must be configured in a file named *Driver_Config_MSP.h*"* and subsequently included in the build include path.
96
107
97
108
#### Driver_USART Static Configuration
98
109
@@ -161,6 +172,60 @@ To add more instances, simply copy and past the configuration block and update i
161
172
```
162
173
To include MSP-CMSIS-DRIVER software in another project, all that is required is to bring in the /msp-cmsis-driver directory to the project, and the corresponding include paths, and add a Driver_Config_MSP.h to the project (example shown above) to provide the static configurations for the driver instances.
163
174
175
+
#### Driver_I2C Static Configuration
176
+
177
+
The Driver_I2C module requires the definitions below to be placed in the *Driver_Config_MSP.h* file for each instance. The code examples already include this file.
178
+
These definitions specify the static driver configuration parameters which are not exposed through runtime APIs.
Two configurations are shown in an example *Driver_Config_MSP.h* below, one for I2C0 and a second for I2C1. The I2C0 configuration does not configure DMA channels for transmit and receive. As such, I2C0 will use interrupt driven input/output. The I2C1 configuration is configured to use the DMA for transmit and receive. As such, I2C1 will use DMA driven input/output.
187
+
188
+
To add more instances, simply copy and past the configuration block and update it for the parameters used by the desired I2C instance. The device datasheet may be referred to for identifying pin configurations (IOMUX PINCM, PF). If the peripheral clock sources/frequencies are updated, note that the CLOCK_FREQ parameter must too be updated to ensure correct bus speed calculations.
189
+
190
+
```
191
+
/* I2C Driver Configuration Options */
192
+
193
+
/* Driver_I2C0 Configuration (Maps to MSP hardware I2C0 peripheral) */
To include MSP-CMSIS-DRIVER software in another project, all that is required is to bring in the /msp-cmsis-driver directory to the project, and the corresponding include paths, and add a Driver_Config_MSP.h to the project (example shown above) to provide the static configurations for the driver instances.
228
+
164
229
## Supported Devices
165
230
166
231
The following LaunchPad evaluation kits are currently supported with code examples in this package:
@@ -220,6 +285,29 @@ The Driver_USART module supports the following capabilities:
220
285
| MSPSWSDK-5154 |[SPS] CMSIS-Driver USART module loopback code example with DMA | The MSP-CMSIS-Driver product shall include a code example demonstrating USART in a loopback configuration with an external wire for loopback, demonstrating setup and teardown of the driver and use of DMA. | Implemented |
221
286
| MSPSWSDK-5245 |[SPS] CMSIS-Driver USART module back channel UART example | The MSP-CMSIS-DRIVER product shall include a code example for USART transmit / receive in a back channel configuration with the XDS-110. | Implemented |
222
287
288
+
### Driver_I2C Specifications
289
+
The Driver_I2C module supports the following capabilities:
| MSPSWSDK-5427 |[SPS] CMSIS-Driver I2C module feature: Controller mode | The MSP-CMSIS-DRIVER I2C module shall provide an option for operating in controller mode. | Implemented |
294
+
| MSPSWSDK-5428 |[SPS] CMSIS-Driver I2C module feature: Target mode | The MSP-CMSIS-DRIVER I2C module shall provide an option for operating in target mode. | Implemented |
295
+
| MSPSWSDK-5429 |[SPS] CMSIS-Driver I2C module feature: Transfer done event | The MSP-CMSIS-DRIVER I2C module shall provide a transfer done event fired when a transfer completes. | Implemented |
296
+
| MSPSWSDK-5430 |[SPS] CMSIS-Driver I2C module feature: Transfer Incomplete event | The MSP-CMSIS-DRIVER I2C module shall provide a transfer imcompleted event fired when a transfer does not complete successfully. | Implemented |
297
+
| MSPSWSDK-5431 |[SPS] CMSIS-Driver I2C module feature: Arbitration loss event | The MSP-CMSIS-DRIVER I2C module shall provide an arbitration lost event fired when bus abitration is lost. | Implemented |
298
+
| MSPSWSDK-5432 |[SPS] CMSIS-Driver I2C module feature: Bus error event | The MSP-CMSIS-DRIVER I2C module shall provide a bus error event fired when there is an I2C bus error.| Implemented |
299
+
| MSPSWSDK-5433 |[SPS] CMSIS-Driver I2C module feature: General call event | The MSP-CMSIS-DRIVER I2C module shall provide a general call event fired when a target is addressed via general call. | Implemented |
300
+
| MSPSWSDK-5434 |[SPS] CMSIS-Driver I2C module feature: Bus clear event| The MSP-CMSIS-DRIVER I2C module shall provide a bus clear event fired when the I2C bus is cleared via 9 clock pulses. | Implemented |
301
+
| MSPSWSDK-5435 |[SPS] CMSIS-Driver I2C module feature: Address NACK event | The MSP-CMSIS-DRIVER I2C module shall provide a NACK event fired when the controller receives a NACK response.| Implemented |
302
+
| MSPSWSDK-5436 |[SPS] CMSIS-Driver I2C module feature: Slave transmit event | The MSP-CMSIS-DRIVER I2C module shall provide a slave transmit event fired when the target is addressed to write but SlaveTransmit was not called. | Implemented |
303
+
| MSPSWSDK-5437 |[SPS] CMSIS-Driver I2C module feature: Slave receive event | The MSP-CMSIS-DRIVER I2C module shall provide a slave receive event fired when the target is addressed to read but SlaveReceive was not called.| Implemented |
304
+
| MSPSWSDK-5438 |[SPS] CMSIS-Driver I2C module feature: Bus speed selection | The MSP-CMSIS-DRIVER I2C module shall provide an option of selecting different bus speeds for the I2C driver. | Implemented |
305
+
| MSPSWSDK-5439 |[SPS] CMSIS-Driver I2C module feature: I2C own address selection | The MSP-CMSIS-DRIVER I2C module shall provide an option for a target to set its own address.| Implemented |
306
+
| MSPSWSDK-5440 |[SPS] CMSIS-Driver I2C module feature: 10-bit address mode | The MSP-CMSIS-DRIVER I2C module shall provide an option for a target to use a 10-bit addressing mode. | Implemented |
307
+
| MSPSWSDK-5441 |[SPS] CMSIS-Driver I2C module feature: DMA driven transfers | The MSP-CMSIS-DRIVER I2C module shall provide an option for using DMA-driven non-blocking transfers. | Implemented |
308
+
| MSPSWSDK-5442 |[SPS] CMSIS-Driver I2C Controller and Target transfer example | The MSP-CMSIS-DRIVER product shall include an example showcasing transfers between controller and target. | Implemented |
309
+
| MSPSWSDK-5446 |[SPS] CMSIS-Driver I2C Controller and Target w/ DMA transfer example | The MSP-CMSIS-DRIVER product shall include an example showcasing transfers with DMA between controller and target. | Implemented |
This is an example project for the CMSIS-Driver I2C module.
4
+
The example uses the I2C0 and I2C1 device peripherals for communication, which present as Driver_I2C0 and Driver_I2C1 respectively in the CMSIS-Driver I2C module.
5
+
The project uses SysConfig for initialization, but all functionality related to the CMSIS-Driver I2C module is handled by the CMSIS-Driver itself. All transmissions
6
+
in this example are done using the DMA. Connect PA0 and PB3 with a jumper wire. Connect PA1 and PB2 with a jumper wire. External resistors are needed and should be connected to PA0 and PA1, or PB2 and PB3. The on-board pull up resistors can be used by populating J19 and J20.
7
+
8
+
This example uses on-board LEDs to demonstrate succesfully transmission between target and controller. When the controller transmits data to the target, the BLUE led
9
+
is turned on. When the target transmit data to the controller, the RED led is turned on.
0 commit comments