Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: CPU Architecture

  1. #1
    Member
    Join Date
    Sep 2013
    Location
    Utah
    Posts
    36

    CPU Architecture

    Reading through the docs, I found references to System and VBAT register files. Are these really CPU registers (R0-Rn) for intermediate calculations? If so, which does a typical program use? If not, what are they for?
    I found no PUSH/POP opcodes; they might be generalized into "copy register contents to reference found in Rn and decrement Rn." Is that the case?

  2. #2
    Member
    Join Date
    Aug 2013
    Location
    Ohio
    Posts
    88
    VBAT registers are outside the ARM CPU, they are built into a functional block that is not modified by resets and whose contents are preserved even in the lowest power state, being kept up by the VBAT supply. They have addresses (0x4003E000 in the parts I've used: MK20DX256 in T3.2, K64F in T3.5, K66 in T3.6) and are accessible only using load/store instructions.

    In my day job, the VBAT registers are useful to allow transition across image execution transitions: The first few lines of our bootloader reset handler use a 32-bit value in the VBAT register file as a pointer to an image header, which is validated and executed if it passes the tests: Every image starts from a known state. Anyone reading this needs to know that we initialize the watchdog, too: First to ensure that the watchdog doesn't fire while validating the image, and then upon starting the image to ensure that if it blows up despite the validity checks, the system gets back to reset! :-) Also, our bootloader clears the image header pointer VBAT register, to avoid rolling reboots.

    Don't know about "System register files", I don't recognize that nomenclature.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,579
    To learn about the CPU architecture, you really should get Joseph Yiu's book.

    https://www.amazon.com/dp/0124080820

    Freescale put only minimal references to some of this info in chapter 3 of their manual. ARM's free reference manual is terribly difficult. They document everything but don't explain almost anything. Joseph Yiu does. His book has a lot of good explanation of what things are really meant to do and how you'd use them.

  4. #4
    Member
    Join Date
    Sep 2013
    Location
    Utah
    Posts
    36
    Quote Originally Posted by PaulStoffregen View Post
    To learn about the CPU architecture, you really should get Joseph Yiu's book.

    https://www.amazon.com/dp/0124080820

    Freescale put only minimal references to some of this info in chapter 3 of their manual. ARM's free reference manual is terribly difficult. They document everything but don't explain almost anything. Joseph Yiu does. His book has a lot of good explanation of what things are really meant to do and how you'd use them.
    Ordered. Awaiting shipment. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •