NHOFFMANRESEARCH
Updated 746 days ago
We will step through the initialization of PWM a few lines at a time. First, we write values to define how PIO controller C multiplexes signals (PIOC). The value 0x3C writes a 1 for I/O lines PC2-PC5 which assigns the PWM outputs we intend to use to peripheral B. The values written to the peripheral disable register (PDR) in the first line allow peripheral control of the pin and the AB select register values (ABSR) is the actual assignment of the pins to peripheral B. Your journey to find more information about this can start at section 31.5.3 of the data sheet.