Initialization

    Powering up the timer is easy: We just have to set bit to 1. This bit is in the APB1ENRregister of the register block.

    First, we’ll have to configure the timer to operate in one pulse mode.

    I’m going to let you figure out the value of the prescaler, psc. Remember that the frequency ofthe counter is and that apb1 is 8 MHz.