⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 core timer.c

📁 对ADSP21369的原理图和测试程序进行搜集
💻 C
字号:
///////////////////////////////////////////////////////////////////////////////////////
//NAME:     Core Timer.c
//DATE:     7/29/05
//PURPOSE:  Core timer example for the ADSP-21369 Ez-kit
//
//USAGE:    Sets up the Core Timer using the C-Runtime Environment
//          Counts and displays the number of core interrupts serviced.
////////////////////////////////////////////////////////////////////////////////////////

#include <stdio.h>
#include <def21369.h>
#include <signal.h>
#include <21369.h>

extern void initPLL_SDRAM(void);
int timer_count = 1;

//Timer interrupt service routine
void timer_isr (int sig)
{
    printf("Timer interrupt number %d\n",timer_count);
    timer_count++;
}

main()
{
    
    //Initialize PLL to run at CCLK= 331.776 MHz & SDCLK= 165.888 MHz.
	//SDRAM is setup for use, but cannot be accessed until MSEN bit is enabled
	initPLL_SDRAM();

    interrupts (SIG_TMZ, timer_isr);    // enable high priority timer interrupt
    timer_set(1000, 1000);              // set tperiod and tcount of the timer
    timer_on();                         // start timer
    while(1){};
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -