📄 2410test.c
字号:
//====================================================================
// File Name : 2410test.c
// Function : S3C2410 Test Main Menu
// Program : Shin, On Pil (SOP)
// Date : May 30, 2002
// Version : 0.0
// History
// 0.0 : Programming start (February 20,2002) -> SOP
// 1.0 (20020530) : First release for customer
// 1.1 (20020801) : Strata NOR Flash Added and etc. -> SOP
//====================================================================
#include <stdlib.h>
#include <string.h>
//Shin, On Pil
#include "def.h"
#include "option.h"
#include "2410addr.h"
#include "2410lib.h"
#include "2410slib.h"
/*
#include "2410etc.h"
#include "2410IIC.h"
#include "2410iis.h"
#include "2410int.h"
#include "2410RTC.h"
#include "2410swi.h"
*/
//#include "cpuspeed.h"
//#include "lcdpwr.h"
//#include "timer.h"
//Kang, Weon Tark
/*
#include "adc.h"
#include "dma.h"
#include "dma2.h"
#include "eint.h"
#include "extdma.h"
*/
#include "k9s1208_extra.h"
/*
#include "mmu.h"
#include "nwait.h"
#include "sdi.h"
#include "stone.h"
#include "ts_auto.h"
#include "ts_sep.h"
#include "usbfifo.h"
*/
//Shin, Jeong Seuk
/*
#include "IrDA.h"
#include "lcd.h"
#include "lcdlib.h"
#include "glib.h"
#include "palette.h"
#include "spi.h"
#include "uart0.h"
#include "uart1.h"
#include "uart2.h"
*/
//Kong, In Wook
//#include "etc.h"
#include "flash.h"
/*
#include "idle.h"
#include "pd6710.h"
#include "pll.h"
#include "power.h"
#include "pwr_c.h"
#include "stop.h"
*/
void Not_Support(void);
static void Isr_Init(void);
void HaltUndef(void);
void HaltSwi(void);
void HaltPabort(void);
void HaltDabort(void);
int u241test_easymode=0;
static void * function[][2]=
{
//ADC, TSP
(void *)Not_Support, "ADC ",
(void *)Not_Support, "ADC with DMA ",
(void *)Not_Support, "ADC TSP Seperate ",
(void *)Not_Support, "ADC TSP Auto ",
//DMA
(void *)Not_Support, "DMA M2M ",
(void *)Not_Support, "DMA Worst Test ",
(void *)Not_Support, "External DMA ",
//EINT
(void *)Not_Support, "External Interrupt ",
//IIC
(void *)Not_Support, "IIC(KS24C080)INT ",
(void *)Not_Support, "IIC(KS24C080)POL ",
//IIS
(void *)Not_Support, "Reco IIS UDA1341 ",
(void *)Not_Support, "Play IIS UDA1341 ",
//Interrupt
(void *)Not_Support, "FIQ Interrupt ",
(void *)Not_Support, "Change INT Priority ",
//IrDA
(void *)Not_Support, "UART2 IrDA Rx ",
(void *)Not_Support, "UART2 IrDA Tx ",
//LCD
// (void *)Test_PaletteMemory, "LCD Palette RAM ",
(void *)Not_Support, "STN 1Bit ",
(void *)Not_Support, "STN 2Bit ",
(void *)Not_Support, "STN 4Bit ",
(void *)Not_Support, "CSTN 8Bit ",
(void *)Not_Support, "CSTN 8Bit On ",
(void *)Not_Support, "CSTN 12Bit ",
(void *)Not_Support, "TFT240320 8Bit ",
(void *)Not_Support, "TFT240320 8Bit On ",
(void *)Not_Support, "TFT240320 16Bit ",
// (void *)Test_Lcd_Tft_8Bit_240320_Bmp, "TFT240320 Bmp ",
(void *)Not_Support, "TFT640480 1Bit ",
(void *)Not_Support, "TFT640480 8Bit ",
(void *)Not_Support, "TFT640480 16Bit ",
(void *)Not_Support, "TFT640480 BSWP ",
(void *)Not_Support, "TFT640480 Palette ",
(void *)Not_Support,"TFT640480 HWSWP ",
// (void *)Test_Lcd_PowerOnOFF, "LCD Power On/Off ",
//Memory
// (void *)WriteMemory, "MEMORY Write ",
// (void *)ReadMemory, "MEMORY Read ",
//MPLL
(void *)Not_Support, "MPLL Change ",
(void *)Not_Support, "MPLL MPS Change ",
(void *)Not_Support, "MPLL On/Off ",
//PMS
(void *)Not_Support, "PMS Slow ",
(void *)Not_Support, "PMS Hold ",
(void *)Not_Support, "PMS Idle ",
(void *)Not_Support, "PMS Idle(MMU) ",
(void *)Not_Support, "PMS Idle Hard ",
(void *)Not_Support, "PMS SDRAM Init ",
(void *)Not_Support, "PMS STOP ",
(void *)Not_Support, "PMS Power-Off STOP ",
(void *)Not_Support, "PMS Power-Off 100Hz ",
(void *)Not_Support, "PMS Measure Power ",
//RTC
(void *)Not_Support, "RTC Alarm ",
(void *)Not_Support, "RTC Display ",
(void *)Not_Support, "RTC Round Reset ",
(void *)Not_Support, "RTC Tick ",
//SDI
(void *)Not_Support, "SDI Write/Read ",
// (void *)MMC_Protect, "SDI MMC Protect ",
// (void *)MMC_Dma_StrRd, "SDI MMC Read ",
// (void *)MMC_Dma_StrWt, "SDI MMC Write ",
//SPI
(void*) Not_Support, "SPI0 RxTx Int ",
(void *)Not_Support, "SPI0 RxTx POLL ",
(void *)Not_Support, "SPI0 Master Tx DMA1 ",
(void *)Not_Support, "SPI0 Slave Rx DMA1 ",
(void *)Not_Support, "SPI0 Master Rx DMA1 ",
(void *)Not_Support, "SPI0 Slave Tx DMA1 ",
(void *)Not_Support, "SPI0 Master RxTx INT",
(void *)Not_Support, "SPI0 Slave RxTx INT ",
//Timer
// (void *)Test_TimerChannel, "Timer Channel ",
// (void *)Test_TimerDma, "Timer DMA ",
(void *)Not_Support, "Timer Interrupt ",
(void *)Not_Support, "Timer Tout ",
//UART
(void *)Not_Support, "UART0 Rx/Tx Int ",
(void *)Not_Support, "UART0 Rx/Tx DMA ",
(void *)Not_Support, "UART0 Rx/Tx FIFO ",
(void *)Not_Support, "UART0 AFC Tx ",
(void *)Not_Support, "UART0 AFC Rx ",
(void *)Not_Support, "UART1 Rx/Tx Int ",
(void *)Not_Support, "UART1 Rx/Tx DMA ",
(void *)Not_Support, "UART1 Rx/Tx FIFO ",
(void *)Not_Support, "UART1 AFC Tx ",
(void *)Not_Support, "UART1 AFC Rx ",
(void *)Not_Support, "UART2 Rx/Tx Int ",
(void *)Not_Support, "UART2 Rx/Tx DMA ",
(void *)Not_Support, "UART2 Rx/Tx FIFO ",
//USB
(void *)Not_Support, "USB FIFO Test ",
//WDT
(void *)Not_Support, "WDT INT Request ",
//ETC
// (void *)Test_CpuSpeed, "*Core Speed ",
(void *)Not_Support, "External Bus Reqest ",
(void *)Not_Support, "NonAlgined Access ",
(void *)Not_Support, "PC Card (PD6710) ",
(void *)Not_Support, "Read Page Mode ",
(void *)Not_Support, "SWI ",
(void *)Not_Support, "External Wait ",
(void *)Not_Support, "Stone Test ",
(void *)Not_Support, "ETC NEC Int ",
(void *)Not_Support, "nBATT_FAULT int ",
//NAND, NOR Flash
(void *)K9S1208_PrintBadBlockNum, "NAND View Bad Block ",
(void *)K9S1208_PrintBlock, "NAND View Page ",
(void *)K9S1208_Program, "NAND Write ",
(void *)TestECC, "NAND ECC ",
(void *)ProgramFlash, "NOR Flash Program ",
0,0
};
//===================================================================
void u241test(void)
{
int i;
Led_Display(15);
MMU_Init();
#if ADS10
__rt_lib_init(); //for ADS 1.0
#endif
// ChangeClockDivider(0,0); // 1:1:1
// ChangeClockDivider(1,0); // 1:2:2
//ChangeClockDivider(1,1); // 1:2:4
// ChangeMPllValue(0x92,0x4,0x2); // FCLK=50MHz
// ChangeMPllValue(0x96,0x5,0x1); // FCLK=135428571Hz
// ChangeMPllValue(0x2a,0x1,0x0); // FCLK=200MHz
// ChangeMPllValue(0x5c,0x1,0x1); // FCLK=200MHz
// ChangeMPllValue(0x5c,0x4,0x0); // FCLK=200MHz
// ChangeMPllValue(0x8e,0x7,0x0); // FCLK=200MHz
//ChangeMPllValue(0xa1,0x3,0x1); // FCLK=202.8MHz
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -