## Example Summary
Note: The use of "Master" and "Slave", along with "MOSI/MISO" terminology is being considered obsolete. These terms will be replaced with "Controller" and "Peripheral", and "PICO/POCI" respectively.
The following example configures the SPI as a Controller.
This example uses the CD/CS3 line as a signal to distinguish between Command and Data information.
- C/D level low: command information
- C/D level high: data information
When a value is written into the CTL1.CDMODE bits the C/D line will go low for the given numbers of byte which
are sent by the SPI, starting with the next value to be transmitted. After the number of bytes are transmitted the
C/D will be set to high automatically.
After all transmits have been performed, the LED will toggle to indicate completion.
## Peripherals & Pin Assignments
| Peripheral | Pin | Function |
| --- | --- | --- |
| GPIOA | PA0 | Open-Drain Output |
| SYSCTL | | |
| SPI1 | PB9 | SPI SCLK (Clock) |
| SPI1 | PB8 | SPI PICO (Peripheral In, Controller Out) |
| SPI1 | PB7 | SPI POCI (Peripheral Out, Controller In) |
| SPI1 | PB6 | SPI CS0 (Chip Select 0) |
| SPI1 | PB1 | SPI CS3/CD (Chip Select 3/Command Data) |
| EVENT | | |
| DEBUGSS | PA20 | Debug Clock |
| DEBUGSS | PA19 | Debug Data In Out |
## BoosterPacks, Board Resources & Jumper Settings
Visit [LP_MSPM0G3507](https://www.ti.com/tool/LP-MSPM0G3507) for LaunchPad information, including user guide and hardware files.
| Pin | Peripheral | Function | LaunchPad Pin | LaunchPad Settings |
| --- | --- | --- | --- | --- |
| PA0 | GPIOA | PA0 | J27_9 | <ul><li>PA0 is 5V tolerant open-drain so it requires pull-up<br><ul><li>`J19 1:2` Use 3.3V pull-up<br><li>`J19 2:3` Use 5V pull-up</ul><br><li>PA0 can be connected to LED1<br><ul><li>`J4 ON` Connect to LED1<br><li>`J4 OFF` Disconnect from LED1</ul></ul> |
| PB9 | SPI1 | SCLK | J1_7 | N/A |
| PB8 | SPI1 | MOSI | J2_15 | N/A |
| PB7 | SPI1 | MISO | J2_14 | N/A |
| PB6 | SPI1 | CS0 | J2_13 | N/A |
| PB1 | SPI1 | CS3_CD_MISO3 | J4_39 | N/A |
| PA20 | DEBUGSS | SWCLK | N/A | <ul><li>PA20 is used by SWD during debugging<br><ul><li>`J101 15:16 ON` Connect to XDS-110 SWCLK while debugging<br><li>`J101 15:16 OFF` Disconnect from XDS-110 SWCLK if using pin in application</ul></ul> |
| PA19 | DEBUGSS | SWDIO | N/A | <ul><li>PA19 is used by SWD during debugging<br><ul><li>`J101 13:14 ON` Connect to XDS-110 SWDIO while debugging<br><li>`J101 13:14 OFF` Disconnect from XDS-110 SWDIO if using pin in application</ul></ul> |
### Device Migration Recommendations
This project was developed for a superset device included in the LP_MSPM0G3507 LaunchPad. Please
visit the [CCS User's Guide](https://software-dl.ti.com/msp430/esd/MSPM0-SDK/latest/docs/english/tools/ccs_ide_guide/doc_guide/doc_guide-srcs/ccs_ide_guide.html#sysconfig-project-migration)
for information about migrating to other MSPM0 devices.
### Low-Power Recommendations
TI recommends to terminate unused pins by setting the corresponding functions to
GPIO and configure the pins to output low or input with internal
pullup/pulldown resistor.
SysConfig allows developers to easily configure unused pins by selecting **Board**→**Configure Unused Pins**.
For more information about jumper configuration to achieve low-power using the
MSPM0 LaunchPad, please visit the [LP-MSPM0G3507 User's Guide](https://www.ti.com/lit/slau873).
## Example Usage
Make the following connections between the SPI Controller and SPI Peripheral:
- Controller SCLK -> Peripheral SCLK
- Controller PICO -> Peripheral PICO
- Controller POCI <- Peripheral POCI
- Controller CS -> Peripheral CS
- Controller CD -> Peripheral CD
Compile, load and run the example. The SPI will automatically start
to transmit and receive data.
## Application Design Details
The SPI is initialized with the following configuration:
- SPI Controller
- Motorola 4 Wire with Polarity 0, Phase 0
- No parity
- 8 bits per transfer
- MSB first
好家伙VCC
- 粉丝: 0
- 资源: 9142
最新资源
- 基于LSTM的淘宝商品评论分析系统详细文档+全部资料+优秀项目.zip
- 基于MKR模型的图书推荐系统 torch+flask+mysql——NLP详细文档+全部资料+优秀项目.zip
- 基于NLP的微博舆情分析系统详细文档+全部资料+优秀项目.zip
- 基于nlp的医疗问答系统详细文档+全部资料+优秀项目.zip
- 基于NLP和KNN的任务推荐系统详细文档+全部资料+优秀项目.zip
- 基于检索的问答系统详细文档+全部资料+优秀项目.zip
- 基于开放域事件提取的社会心态交互式挖掘与引导系统详细文档+全部资料+优秀项目.zip
- 基于篇章结构自动作文评分系统详细文档+全部资料+优秀项目.zip
- 基于实现一个舆情监控系统,具体基于对知乎热榜话题的数据抓取、分析与可视化。详细文档+全部资料+优秀项目.zip
- 基于文档的问答系统详细文档+全部资料+优秀项目.zip
- 基于医药知识图谱的智能问答系统详细文档+全部资料+优秀项目.zip
- 基于一个NLP旅游景点问答系统,基于BM25,Fuzzy算法实现详细文档+全部资料+优秀项目.zip
- 基于自然语言处理的智能医疗诊断系统详细文档+全部资料+优秀项目.zip
- 餐具包装纸袋包装机(sw12可编辑+CAD+说明书)全套技术开发资料100%好用.zip
- 岚精灵扫码挪车系统(移动端)(用户端-管理端)
- QWG(RZ)22-2004 高强度焊接结构用热连轧钢板和钢带.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈