Memory Optimization Techniques in Microcontroller Development (C Language Version)

Memory Optimization Techniques in Microcontroller Development (C Language Version)

First, let’s talk about As we all know, the biggest difference between microcontroller programming and computer programming is that microcontrollers have very limited resources, and most low-end microcontrollers do not have an operating system. Except for some embedded-level chips that use Linux, most operations are done with simple RTOS, and some simple applications or chips … Read more

Understanding CRC Principles and Applications in Microcontrollers

Understanding CRC Principles and Applications in Microcontrollers

转自 | 瑞萨嵌入式小百科 CRC:Cyclic Redundancy Check,即循环冗余校验码。 CRC是数据通信领域中最常用的一种查错校验码,其特征是信息字段和校验字段的长度可以任意选定。 循环冗余检查(CRC)是一种数据传输检错功能,对数据进行多项式计算,并将得到的结果附在帧的后面,接收设备也执行类似的算法,以保证数据传输的正确性和完整性。 —来自百度百科 学电子、计算机相关专业的同学都应该学习过CRC的基础原理。其原理说难不难,可以说就是一个公式。同时,说简单也不简单,这个公式里面包含的内容不简单。 点击查看大图 网络上关于CRC基础原理的内容比较多,可以搜索关键词“循环冗余校验”进行查询。 今天结合瑞萨RA MCU自带硬件CRC计算单元给大家讲讲其原理及监听应用。 瑞萨RA单片机硬件CRC计算单元采用固定的多项式发生器来计算8位或者32位数据的CRC校验值,对数据传输或数据存储的一致性、完整性进行验证。这篇文章重点介绍RA MCU中的CRC模块和使用方法。 RA MCU中的CRC 计算单元规格如下: 点击查看大图 注1. 该函数不能划分CRC计算中使用的数据。以8位或32位为单位写入数据。 CRC 计算单元框图如下: 那么接下来就是如何使用了,打开工程中的configuration.xlm文件,在Stacks窗口中,可以通过“New Stack → Monitoring → CRC (r_crc)”添加该模块。该模块的属性窗口如下: 点击查看大图 在应用程序中使用CRC模块的基本例程如下: void crc_example (){uint32_t length;uint32_t uint8_calculated_value;length = sizeof(g_data_8bit) / sizeof(g_data_8bit[0]);crc_input_t example_input ={.p_input_buffer = g_data_8bit,.num_bytes = length,.crc_seed = 0,};/* Open CRC module with 8 … Read more

Understanding the Execution of the Main Function in Microcontrollers

Understanding the Execution of the Main Function in Microcontrollers

Follow+Star Public Account, don’t miss exciting content Author | strongerHuang WeChat Official Account | strongerHuang Why is the main function directly called in the reset interrupt service routine? Does that mean all programs are executed in the reset interrupt? First, Reset_Handler is an interrupt of the microcontroller, and secondly, the main function is indeed called … Read more

Why Microcontroller Software Needs Architecture?

Why Microcontroller Software Needs Architecture?

Follow+Star Public Account Number, don’t miss wonderful content Source | Embedded Guest House Some beginners in microcontroller development have just started and have not yet involved in using RTOS. Jumping directly into RTOS may be a bit challenging, especially for those using relatively older microcontrollers with limited resources, which may not be suitable for running … Read more

Unleashing Development Creativity with STM32: Driving the Development of Cloud-Connected Intelligent Terminals

Unleashing Development Creativity with STM32: Driving the Development of Cloud-Connected Intelligent Terminals

Observing the changes happening in the world today, one might find significant insights just by looking around at the devices. Smart meters that allow data queries via smartphones, wearable devices that continuously monitor health data, white goods with various sizes of screens for interactive upgrades, and even some devices that have begun to leverage AI … Read more

Understanding the Relationship Between ARM9 and STM32

Understanding the Relationship Between ARM9 and STM32

Recently, a friend asked: What is the relationship between ARM9 and STM32? If we turn back time 10 years, ARM9 and S3C2410 were quite popular, but the “new era” ARM processors like STM32 also emerged. ARM9 is an early ARM processor, while STM32 is a more popular processor in recent years. ARM Naming Rules The … Read more

Essential Video Library for STM32 Enthusiasts

Essential Video Library for STM32 Enthusiasts

Attention all STM32 enthusiasts, here is an introduction to a video library focused on ST MCU training materials~~ Click the original link in the bottom left to go to the STM32 Enthusiasts Video Library and choose what to watch~~ Of course, you can also subscribe to this video library to keep up with updates on … Read more

Design of an Unmanned Boat Measurement and Control Device Based on STM32 Microcontroller

Design of an Unmanned Boat Measurement and Control Device Based on STM32 Microcontroller

Author: Ye Nan1, Wang Xiang2, Liu Huaizhi1 Affiliation: 1. China Shipbuilding Industry Corporation Pengli (Nanjing) Atmospheric Ocean Information System Co., Ltd., Nanjing, Jiangsu 210000; 2. China Shipbuilding Industry Corporation Nanjing Pengli Technology Group Co., Ltd., Nanjing, Jiangsu 210000. Abstract: The core of the unmanned boat is its integrated measurement and control device for information collection … Read more

Easily Run Linux on STM32

Easily Run Linux on STM32

Follow+Star Public Account Number, don’t miss exciting content Author | strongerHuang Material Source | ST, MYiR Official Website Last month, STMicroelectronics launched the new generation of 64-bit Cortex-A35 core, with a frequency of up to 1.5GHz STM32MP2x series microprocessors (MPU), which has taken the STM32MP series processors to a new level. Recently, I received a … Read more

Introducing the STM32G4: A Powerful MCU for Diverse Applications

Introducing the STM32G4: A Powerful MCU for Diverse Applications

At the end of last year, the launch of the STM32G0 actually released a very clear signal – the mainstream upgrade journey of STM32 MCUs from the “F” series to the “G” series has fully begun, and in the future, we will welcome more and more new devices from the “G” generation! As expected, the … Read more