当前位置:网站首页>SPI configuration
SPI configuration
2022-07-26 21:14:00 【Four seasons sail】
1. SPI Medium CPOL and CPHA Concept
Often mentioned SPI There are four modes :

The above mode is only for SPI The clock of (SCK) To distinguish between :
CPOL That is, the polarity of the clock , Used to represent SPI When the bus is idle SCK Is it low level or high level , The low level is 0, The high level is 1;
CPHA That is, the phase of the clock , Used to decide when to sample the signal , At the first jump edge or the second jump edge , Sampling at the first jump edge is 0, Sampling at the second jump edge is 1.
2. Multi slave configuration
Multiple slaves can work with a single slave SPI Use with the host . The slave can be connected in normal mode , Or daisy chain connection .
2.1 routine SPI Pattern
In normal mode , The master needs to provide a separate chip selection signal for each slave . Once the host is enabled ( Pull it down ) Piece of optional signal ,MOSI/MISO The clock and data on the line can be used for the selected slave . If multiple chip selection signals are enabled , be MISO Online data will be destroyed , Because the host cannot recognize which slave is transmitting data .

As can be seen from the above figure , As the number of slaves increases , The number of chip selection lines from the host also increases . This will quickly increase the number of inputs and outputs that the host needs to provide , And limit the number of slaves that can be used . Other technologies can be used to increase the number of slaves in normal mode , For example, a multiplexer or a serial to parallel converter is used to generate a chip selection signal .

2.2 Daisy chain mode
In daisy chain mode , The chip selection signals of all slaves are connected together , Data is propagated from one slave to the next . In this configuration , All slaves receive the same message at the same time SPI The clock . The data from the master is sent directly to the first slave , The slave provides data to the next slave , And so on .
When this method is used , Because data is propagated from one slave to the next , Therefore, the number of clock cycles required to transmit data is proportional to the slave position in the daisy chain . For example, in figure 7 Shown 8 Bit system , In order to make the second 3 A slave can get data , need 24 Clock pulses , And conventional SPI In mode, just 8 Clock pulses .

3. The attachment
3.1 Advantages of daisy chain mode
The biggest advantage of daisy chain is that it can connect multiple devices with limited signal transmission lines , Share the same service , And there are no problems such as bus competition and blocking , Because before a device transmits a signal to the next device , This signal can be modified .
3.2 Disadvantages of daisy chain mode
The biggest drawback of daisy chain is that it is the serial transmission of signals , So once in the data link When some equipment breaks down , It is impossible for the lower priority devices to be served .
边栏推荐
- Why didn't Tencent create a game like "original God"
- Devsecops, speed and security
- How to configure the legendary SF lander to automatically read the list without a network
- Error in render: “TypeError: data.slice is not a function“
- 苹果官网罕见打折,iPhone13全系优惠600元;国际象棋机器人弄伤对弈儿童手指;国内Go语言爱好者发起新编程语言|极客头条
- Beginner experience of safety testing
- [pytorch advanced] preservation and use of pytorch model
- 【HarmonyOS议题资料下载】HDD杭州站·线下沙龙专注应用创新 展现鸿蒙生态魅力
- 除了「加机器」,其实你的微服务还能这样优化
- Tinui development history
猜你喜欢
随机推荐
苹果官网罕见打折,iPhone13全系优惠600元;国际象棋机器人弄伤对弈儿童手指;国内Go语言爱好者发起新编程语言|极客头条
使用 LSTM 进行多变量时间序列预测--问题汇总
What kind of security problems will the server encounter?
09_ UE4 advanced_ Enter the next level and reserve the blood volume
【HarmonyOS议题资料下载】HDD杭州站·线下沙龙专注应用创新 展现鸿蒙生态魅力
"Enterprise management" sincere crm+ - integrated management of enterprise business processes
idea中设置核心配置文件的模板
How to create a static object variable of its own class?
游览器——游览器游览器缓存
Beginner experience of safety testing
IT系统为什么需要可观测性?
Go+mysql+redis+vue3 simple chat room, the sixth bullet: use vue3 and element plus to call the interface
测试用例千万不能随便,记录由一个测试用例异常引起的思考
Pointpillars: fast encoders for object detection from point clouds reading notes
Devsecops, speed and security
APaaS低代码平台(一) | 把复杂留给自己,把简单留给用户
6种方法帮你搞定SimpleDateFormat类不是线程安全的问题
Chapter 2: encounter obstacles! Bypass WAF filtering! [SQL injection attack]
PLSQL package
AI technology, simplifying the complex world | teatalk online application practical series, issue 2








