What is the register used for setting a divisor on the PWM clock on the BCM2835? I looked at the data sheet (Raspberry-Pi-BCM2835-ARM-Peripherals) - but couldn't find this information.
But this information must be available somewhere, because going through the wiringPi code, I find:
#define BCM2708_PERI_BASE 0x20000000 #define CLOCK_BASE (BCM2708_PERI_BASE + 0x00101000) #define PWMCLK_DIV 41 ... clk = (uint32_t *)mmap(0, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, CLOCK_BASE) ; ... *(clk + PWMCLK_DIV) = BCM_PASSWORD | (divisor << 12) ;
I don't know where 0x00101000 and 41 are coming from. Could you point me to documentation that explains the above?