From the course: Introduction to Embedded Systems with Rust

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Registers

Registers

- [Instructor] Registers are areas of memory in a processor, where values are stored during processing and computation. They're the fastest mechanism for accessing data, and are used to store computer values, hold temporary values, or even to configure a device. There are many types of registers. The main ones we're concerned with are general purpose registers and control registers. Control registers are used to configure a device. For example, in our program, we had a timer that counted down for one second. Where does that value get set? You guessed it, in the control register. We can see the control registers for the system timer over here. Every hardware device is configured using control registers. This is done by writing values to them. They have a fixed address in memory, so we know exactly where to write the values to. In the case of our program, if we wanted to set the value of the timer to two seconds, we would write the value to the Reload Value register. You can see its…

Contents