📄 sysc_test.c
字号:
/**************************************************************************************
*
* Project Name : S3C6400 Validation
*
* Copyright 2006 by Samsung Electronics, Inc.
* All rights reserved.
*
* Project Description :
* This software is only for validating functions of the S3C6400.
* Anybody can use this software without our permission.
*
*--------------------------------------------------------------------------------------
*
* File Name : sysc_test.c
*
* File Description : This file implements the functons for System controller test.
*
* Author : Wonjoon Jang
* Dept. : AP Development Team
* Created Date : 200701/10
* Version : 0.1
*
* History
* - Created(wonjoon.jang 2007/01/10)
*
**************************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include "def.h"
#include "option.h"
#include "library.h"
#include "sfr6400.h"
#include "system.h"
#include "intc.h"
#include "gpio.h"
#include "sysc.h"
//#include "power_test.h"
#include "clock_test.h"
#include "reset_test.h"
#include "power_test.h"
void SYSC_CLKInform(void)
{
u32 uTTT0, uTTT1;
SYSC_CtrlCLKOUT( eCLKOUT_APLLOUT, 4);
SYSC_GetClkInform();
UART_InitDebugCh(0, 115200);
uTTT0 = SYSC_RdLockDetect(eAPLL);
uTTT1= SYSC_RdLockDetect(eMPLL);
printf("\n\n");
printf("***************************************************\n");
printf("* S3C6400 - Test firmware v0.1 *\n");
printf("***************************************************\n");
printf("System ID : Revision [%d], Pass [%d]\n", g_System_Revision, g_System_Pass);
printf("ARMCLK: %.2fMHz HCLKx2: %.2fMHz HCLK: %.2fMHz PCLK: %.2fMHz\n",(float)g_ARMCLK/1.0e6, (float)g_HCLKx2/1.0e6, (float)g_HCLK/1.0e6, (float)g_PCLK/1.0e6);
printf("SYNC Mode : %d\n", g_SYNCACK);
printf("APLL Lock : %d, MPLL_Lock: %d\n", uTTT0, uTTT1);
printf("AMPLL: %.2fMHz \n",(float)g_MPLL/1.0e6);
printf("\n");
}
///////////////////////////////////////////////////////////////////////////////////
//////////////////// Syscon Main Test ///////////////////////////
///////////////////////////////////////////////////////////////////////////////////
const testFuncMenu sysc_menu[] =
{
SYSCT_PowerMode, "Power Mode Test",
SYSCT_Clock, "Clock Test",
SYSCT_Reset, "Reset Test",
0, 0
};
void SYSC_Test(void)
{
u32 i;
s32 uSel;
printf("[SYSC_Test]\n\n");
while(1)
{
for (i=0; (u32)(sysc_menu[i].desc)!=0; i++)
printf("%2d: %s\n", i, sysc_menu[i].desc);
printf("\nSelect the function to test : ");
uSel =GetIntNum();
printf("\n");
if(uSel == -1)
break;
if (uSel>=0 && uSel<(sizeof(sysc_menu)/8-1))
(sysc_menu[uSel].func) ();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -