CPU Architecture

Status
Not open for further replies.

metalgimp

Active member
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?
 
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.
 
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.
 
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.
 
Status
Not open for further replies.
Back
Top