Keil Logo

C166: FIXBFLD Directive


Information in this article applies to:

  • C166 Version 4.10a

QUESTION

What does the FIXBFLD directive do?

ANSWER

The FIXBFLD directive ensures that the Compiler encloses BFLDL and BFLDH instructions within ATOMIC sequences. This is required to avoid the CPU.21 problem documented by Infineon. In µVision2, you may specify this directive under Options-C166-MISC.

The FIXBFLD directive causes the Compiler to insert ATOMIC #1 instructions before each BFLDL and BFLDH instruction. If the BFLD instruction is used to access ESFR registers, the EXTR sequence is not combined with other EXTR sequences.

Note that this is not the case for the SYSCON1, SYSCON2, and SYSCON3 SFRs as required by the hardware for UNLOCK sequences.

If you use the _bfld_ intrinsic library routine within _atomic_/_endatomic_ blocks, the Compiler does not modify the code, since such sequences usually do not require any changes. However, you should check such code blocks carefully and, if required, insert _nop_ calls before the _bfld_ intrinsic call.

SEE ALSO


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.