当前位置:网站首页>Embedded development: tips and techniques -- seven techniques to meet the real-time deadline
Embedded development: tips and techniques -- seven techniques to meet the real-time deadline
2022-07-27 15:59:00 【Guangdong embedded Education】
The embedded system must meet the real-time deadline , In order to effectively operate as expected . No one likes to press a button , wait for 30 second , The system finally responds . what's more , Safety critical systems need to be completed on time , Otherwise, something very bad may happen , Such as injury or death . There are many ways to ensure that the embedded system can be completed on time , But here are seven tips to help embedded developers ensure that they meet their deadlines as expected .
skill 1—— strive for 30% In my spare time
Everyone wants to get the maximum value from each component selected for the product . In less than 100% The speed of running the microcontroller , It feels like the product is over designed . However , The fact is that , To meet real-time requirements and deadlines , Developers should really set their systems to CPU Free time in 30% about . Why is it so high ? Executive theory RAM( Monotonic rate analysis ) The developers in this field will find that , Meet real time requirements 、 The theory of running the scheduler and handling interrupts is the largest CPU The load is 69.3%. Putting more pressure on the processor means , In the worst case , The possibility of not meeting the requirements of real-time system is greatly increased .
skill 2—— Use tracking tools for accurate measurements
A few years ago , Developers will map out what theoretically happens in their system , Implement it , Then pray that what happens in the microcontroller is what they think is happening . From then on ,SWD、ETM And other tracking protocols and other new tools have emerged , Allows developers to monitor the instructions being executed in the microcontroller , The impact on real-time performance is minimal . Developers often assume how their system will execute code , But use tracking tools , Not only can we test hypotheses , It can also provide developers with minimal 、 Maximum and average execution time , Enable them to adjust and validate their real-time models . Use these tools to improve and understand assumptions , And realize what the system is doing .
skill 3—— Careful choice RTOS Priorities
Many embedded developers don't know how to choose RTOS priority . When forced to choose a priority , They simply make a quick psychological comparison with other tasks in the system , Then choose the one they think should be . Engineering is rarely involved in decision-making , More speculation . Only after carefully analyzing the interaction between tasks , And make sure that all tasks can be completed before the deadline in all cases , To choose RTOS priority .
skill 4—— Conduct RMA analysis
Monotonic rate analysis (RMA) It's a technology , Developers can use it to analyze their recurring tasks , And make sure to set the priority , To meet all deadlines . For developers ,RMA It's a good starting point , It can be used to ensure that the integrity of their system is built on a solid foundation .

skill 5—— Choose the right microcontroller for the job
Choosing a microcontroller with too little horsepower for the job at hand can lead to a nightmare solution , That is, constantly optimize 、 Cutting and fighting with source code . Choosing the right microcontroller is a challenge . A good rule of thumb is to start with the high-end devices of the microcontroller family of interest , Prototype the system , And start to understand the code 、 Its execution mode and the overall performance of the system . If the power of the microcontroller is too large , Just switch to a microcontroller with a low success rate . But don't forget , in many instances , Products tend to add more and more functions over time , Therefore, embedded developers can keep the system working normally by choosing a microcontroller that exceeds their needs , Even if functional creep is at work .
skill 6—— Create software architecture
Pre designed system , Model and create software architecture . An architecture will help developers understand major software components , What are their inputs and outputs , And how they interact . Understanding these main parts can identify areas that are not well understood , This can guide engineers to better study and understand these areas before writing product code . A well structured code base will produce understandable code , And meet its deadline .
skill 7—— Keep testing
Software changes . Functions are added 、 enhance , Sometimes even deleted . Changes to the code base will inevitably affect the performance of the real-time system , And may lead to the priority change required to keep the system running as expected . The only way to ensure the continuous operation of the system is continuous testing 、 Measure and evaluate the operation of the system . Integrate testing and measurement into the embedded software development process .
Conclusion
Management time and meeting deadlines are the most important factors to consider when developing real-time embedded systems . Following these tips can begin to help embedded developers understand how their systems work , And make sure they will meet all the system deadlines they are given .
边栏推荐
- [sword finger offer] interview question 39: numbers that appear more than half of the time in the array
- Inter thread wait and wake-up mechanism, singleton mode, blocking queue, timer
- 兆骑科创创业大赛策划承办机构,双创平台,项目落地对接
- [sword finger offer] interview question 50: the first character that appears only once - hash table lookup
- /Dev/loop1 takes up 100% of the problem
- Zhaoqi scientific innovation and entrepreneurship competition planning and undertaking organization, mass entrepreneurship and innovation platform, project landing and docking
- First acquaintance with MySQL database
- Hematemesis finishing c some commonly used help classes
- SQL multi table query
- Understand │ what is cross domain? How to solve cross domain problems?
猜你喜欢

SQL multi table query

Push down of spark filter operator on parquet file
![[tensorboard] oserror: [errno 22] invalid argument processing](/img/bf/c995f487607e3b307a268779ec1e94.png)
[tensorboard] oserror: [errno 22] invalid argument processing
![[sword finger offer] interview question 49: ugly number](/img/7a/2bc9306578530fbb5ac3b32254676d.png)
[sword finger offer] interview question 49: ugly number

Division of entity classes (VO, do, dto)

Spark 3.0 adaptive execution code implementation and data skew optimization

C language: Sanzi game

网络层的IP协议

语音直播系统——提升云存储安全性的必要手段

线程中死锁的成因及解决方案
随机推荐
Hematemesis finishing c some commonly used help classes
Six capabilities of test and development
makefile 中指定程序运行时加载的库文件路径
[sword finger offer] interview question 53- Ⅱ: missing numbers in 0 ~ n-1 - binary search
Summary of network device hard core technology insider router (Part 2)
单机高并发模型设计
Spark 3.0 testing and use
Zhaoqi scientific innovation and entrepreneurship competition planning and undertaking organization, mass entrepreneurship and innovation platform, project landing and docking
QT (VI) value and string conversion
Voice live broadcast system -- a necessary means to improve the security of cloud storage
Constraints, design and joint query of data table -- 8000 word strategy + Exercise answers
借5G东风,联发科欲再战高端市场?
C language: string function and memory function
First understanding of structure
: 0xC0000005: 写入位置 0x01458000 时发生访问冲突----待解
C language: function stack frame
/Dev/loop1 takes up 100% of the problem
线程中死锁的成因及解决方案
[sword finger offer] interview question 54: the k-largest node of the binary search tree
[Yunxiang book club issue 13] coding format of video files