关于TIVA c123g的定时器

2019-07-31 16:17发布

/************************************************************
* @brief         初始化Timer0定时器中断,以10K的频率响应定时中断,
*                         通过调节PWM信号的占空比输出一组SPWM信号
* @param        null
* @return  null
************************************************************/
void Init_Timer0_SPWM() {

        // Enable the peripherals used by this example.
        ROM_SysCtlPeripheralEnable (SYSCTL_PERIPH_TIMER0);

        // Enable processor interrupts.
        ROM_IntMasterEnable ();

        // Configure the two 32-bit periodic timers.
        ROM_TimerConfigure (TIMER0_BASE, TIMER_CFG_PERIODIC);

        // 8K Hz响应
        ROM_TimerLoadSet (TIMER0_BASE, TIMER_A,
                        ROM_SysCtlClockGet() / SAMPLE_FREQUENCY);

        // Setup the interrupts for the timer timeouts.
        ROM_IntEnable (INT_TIMER0A);

        ROM_TimerIntEnable (TIMER0_BASE, TIMER_TIMA_TIMEOUT);
        // Enable the timers.
        ROM_TimerEnable (TIMER0_BASE, TIMER_A);

}

这段代码中的ROM类函数都是怎么定义的,都找不到啊~
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。