当前位置:网站首页>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 .
边栏推荐
- CAS compares the knowledge exchanged, ABA problems, and the process of lock upgrading
- 折半查找
- DRF学习笔记(准备)
- JS operation DOM node
- C语言:扫雷小游戏
- Stock account opening commission discount, stock trading account opening which securities company is good, is online account opening safe
- 传音控股披露被华为起诉一事:已立案,涉案金额2000万元
- [tensorboard] oserror: [errno 22] invalid argument processing
- The risk of multithreading -- thread safety
- 网络设备硬核技术内幕 路由器篇 22
猜你喜欢

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

DRF学习笔记(二):数据反序列化

IP protocol of network layer

Openwrt增加对 sd card 支持

网络原理(1)——基础原理概述

Clickhouse 20.x distributed table testing and chproxy deployment (II)

初识MySQL数据库

CAS compares the knowledge exchanged, ABA problems, and the process of lock upgrading

面试重点——传输层的TCP协议

C language: minesweeping games
随机推荐
The shell script reads the redis command in the text and inserts redis in batches
juc包下常用工具类
解决openwrt package目录下多个文件夹重名编译警告(call subdir 函数)
SQL multi table query
[sword finger offer] interview question 52: the first common node of two linked lists - stack, hash table, double pointer
网络设备硬核技术内幕 路由器篇 小结(下)
传音控股披露被华为起诉一事:已立案,涉案金额2000万元
Stock account opening commission discount, stock trading account opening which securities company is good, is online account opening safe
Using Prometheus to monitor spark tasks
C: What is the return value (revolution) in a function
网络层的IP协议
The method of exchanging two numbers in C language
It is said that the US government will issue sales licenses to Huawei to some US enterprises!
为应对RISC-V挑战?Arm CPU引入自定义指令功能!
[Yunxiang book club issue 13] common methods of viewing media information and processing audio and video files in ffmpeg
leetcode234题-简单方法判断回文链表
聊聊ThreadLocal
Causes and solutions of deadlock in threads
[Yunxiang book club issue 13] coding format of video files
[sword finger offer] interview question 53-i: find the number 1 in the sorted array -- three templates for binary search