diff --git a/src/start/exceptions.md b/src/start/exceptions.md index b15717da..bd9b85b7 100644 --- a/src/start/exceptions.md +++ b/src/start/exceptions.md @@ -50,7 +50,7 @@ possible. > Note that the `exception` attribute transforms definitions of static variables > inside the function by wrapping them into `unsafe` blocks and providing us > with new appropriate variables of type `&mut` of the same name. -> Thus we can derefence the reference via `*` to access the values of the variables without +> Thus we can dereference the reference via `*` to access the values of the variables without > needing to wrap them in an `unsafe` block. ## A complete example @@ -258,7 +258,7 @@ ResetTrampoline: 800094c: b #-0x4 ``` -You can lookup the value of the program counter `0x0800094a` in the dissassembly. +You can lookup the value of the program counter `0x0800094a` in the disassembly. You'll see that a load operation (`ldr r0, [r0]` ) caused the exception. The `r0` field of `ExceptionFrame` will tell you the value of register `r0` was `0x3fff_fffe` at that time. diff --git a/src/start/registers.md b/src/start/registers.md index fe184792..2d4a8e85 100644 --- a/src/start/registers.md +++ b/src/start/registers.md @@ -134,7 +134,7 @@ pwm0.enable.write(temp); // Uh oh! Wrong variable! ## Using a HAL crate -The HAL crate for a chip typically works by implementing a custom Trait for the raw structures exposed by the PAC. Often this trait will define a function called `constrain()` for single peripherals or `split()` for things like GPIO ports with multiple pins. This function will consume the underlying raw peripheral structure and return a new object with a higher-level API. This API may also do things like have the Serial port `new` function require a borrow on some `Clock` structure, which can only be generated by calling the function which configures the PLLs and sets up all the clock frequencies. In this way, it is statically impossible to create a Serial port object without first having configured the clock rates, or for the Serial port object to mis-convert the baud rate into clock ticks. Some crates even define special traits for the states each GPIO pin can be in, requiring the user to put a pin into the correct state (say, by selecting the appropriate Alternate Function Mode) before passing the pin into Peripheral. All with no run-time cost! +The HAL crate for a chip typically works by implementing a custom Trait for the raw structures exposed by the PAC. Often this trait will define a function called `constrain()` for single peripherals or `split()` for things like GPIO ports with multiple pins. This function will consume the underlying raw peripheral structure and return a new object with a higher-level API. This API may also do things like have the Serial port `new` function require a borrow on some `Clock` structure, which can only be generated by calling the function which configures the PLLs and sets up all the clock frequencies. In this way, it is statically impossible to create a Serial port object without first having configured the clock rates, or for the Serial port object to misconvert the baud rate into clock ticks. Some crates even define special traits for the states each GPIO pin can be in, requiring the user to put a pin into the correct state (say, by selecting the appropriate Alternate Function Mode) before passing the pin into Peripheral. All with no run-time cost! Let's see an example: