Why State Machine Architecture is Frequently Used in Embedded Development?

Why State Machine Architecture is Frequently Used in Embedded Development?

1. Improving CPU UtilizationWhenever I see a program filled with delay_ms(), I get a headache. Software delays of several tens of milliseconds are a huge waste of CPU resources, with precious CPU time wasted on NOP instructions.It also troubles me when the entire program halts just to wait for a pin level change or serial … Read more

Linux Performance Optimization Fundamentals: Make Your System Run Like the Wind

Linux Performance Optimization Fundamentals: Make Your System Run Like the Wind

As a blogger with years of experience in the Linux field, I have seen too many people stumble over performance issues in Linux systems. Have you ever encountered a scenario where you set up a Linux server with great enthusiasm, only to find that the website responds so slowly that it makes you question your … Read more

MCU CPU Utilization Statistics in Embedded Development

MCU CPU Utilization Statistics in Embedded Development

In FreeRTOS, CPU utilization statistics are an important feature that helps you understand the performance of tasks and the system. This chapter will explain how to evaluate CPU utilization in FreeRTOS. Let’s learn together. First, let’s discuss what CPU utilization is. CPU utilization refers to the CPU resources occupied by the programs running on the … Read more

Understanding CPU Utilization in VxWorks

Understanding CPU Utilization in VxWorks

Code is provided for learning reference. Please read the comments in the code carefully. Code is provided for learning reference. Please read the comments in the code carefully. #include "vxWorks.h" #include "spyLib.h" #include "stdio.h" #include "ioLib.h" #include "stdarg.h" #include "taskLib.h" #include "sysLib.h" #include "string.h" #define SPYTASKSMAX 100 int data_ana(const char*,…); /* Function: Detect CPU usage … Read more