:notes: _Why'd you have to go and make things so complicated?_ :notes:
One classical problem that pops up when developing a device driver is having to set the **baudrate** of a communication peripheral (e.g. SPI) or the **period** of a Timer. In these cases, in fact, the peripheral typically provides just a `DIV` or `PRESCALER` register. The baudrate for that specific peripheral is then defined as:
One classical problem that pops up when developing a device driver is having to set the **baudrate** of a communication peripheral or the **period** of a Timer. Let's take the SPI peripheral for example: the peripheral typically provides just a `DIV` or `PRESCALER`register, and you can't directly set the baudrate by simply writing some value in a register. The baudrate for the peripheral is defined as: