EasyManuals Logo
Home>ST>Computer Hardware>STM32WB Series

ST STM32WB Series Programming Manual

ST STM32WB Series
262 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #139 background imageLoading...
Page #139 background image
PM0214 Rev 9 139/262
PM0214 The STM32 Cortex-M4 instruction set
261
3.9.1 BFC and BFI
Bit Field Clear and Bit Field Insert.
Syntax
BFC{cond} Rd, #lsb, #width
BFI{cond} Rd, Rn, #lsb, #width
Where:
• ‘cond’ is an optional condition code, see Conditional execution on page 65.
• ‘Rd’ is the destination register.
• ‘Rn’ is the source register.
• ‘lsb’ is the position of the least significant bit of the bitfield. lsb must be in the range 0 to
31.
• ‘width’ is the width of the bitfield and must be in the range 1 to 32-lsb.
Operation
BFC clears a bitfield in a register. It clears width bits in Rd, starting at the low bit position lsb.
Other bits in Rd are unchanged.
BFI copies a bitfield into one register from another register. It replaces width bits in Rd
starting at the low bit position lsb, with width bits from Rn starting at bit[0]. Other bits in Rd
are unchanged.
Restrictions
Do not use SP and do not use PC.
Condition flags
These instructions do not affect the flags.
Examples
BFC R4, #8, #12 ; Clear bit 8 to bit 19 (12 bits) of R4 to 0
BFI R9, R2, #8, #12 ; Replace bit 8 to bit 19 (12 bits) of R9 with
; bit 0 to bit 11 from R2

Table of Contents

Other manuals for ST STM32WB Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32WB Series and is the answer not in the manual?

ST STM32WB Series Specifications

General IconGeneral
BrandST
ModelSTM32WB Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals