|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: Sbit Modifications Not Correctly Written to MemoryInformation in this article applies to:
QUESTIONI have declared a bdata variable and created bits (using sbit). When I change the bits in my program, the changes are not written back into memory. What's going on? ANSWERYou should use the volatile keyword to define bdata variables that are modified with sbit's. volatile is an ANSI standard keyword that disables access optimization and is required to prevent the compiler from re-using the unmodified variable content. For example:
MORE INFORMATION
SEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
|||||||||||
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.