FAQ

よくある質問

What is the Bit-banding feature? How to use it?  日付:2015-11-02

Bit-banding is a feature supported by the Cortex®-M4 core. The NuMicro® family M4 series, such as M451 series, NUC442/472 series, and NUC505 series, all support the bit-Banding feature.

The Bit-banding feature allows a bit in a bit-band region mapped to a word in an alias region, as shown below. If there is a need to modify a bit, the user only needs to modify the corresponding word to complete the bit setting. 

With the bit-banding feature, SRAM or peripheral registers can be mapped to the respective alias region. Through the modification of words in the alias region, the user will be able to complete bit setting for SRAM or peripheral registers without complicated setup process, thereby increasing the efficiency of bit setting.

 

Bit-banding address is calculated as follows:

bit_word_addr = bit_band_base + (byte_offset x 32) + (bit_number × 4)

bit_band_base is a starting address of the alias region, byte_offset is a word offset of the specified bit, bit_number is a bit offset of the specified bit, and bit_word_addr is the corresponding address of the alias region.

Take the above figure as an example:

For 0x200F_FFFF[7] in the bit-band region, the corresponding alias region is

bit_word_addr = 0x2200_0000 + (0XF_FFFF x32) + (7 x 4)

       = 0x23FF_FFFC

 

Note1: When setting a peripheral register through the bit-banding, at first, the user needs to enable the corresponding peripheral clock source.

Note2: When setting a peripheral register through the bit-banding, if you want to set the bit to unlock, you need to unlock it first; otherwise, the operation will not succeed.

 

Although the bit-banding feature is not supported by the Cortex®-M0 core, the GPIO in the NuMicro® family M0 series is provided with the register Pin Data Input/Output. The user can set the register to control the state of each GPIO. 

製品: マイクロコントローラ ,Arm Cortex-M0 MCU ,M051 ベースシリーズ ,M0518シリーズ ,M0519シリーズ ,ミニ 51 ベースシリーズ ,ナノ 100/102 ベースシリーズ ,ナノ 110/112 LCD シリーズ ,ナノ 120 USB シリーズ ,ナノ 130 アドバンストシリーズ ,NUC029 シリーズ ,NUC100/200 アドバンストシリーズ ,NUC120/122/123/220 USB シリーズ ,NUC130/230 CAN シリーズ ,NUC131/NUC1311 CAN シリーズ ,NUC140/240 コネクティビティシリーズ ,Arm Cortex-M4 MCU ,M451 Base シリーズ ,M451M シリーズ ,M452 USB シリーズ ,M453 CAN シリーズ ,NUC442/472 シリーズ ,NUC505 シリーズ
アプリケーション:
機能: Peripherals,ARM,Cortex-M4,I/O,GPIO
This website uses cookies to ensure you get the best experience on our website. Learn more
OK