STM32 and big-endian mode

Publisher:Xingfu8888Latest update time:2017-09-19 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. The big-endian mode 
means that the high byte of the data is stored in the low address of the memory, 
and the low byte of the data is stored in the high address of the memory. 
This storage mode is a bit similar to treating the data as a string sequence: 
the address increases from small to large, and the data is placed from high to low; 
this is consistent with our reading habits. 
For example, 
declare a 32-bit variable 
with high address 0-7 bits 
|/ 8-15 bits | 
/ 16-23 bits 
and low address 24-31 bits. 
2. The little-endian mode 
means that the high byte of the data is stored in the high address of the memory, 
and the low byte of the data is stored in the low address of the memory. 
This storage mode effectively combines the high and low addresses with the weight of the data bits. 
The high address part has a high weight, and the low address part has a low weight. 
For example, 
declare a 32-bit variable 
with low address 0-7 bits 
|/ 8-15 bits 
|/ 16-23 bits 
and high address 24-31 bits.

The storage mode of STM32 microcontroller is little endian mode


Keywords:STM32 Reference address:STM32 and big-endian mode

Previous article:Analysis of STM32 big-endian and small-endian order and stack and its growth direction
Next article:About the stack alignment problem in ARM system

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号