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

📄 time5.c

📁 CH375移植到S3C44B0
💻 C
字号:
/* ARM board targetting source file.
   file name: uhal.c
   date: 2001. 2. 14
   made by cho dong-seok
   homepage: www.pusanssm.com/~cthr36/
*/

#include <stdarg.h>
#include <string.h>
#include "../inc/44b.h"



//Initialize timer that is used OS.
void uHALr_InitTimers(void)
{
	rTCFG0=0x00040000;		// prescaler0 = 4
	rTCFG1=0x00300000;		// mux5 = 1/16

	rTCNTB5= 1000;//_CLOCK;
	rTCON=0x2<<24;		//update mode for TCNTB0 and TCMPB0.
	rTCON=0x5<<24;		//timer0 = auto reload, start
}//uHALr_InitTimers


extern void __Tick(void);

void InstallSystemTimer(void)
{
	//Non-vectored,IRQ enable,FIQ disable 
	pISR_TIMER5= (unsigned)__Tick;
        rINTCON=0x5;

	//Non maksed TIMER0 .
	rINTMSK=~(BIT_TIMER5 | BIT_GLOBAL);	//Default value=0x7ffffff
}
                             /* targetInit */
//Initialze interrupts.
void InitInterrupts(void)
{
    //ARMDisableInt();
	
	// Non-vectored,IRQ disable,FIQ disable    
    rINTCON=0x0;	  

	// All=IRQ mode
    rINTMOD=0x0;	  

	// All interrupt is masked.
    uHALr_InitTimers();
    rINTMSK=BIT_GLOBAL;	
}//uHALr_InitInterrupts

⌨️ 快捷键说明

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