6410 pwm timer

five 32-bit timer

these timers are used to generate internal interrupts to the arm subsystem

Timer0

Timer1 (timer0 timer1 include a PWM function[Pulse Width Modulation], which can

drive an external I/O signal. the PWM for timer0 and 1 have an optinonal dead-zone generator capability)

timer 2, 3,4 没有输出针

5 - 32-bit timers

2 8-bit clock prescalers prividing first level of division(分频) for PCLK,

Five clock dividers (分频)and multiplers(复用) prividing second level of fivision for prescaler clock and external clocks.

char str[20] = {0}  ===> call memset()

严重过错

#define TCNTB0 *((volatile unsigned int *)0x7f00600c)
        // 配置初始值 PCLK=66.5M 1秒钟 变 66500000次

      *((volatile unsigned int *)(TCNTB0+0xc*timer_no)) =
                ((g_PCLK>>11)/1000)*ms; 把一个整数当地址用
        *((volatile unsigned int *)(0x7f00600c+0xc*timer_no)) =
                ((g_PCLK>>11)/1000)*ms;

原文地址:https://www.cnblogs.com/kwingmei/p/3263746.html