Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
2410test.c
Upload User: yzchenlin
Upload Date: 2022-03-09
Package Size: 712k
Code Size: 3k
Category:
ARM-PowerPC-ColdFire-MIPS
Development Platform:
C/C++
- //====================================================================
- // File Name : 2410test.c
- // Function : S3C2410 Test Main Menu
- // Program : Shin, On Pil (SOP)
- // Date : May 21, 2002
- // Version : 0.0
- // History
- // 0.0 : Programming start (February 20,2002) -> SOP
- //====================================================================
- #include <stdlib.h>
- #include <string.h>
- //Shin, On Pil
- #include "def.h"
- #include "2410lib.h"
- #include "uart0.h"
- void Isr_Init(void);
- void HaltUndef(void);
- void HaltSwi(void);
- void HaltPabort(void);
- void HaltDabort(void);
- //===================================================================
- void Main(void)
- {
- Led_Display(15);
- ChangeClockDivider(1,1); // 1:2:4
- ChangeMPllValue(0xa1,0x3,0x1); // FCLK=202.8MHz
- Port_Init();
- Isr_Init();
- Uart_Init(0,115200);
- Uart_Select(0);
- Uart_Printf("nnSMDK2410 Board (MCU S3C2410) Test Program Ver 1.0(20020521) FCLK = %d Hznn", FCLK);
- Delay(0); //calibrate Delay()
- while(1)
- {
- Led_Display(15);
- Delay(10000);
- Test_Uart0_Int();
- Led_Display(0);
- Delay(10000);
- Led_Display(1);
- Delay(10000);
- Led_Display(2);
- Delay(10000);
- Led_Display(4);
- Delay(10000);
- Led_Display(8);
- }
- }
- //===================================================================
- void Isr_Init(void)
- {
- pISR_UNDEF = (unsigned)HaltUndef;
- pISR_SWI = (unsigned)HaltSwi;
- pISR_PABORT = (unsigned)HaltPabort;
- pISR_DABORT = (unsigned)HaltDabort;
- rINTMOD = 0x0; //All=IRQ mode
- // rINTCON=0x5; //Non-vectored,IRQ enable,FIQ disable
- rINTMSK = BIT_ALLMSK; //All interrupt is masked.
- rINTSUBMSK = BIT_SUB_ALLMSK; //All sub-interrupt is masked. <- April 01, 2002 SOP
- // rINTSUBMSK = ~(BIT_SUB_RXD0); //Enable Rx0 Default value=0x7ff
- // rINTMSK = ~(BIT_UART0); //Enable UART0 Default value=0xffffffff
- // pISR_UART0=(unsigned)RxInt; //pISR_FIQ,pISR_IRQ must be initialized
- }
- //===================================================================
- void HaltUndef(void)
- {
- Uart_Printf("Undefined instruction exception.n");
- while(1);
- }
- //===================================================================
- void HaltSwi(void)
- {
- Uart_Printf("SWI exception.n");
- while(1);
- }
- //===================================================================
- void HaltPabort(void)
- {
- Uart_Printf("Pabort exception.n");
- while(1);
- }
- //===================================================================
- void HaltDabort(void)
- {
- Uart_Printf("Dabort exception.n");
- while(1);
- }
- /*
- //=========================
- while(1)
- {
- Led_Display(3);
- }
- //=========================
- */
- /*
- //=========================
- while(1)
- {
- Led_Display(1);
- Delay(1500);
- Led_Display(2);
- Delay(1500);
- Led_Display(4);
- Delay(1500);
- Led_Display(8);
- Delay(1500);
- }
- //=========================
- */