当前位置:网站首页>SPI master RX time out interrupt
SPI master RX time out interrupt
2022-07-07 15:56:00 【lixingdian】
background : test spi Of time out interrupt , The board A master rx, The board B slave tx.master Set to timeout interrupt TIME OUT.
slave Send data ,master Timeout interrupt is not triggered . The image is very accurate , I began to worry that there was a problem with the function of the board , But the simulation is ok . It should be a setup problem .
The simulation told me , eliminate fifo Will clear time out register . So I cleared it once during initialization , It will not be cleared later flfo. But in fact, such waveforms are not correct , Is it slave How to send data to master. And still can't trigger interrupt , If I set it to done Interrupt can trigger . But it's not what we want time out It's broken . The simulation told me again rx trigger level It's empty , Setting data will trigger , It is also invalid after setting , Later, it was found that this bit has a numerical limit , Not too big , Turn into 0. Setting to the correct number will not trigger the interrupt . The simulation tells me again , When transmitting data, there is a lot of data to receive ,cs Keep pulling down , It will cause the board to think that it is still receiving data , Will trigger rxready interrupt , instead of time out interrupt . The reason why we need to receive a lot of data , It's because of my master Set up SPI_DataLen by 512(bits) 了 . Explain in the document :
Tx/Rx length
Spi During transmission , Effective SCK Count
It also indirectly reflects the length of data sent or received .
So when I set up datalen by 8 in the future , Can trigger normal TIME OUT It's broken .
Later on time out Interrupted document , I found that I didn't read the document in detail . In fact, the author writes very clearly .
When a transmission ends ,rx fifo There's data in , But the amount of data is not enough to trigger rx trigger level when , Over a certain period of time , It will trigger time out register . If it's cleared fifo It will definitely clear the tone time out Counter .
So to test time out, need
1、 The interval between sending data is long , Long enough to trigger after receiving data TIME OUT Then clear away fifo.
2、 The amount of data is less than rx trigger level, And will not trigger too much rx ready interrupt .
Welcome to my WeChat official account.
边栏推荐
- 有钱人买房就是不一样
- [quick start of Digital IC Verification] 24. AHB sramc of SystemVerilog project practice (4) (AHB continues to deepen)
- HPDC smart base Talent Development Summit essay
- The bank needs to build the middle office capability of the intelligent customer service module to drive the upgrade of the whole scene intelligent customer service
- The difference between full-time graduate students and part-time graduate students!
- Three. JS introductory learning notes 15: threejs frame animation module
- 无线传感器网络--ZigBee和6LoWPAN
- 神经网络c语言中的指针是怎么回事
- A link opens the applet code. After compilation, it is easy to understand
- 通知Notification使用全解析
猜你喜欢
What is Base64?
Shipping companies' AI products are mature, standardized and applied on a large scale. CIMC, the global leader in port and shipping AI / container AI, has built a benchmark for international shipping
一大波开源小抄来袭
Tkinter after how to refresh data and cancel refreshing
Numpy -- epidemic data analysis case
Vertex shader to slice shader procedure, varying variable
Cocos uses custom material to display problems
Syntax of generator function (state machine)
尤雨溪,来了!
Steps to create P8 certificate and warehousing account
随机推荐
Application example of infinite list [uigridview]
如何在shell中实现 backspace
Steps to create P8 certificate and warehousing account
Three. JS introductory learning notes 11:three JS group composite object
讲师征集令 | Apache SeaTunnel(Incubating) Meetup 分享嘉宾火热招募中!
Three. Introduction to JS learning notes 17: mouse control of 3D model rotation of JSON file
尤雨溪,来了!
【花雕体验】15 尝试搭建Beetle ESP32 C3之Arduino开发环境
Write sequence frame animation with shader
Numpy -- data cleaning
Wireless sensor networks -- ZigBee and 6LoWPAN
Getting started with webgl (1)
Monthly observation of internet medical field in May 2022
Asynchronous application of generator function
Limit of total fields [1000] in index has been exceeded
How to understand that binary complement represents negative numbers
The bank needs to build the middle office capability of the intelligent customer service module to drive the upgrade of the whole scene intelligent customer service
Cocos creator collision and collision callback do not take effect
Detailed explanation of Cocos creator 2.4.0 rendering process
Ue4/ue5 multi thread development attachment plug-in download address