Keil Logo

C166: Error 185 (Atomic #5 Out of Range)


Information in this article applies to:

  • C166 Version 3.12 and later

QUESTION

I'm using the _atomic_ (0) function and I receive the following error message:

*** ERROR 185 IN LINE 147 OF .\timer.c: atomic #5: out of range

How can I fix this?

ANSWER

This error message indicates that the code between the _atomic_ (0) and _endatomic_ functions is larger than 4 instructions. Atomic code can only be 4 instructions or less.

Reduce the amount of code that you want to make atomic or consider using the #pragma disable directive.

MORE INFORMATION

  • Refer to _atomic_ in the C166 User's Guide.

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.