【嵌入式】FS2410非操作系统外围资源测试
在刚接触FS2410时,其实这个测试也没有多大意义,但是对于以后来说,当一个产品做成功时,产品测试还是一个必须经过的一个阶段,所以这个流程还是有必要走一下!
在非操作系统下,主要进行RTC测试,按键测试,蜂鸣器测试,ADC测试,IIC测试,触摸屏测试,LCD屏测试,音频输出测试,音频输入测试,红外线测试,SD卡测试,以及COM2测试……
1.首先进入NAND FLASH,下载测试程序
-
Power on reset
-
Env.Os_Lcd_Flag=0
-
Env.Os_Auto_Flag=0
-
<*******************************************>
-
<* *>
-
<* S3C2410 Board BIOS V2006 *>
-
<* *>
-
<* Http://www.ucdragon.com *>
-
<* *>
-
<* 深圳市优龙科技有限公司 *>
-
<* *>
-
<* 版 权 所 有 *>
-
<* *>
-
<*******************************************>
-
NAND Flash Boot
-
Please select function :
-
0 : USB download file
-
1 : Uart download file
-
2 : Write Nand flash with download file
-
3 : Load Pragram from Nand flash and run
-
4 : Erase Nand flash regions
-
5 : Write NOR flash with download file
-
6 : Set boot params
-
7 : Set AutoBoot parameter,1:linux 2:wince
-
8 : Set Lcd Display,1:DH3.5' 2:DH4.3' 3:QC7.0' 4:QC8.0' 5:VGA
-
0
-
USB download file, press Esc key to exit
-
Now USB is connected.
-
Now, Downloading [ADDRESS:30200000h,TOTAL:311290]
-
Now, Checksum calculation
-
Download O.K.
2.然后根据提示,运行刚下载的文件
-
Do you want to run? [y/n] : y
-
***********************************
-
* *
-
* FS2410 board demo program *
-
* Version: 2.1 2005/10/12 *
-
* Http://www.uCdragon.com *
-
* *
-
***********************************
-
RTC time : 2005-06-19 15:21:30
-
Please select function :
-
0 : Please input 1-14 to select test
-
1 : COM port ( UART2 ) test
-
2 : Buzzer test
-
3 : Real time clock display
-
4 : ADC test
-
5 : 8*2 key array test
-
6 : Touchpanel test
-
7 : TFT LCD test
-
8 : IRDA test
-
9 : IIC EEPROM test
-
10 : UDA1341 play audio test
-
11 : UDA1341 record audio test
-
12 : SD Card write and read test
3.这里主要是走一下流程,所以就不一一进行测试,先测试一下实时时钟
-
3
-
RTC TIME Display, press ESC key to exit !
-
RTC time : 2005-06-19 15:21:30
-
RTC time : 2005-06-19 15:21:31
-
RTC time : 2005-06-19 15:21:32
可以看到秒钟在不断的变化,说明RTC在正常工作,说明一点,这个时间并不是当前时间
4.按键测试
-
5
-
8X2 KEY array TEST ( Interrupt MODE )
-
Press 'ESC' key to Exit this program !
-
Interrupt occur... K16 is pressed!
-
Interrupt occur... K11 is pressed!
-
Interrupt occur... K10 is pressed!
-
Interrupt occur... K1 is pressed!
-
Interrupt occur... K1 is pressed!
-
Interrupt occur... K5 is pressed!
-
Interrupt occur... K5 is pressed!
-
Interrupt occur... K6 is pressed!
-
Interrupt occur... K6 is pressed!
可以看到通过串口打印出来的相应按键信息
5.红外线测试
-
8
-
IrDA test
-
Select baudrate = 19200
-
Now start UART IrDA Tx&Rx test, check data[a~z]
-
aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyz
-
End Tx&Rx
红外线进行的是自收发模式测试,测试结束后,会自动返回到主菜单界面
6.IIC测试
-
9
-
IIC Test(Interrupt) using AT24C02
-
Write test data into AT24C02
-
Read test data from AT24C02
-
The follow is the data writed to IIC EEPROM just now:
-
0 1 2 3 4 5 6 7
-
8 9 a b c d e f
-
10 11 12 13 14 15 16 17
-
18 19 1a 1b 1c 1d 1e 1f
-
20 21 22 23 24 25 26 27
-
28 29 2a 2b 2c 2d 2e 2f
-
30 31 32 33 34 35 36 37
-
38 39 3a 3b 3c 3d 3e 3f
IIC的读写测试,主要是通过向AT2410C02写0~255的数据,然后读出来
7.音频输出测试
-
10
-
Sample Rate = 22050, Channels = 2, 16BitsPerSample, size = 243508
-
?
-
err = 0
-
Now playing the file
-
Press 'ESC' to quit, '+' to inc volume, '-' to dec volume, 'm' to mute, 'p' to pause
先将音箱接到开发板的J2接口,这时将从音箱听到声音,按“+”或“-”可以增加或减少音量
8.SD卡测试
先将SD卡插入开发板的SD卡座
-
12
-
SDI CARD test
-
In idle
-
In SD ready
-
End id
-
In stand-by
-
****4bit bus****
-
Blocks = 1
-
[Block write test]
-
Mode : Polling write
-
[Block read test]
-
Mode : Polling read
-
Poll read
-
chk data end
-
Check Rx data
-
The follow is the data writed to SD Card just now:
-
00,01,02,03,04,05,06,07,08,09,0a,0b,0c,0d,0e,
-
0f,10,11,12,13,14,15,16,17,18,19,1a,1b,1c,1d,
-
1e,1f,20,21,22,23,24,25,26,27,28,29,2a,2b,2c,
-
2d,2e,2f,30,31,32,33,34,35,36,37,38,39,3a,3b,
-
3c,3d,3e,3f,40,41,42,43,44,45,46,47,48,49,4a,
-
4b,4c,4d,4e,4f,50,51,52,53,54,55,56,57,58,59,
-
5a,5b,5c,5d,5e,5f,60,61,62,63,64,65,66,67,68,
-
69,6a,6b,6c,6d,6e,6f,70,71,72,73,74,75,76,77,
-
78,79,7a,7b,7c,7d,7e,7f,
-
SD CARD Write and Read test is OK!
如提示所述,SD卡测试OK
测试工作还应该做相应记录和笔记的,以备后来查询时所用,这里就略过这个步骤哈!
本文出自 “成鹏致远” 博客,请务必保留此出处http://infohacker.blog.51cto.com/6751239/1169868