ARM Technical Support Knowledge Articles

ACCESS RTC IN ST10-F269

Applies to: C166 C Compiler

Answer


Information in this article applies to:


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

Article last edited on: 2004-04-24 11:36:50

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential