【嵌入式】FS2410非操作系统外围资源测试

        在刚接触FS2410时,其实这个测试也没有多大意义,但是对于以后来说,当一个产品做成功时,产品测试还是一个必须经过的一个阶段,所以这个流程还是有必要走一下!

        在非操作系统下,主要进行RTC测试,按键测试,蜂鸣器测试,ADC测试,IIC测试,触摸屏测试,LCD屏测试,音频输出测试,音频输入测试,红外线测试,SD卡测试,以及COM2测试……

1.首先进入NAND FLASH,下载测试程序

  1. Power on reset

  2. Env.Os_Lcd_Flag=0

  3. Env.Os_Auto_Flag=0

  4. <*******************************************>

  5. <*                                         *>

  6. <*         S3C2410 Board BIOS V2006        *>

  7. <*                                         *>

  8. <*         Http://www.ucdragon.com         *>

  9. <*                                         *>

  10. <*         深圳市优龙科技有限公司          *>

  11. <*                                         *>

  12. <*             版  权  所  有              *>

  13. <*                                         *>

  14. <*******************************************>

  15. NAND Flash Boot

  16. Please select function :  

  17. 0 : USB download file

  18. 1 : Uart download file

  19. 2 : Write Nand flash with download file

  20. 3 : Load Pragram from Nand flash and run

  21. 4 : Erase Nand flash regions

  22. 5 : Write NOR flash with download file

  23. 6 : Set boot params

  24. 7 : Set AutoBoot parameter,1:linux 2:wince

  25. 8 : Set Lcd Display,1:DH3.5' 2:DH4.3' 3:QC7.0' 4:QC8.0' 5:VGA

  26. 0

  27. USB download file, press Esc key to exit

  28. Now USB is connected.

  29. Now, Downloading [ADDRESS:30200000h,TOTAL:311290]

  30. Now, Checksum calculation

  31. Download O.K.

2.然后根据提示,运行刚下载的文件

  1. Do you want to run? [y/n] : y

  2. ***********************************

  3. *                                 *

  4. *    FS2410 board demo program    *

  5. *    Version: 2.1   2005/10/12    *

  6. *     Http://www.uCdragon.com     *

  7. *                                 *

  8. ***********************************

  9. RTC time : 2005-06-19 15:21:30

  10. Please select function :  

  11. 0 : Please input 1-14 to select test

  12. 1 : COM port ( UART2 ) test

  13. 2 : Buzzer test

  14. 3 : Real time clock display

  15. 4 : ADC test

  16. 5 : 8*2 key array test

  17. 6 : Touchpanel test

  18. 7 : TFT LCD test

  19. 8 : IRDA test

  20. 9 : IIC EEPROM test

  21. 10 : UDA1341 play audio test

  22. 11 : UDA1341 record audio test

  23. 12 : SD Card write and read test

3.这里主要是走一下流程,所以就不一一进行测试,先测试一下实时时钟

  1. 3

  2. RTC TIME Display, press ESC key to exit !

  3. RTC time : 2005-06-19 15:21:30

  4. RTC time : 2005-06-19 15:21:31

  5. RTC time : 2005-06-19 15:21:32

可以看到秒钟在不断的变化,说明RTC在正常工作,说明一点,这个时间并不是当前时间

 4.按键测试

  1. 5

  2. 8X2 KEY array TEST ( Interrupt MODE )

  3. Press 'ESC' key to Exit this program !

  4. Interrupt occur... K16 is pressed!

  5. Interrupt occur... K11 is pressed!

  6. Interrupt occur... K10 is pressed!

  7. Interrupt occur... K1 is pressed!

  8. Interrupt occur... K1 is pressed!

  9. Interrupt occur... K5 is pressed!

  10. Interrupt occur... K5 is pressed!

  11. Interrupt occur... K6 is pressed!

  12. Interrupt occur... K6 is pressed!

可以看到通过串口打印出来的相应按键信息

 5.红外线测试

  1. 8

  2. IrDA test

  3. Select baudrate = 19200

  4. Now start UART IrDA Tx&Rx test, check data[a~z]

  5. aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyz

  6. End Tx&Rx

红外线进行的是自收发模式测试,测试结束后,会自动返回到主菜单界面

6.IIC测试

  1. 9

  2. IIC Test(Interrupt) using AT24C02

  3. Write test data into AT24C02

  4. Read test data from AT24C02

  5. The follow is the data writed to IIC EEPROM just now:

  6. 0  1  2  3  4  5  6  7  

  7. 8  9  a  b  c  d  e  f  

  8. 10 11 12 13 14 15 16 17  

  9. 18 19 1a 1b 1c 1d 1e 1f  

  10. 20 21 22 23 24 25 26 27  

  11. 28 29 2a 2b 2c 2d 2e 2f  

  12. 30 31 32 33 34 35 36 37  

  13. 38 39 3a 3b 3c 3d 3e 3f  

IIC的读写测试,主要是通过向AT2410C02写0~255的数据,然后读出来

7.音频输出测试

  1. 10

  2. Sample Rate = 22050, Channels = 2, 16BitsPerSample, size = 243508

  3. ?

  4. err = 0

  5. Now playing the file

  6. Press 'ESC' to quit, '+' to inc volume, '-' to dec volume, 'm' to mute, 'p' to pause

先将音箱接到开发板的J2接口,这时将从音箱听到声音,按“+”或“-”可以增加或减少音量

8.SD卡测试

先将SD卡插入开发板的SD卡座

  1. 12

  2. SDI CARD test

  3. In idle

  4. In SD ready

  5. End id

  6. In stand-by

  7. ****4bit bus****

  8. Blocks = 1

  9. [Block write test]

  10. Mode : Polling write

  11. [Block read test]

  12. Mode : Polling read

  13. Poll read

  14. chk data end

  15. Check Rx data

  16. The follow is the data writed to SD Card just now:

  17. 00,01,02,03,04,05,06,07,08,09,0a,0b,0c,0d,0e,

  18. 0f,10,11,12,13,14,15,16,17,18,19,1a,1b,1c,1d,

  19. 1e,1f,20,21,22,23,24,25,26,27,28,29,2a,2b,2c,

  20. 2d,2e,2f,30,31,32,33,34,35,36,37,38,39,3a,3b,

  21. 3c,3d,3e,3f,40,41,42,43,44,45,46,47,48,49,4a,

  22. 4b,4c,4d,4e,4f,50,51,52,53,54,55,56,57,58,59,

  23. 5a,5b,5c,5d,5e,5f,60,61,62,63,64,65,66,67,68,

  24. 69,6a,6b,6c,6d,6e,6f,70,71,72,73,74,75,76,77,

  25. 78,79,7a,7b,7c,7d,7e,7f,

  26. SD CARD Write and Read test is OK!

如提示所述,SD卡测试OK

测试工作还应该做相应记录和笔记的,以备后来查询时所用,这里就略过这个步骤哈!

本文出自 “成鹏致远” 博客,请务必保留此出处http://infohacker.blog.51cto.com/6751239/1169868

原文地址:https://www.cnblogs.com/lcw/p/3159457.html