Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

FM0+/FM3/FM4: Bit-banding access to individual bits (KA-03423)

FM0+/FM3/FM4: Bit-banding access to individual bits (KA-03423)

BinduPriya_G
Community Manager
Community Manager 250 replies posted First like received 50 sign-ins
Community Manager

FM0+/FM3/FM4: Bit-banding access to individual bits (KA-03423)

When the firmware in flash memory is upgraded, the flash memory needs to be erased once before re-writing the new firmware into flash. The Flash Erase (All Sector Batch Erase) command can be used to erase all sectors in flash.
However, the CR trimming data is stored in the flash memory for all FM0+, FM3, and FM4 family microcontrollers. Therefore, if the entire flash memory is erased by the Flash Erase command, the CR trimming data is erased, too.
The CR trimming data is located at different addresses depending on the device. Refer to the Flash Programming Manual and datasheet for each device in order to check the CR trimming data location. More here.
The bit-band alias address is word-aligned and can be accessed with any of the access sizes. However, it is recommended to use the minimum access size supported by the targeted register. You can find available access sizes of each peripheral register in “Appendixes – Register Map” sections of the Technical Reference Manuals for the FM0+, FM3 or FM4 microcontroller.
When a read or write instruction to access a bit-band alias address is issued, a read operation (for read instruction) or a read-modifywrite operation (for write instruction) is implicitly executed to the targeted peripheral register with the access size specified in the read/write instruction.
The access size doesn’t matter for most peripheral registers. However, we need to know some cases in which it should be considered.
Please check the size of the target register and if there are any other registers in a 32-bit word line containing the target register. More here.

0 Likes
Contributors