Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8526251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:13:10+00:00 2026-06-11T08:13:10+00:00

I need to reset (set to 0) Special Purpose Register 527 (Alt Time Base

  • 0

I need to reset (set to 0) Special Purpose Register 527 (Alt Time Base register upper).
But this function sysAltTimeBaseUreset crashes my VxWorks target’s PowerPC (Freescale P2020):

FUNC_BEGIN(sysAltTimeBaseUreset)
    mtspr       527, 0x0000              /* reset high 32-bits of Alt. Time Base register */
    bclr        20,0                    /* Return to caller */
FUNC_END(sysAltTimeBaseUreset)

The following function works ok, and returns the contents of the AltTimeBase upper register.

FUNC_BEGIN(sysAltTimeBaseUGet)
    mfspr       r3, 527            /* high 32-bits of Alt. Time Base register */
    bclr        20,0                    /* Return to caller */
FUNC_END(sysAltTimeBaseUGet)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:13:11+00:00Added an answer on June 11, 2026 at 8:13 am

    Writing to the time base registers is reserved for supervisor-level software. User-level software is not permitted to write to the time base registers, and it is generally sufficient to read the registers at two different times and subtract to find the elapsed time.

    Additionally, you should not just write the upper time base register, because it changes whenever the lower time base register wraps. The recommended procedure for setting the registers is to set the lower time base register to zero (which prevents a wrap from occurring within the next 232 ticks of the time base), then set the upper time base register to the desired value, then set the lower time base register to the desired value. (When reading, you should read the upper register, read the lower register, and read the upper register again. If the upper register changed, you must discard the value from the lower register and repeat.)

    Also, it is recommended to use the mnemonics for writing to the time base registers, mttbu and mttbl, rather than hard-coded special register numbers. I do not recall the details, but some PowerPC implementations had echoes of the time base registers at alternate register numbers, where I think they could be read but not written.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to clear/ reset my textbox1 which is set to ReadOnly= true. I
I set an original TextView value like this: TextView problemName = (TextView) findViewById(R.id.some_variable); But
After I set the adapter of ListView I need to reset the item from
I'm running a set of thread groups (consecutively) and I need to reset a
Using RadGrid for Asp.Net Ajax (from Telerik) I need to re-set the CurrentPageIndex. Some
I need to do some REST service testing from Firefox where I set the
I need to reset a MySQL Field value automatically at midnight. It is a
Basically I need to reset Identity Increment for all tables to its original. Here
Following a question I just asked, what is the need for a reset.css to
I need to be able to reset an input field back to its original

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.