Keil Logo

C166: ACCESS RTC IN ST10-F269


Information in this article applies to:

  • C166 All Versions

QUESTION

I need to access the RTC registers of the ST10F269 controller, but the compiler does not recognize these registers. I have tried to access these registers with the sfr keyword, but it does not help since it is an XBUS peripheral. What is the correct way to access the RTC?

ANSWER

You need to define the XBUS peripherals as pointer constants as shown below:

#define RTCCON  (*((unsigned int volatile sdata *) 0xEC00))

Using this define, you can access the RTCCON register as normal C variable.

SEE ALSO

Last Reviewed: Saturday, April 24, 2004


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.