Common Lightweight Checksum Algorithms in Microcontrollers

Common Lightweight Checksum Algorithms in Microcontrollers

UART has parity check, and CAN communication has CRC check. Communication protocols such as Modbus, MAVlink, and USB also have checksum information. When customizing data storage, experienced engineers will always add some checksum information. In your daily communication or data storage, do you use checksum information? Below are several common checksum algorithms. 1. Checksum Checksum … Read more

How to Screen Mirror Android on Ubuntu Using Scrcpy

How to Screen Mirror Android on Ubuntu Using Scrcpy

[Linux 250 Common Commands Quick Reference Manual] Follow [Beginner Station], reply “1001” in the background to get it. Do you know how to screen mirror an Android phone to a Linux system? This article will explain how to screen mirror an Android phone to Ubuntu using the Scrcpy software. 1. Introduction to Scrcpy First, let’s … 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

Installing Android System on Raspberry Pi: LineageOS Guide

Installing Android System on Raspberry Pi: LineageOS Guide

Installing Android System on Raspberry Pi: LineageOS Raspberry Pi 4 Although the price of the Raspberry Pi is high and it is no longer a cheap SBC, its ecosystem remains unmatched. Most systems prioritize adaptation for the Raspberry Pi. For example, kali linux, chrome os, nextcloud, etc. Android System: lineageos Download the img file from … Read more

How to Mirror Your Android Phone on Ubuntu

How to Mirror Your Android Phone on Ubuntu

Click the blue “Linux” in the upper left corner, and select “Set as Favorite” Get the latest articles first 1 Do you know how to mirror an Android phone to a Linux system? This article will explain how to mirror an Android phone to Ubuntu using the Scrcpy software. 1 Introduction to Scrcpy First, let’s … Read more