Barrier directive
DMB, DSB, ISB
The differences between these three instructions are shown in the following table.
Command name |
Functional Description |
DMB |
Data memory isolation. The DMB instruction ensures that: The memory access operation following it is committed only after all the memory access operations preceding it are completed. |
DSB |
Data synchronization isolation. Stricter than DMB: The instruction after it is executed only after all the memory access operations before it have been completed (that is, any instruction must wait for the memory access operation - translator's note) |
ISB |
Instruction synchronization isolation. The most stringent: it will flush the pipeline to ensure that all instructions before it are executed before executing the instructions after it. |
Some other useful commands
There are many instructions supported by Cortex-M3. It is impossible to introduce all of them here. Below I will introduce a few instructions that I think are more distinctive.
REV, REVH, REV16 and REVSH
REV reverses the byte order in a 32-bit integer, while REVH reverses the byte order in half-word units and only reverses the lower half-word.
REVSH is based on REVH and also sign-extends the converted half-word.
These instructions are mainly used for byte order conversion when big-endian and little-endian systems communicate with each other.
RBIT instruction
RBIT is bit-reversed, which is equivalent to rotating the binary representation of a 32-bit integer horizontally by 180 degrees. Its format is:
RBIT.W Rd, Rn
When I saw the bitwise reversal, I thought of the butterfly operation of FFT calculation, which is where this kind of instruction is most needed.
TBB, TBH instructions
It can be used for the assembly of switch case structures in C language. The specific usage is not introduced in detail here, so you can read the book if you need it.
Previous article:ARM Cortex-M3 Study Notes (4-6)
Next article:ARM Cortex-M3 Study Notes (4-4)
Recommended ReadingLatest update time:2024-11-16 13:42
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- TI: Development platform compatible with multiple wireless communication protocols
- Hey guys.. I'm here to ask questions again
- Studying the road to electric motor driving-3: The size of "torque"
- Wireless charging technology? Xiaomi has really developed it!
- [RVB2601 Creative Application Development] 5. OLED Displays Weather Information
- What are the conditions for enabling the serial port interrupt USART_INT_IDLE of GD32F103?
- Design of large LED display system based on FPGA+MCU
- Typical remote IoT sensing designs and features of Sigfox, LoRaWAN, and RIIoT
- Unattended Brushless DC Motor System
- Analysis of the voltage following circuit of the operational amplifier