DevKit8000 FAQ

主要描述基于DevKit8000开发时所遇到的一些问题及解决方法.

=硬件问题=

怎么让USB OTG口工作于主、从方式?
A:在内核启动前，如果要让USB OTG工作于主方式，则板载USB OTG接套件提供的USB A型线；如果要让USB OTG工作于从方式，则板载USB OTG接套件提供的USB B型线.

问题->: 如何切换到MMC/SD启动开发板？
A:按住BOOT按键，上电启动，系统改为先从MMC/SD启动，再从NAND启动，详细请参考“3.18按键”介绍.

DevKit8000与仿真器相连接，调试DSP和ARM
目前正在找相关的仿真器，看有否可支持的仿真器系列.

DevKit8000中的RTC电池
DevKit8000出货时不带RTC电池，需用户自行配备，电池型号用 CR1220即可

DevKit8000中的U20 (ISP1504) U13 (TXS0102)芯片问题
ISP1504 是USB HOST芯片,由于我们的USB HOST暂未调通，怀疑是硬件问题，故目前没有把此芯片焊上去. U13 (TXS0102) 是DVI的一个附带电路，但是此刻芯片未影响DVI的输出，故我们没有焊接此芯片，不影响DVI的使用.

''the ISP1504 is for the USB HOST, but at now the USB HOST is not OK, so the board we sold don't have the chips. U13 (TXS0102) is not used for the dvi, and it don't effect your DVI output ''

=linux问题=

开发驱动时如何打开低层调试信息?
A:make menucofig -> kernel hacking -> lowlevel debug

如何让显示输出在lcd屏与DVI输出之间切换?
A:只需修改内核启动参数即可. 4.3” LCD屏： OMAP3 DevKit8000 # setenv bootargs console=ttyS2,115200n8 ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs video=omapfb:mode: 4.3inch_LCD 7” LCD屏： OMAP3 DevKit8000 # setenv bootargs console=ttyS2,115200n8 ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs video=omapfb:mode:7inch_LCD DVI显示器： OMAP3 DevKit8000 # setenv bootargs console=ttyS2,115200n8 ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs video=omapfb:mode:720p60

OMAP中linux使用技巧
ifconfig eth0 192.192.192.77 route add default gw 192.192.192.101 mount -t vfat /dev/block/mmcblk0p1 /sdcard setprop EXTERNAL_STORAGE_STATE mounted am broadcast -a android.intent.action.MEDIA_MOUNTED --ez read-only false -d file:///sdcard cd /sdcard cat /dev/graphics/fb0 > a1
 * 网卡配置
 * 挂载SDcard

tftp更新方式
板上配置有10/100M自适应网卡dm9000，用户可通过tftp下载的方式更新nand启动映像 1）x-loader启动映像的更新 OMAP3 DevKit8000 # tftp 80000000 x-load.bin.ift_for_NAND dm9000 i/o: 0x2c000000, id: 0x90000a46 MAC: aa:bb:cc:dd:ee:ff operating at 100M full duplex mode TFTP from server 192.192.192.90; our IP address is 192.192.192.200 Filename 'x-load.bin.ift_for_NAND'. Load address: 0x80000000 Loading: T # done Bytes transferred = 9664 (25c0 hex) OMAP3 DevKit8000 # nand unlock device 0 whole chip nand_unlock: start: 00000000, length: 134217728! NAND flash successfully unlocked OMAP3 DevKit8000 # nand ecc hw OMAP3 DevKit8000 #  nand erase 0 80000

NAND erase: device 0 offset 0x0, size 0x80000 Erasing at 0x60000 -- 100% complete. OK OMAP3 DevKit8000 # nand write.i 80000000 0 80000

NAND write: device 0 offset 0x0, size 0x80000

Writing data at 0x7f800 -- 100% complete. 524288 bytes written: OK

2）u-boot启动映像的更新 OMAP3 DevKit8000 # tftp 80000000 flash-uboot.bin dm9000 i/o: 0x2c000000, id: 0x90000a46 MAC: aa:bb:cc:dd:ee:ff operating at 100M full duplex mode TFTP from server 192.192.192.90; our IP address is 192.192.192.200 Filename 'flash-uboot.bin'. Load address: 0x80000000 Loading: T ################################################################# done Bytes transferred = 1085536 (109060 hex) OMAP3 DevKit8000 # nand unlock device 0 whole chip nand_unlock: start: 00000000, length: 134217728! NAND flash successfully unlocked OMAP3 DevKit8000 # nand ecc sw OMAP3 DevKit8000 #  nand erase 80000 160000

NAND erase: device 0 offset 0x80000, size 0x160000 Erasing at 0x1c0000 -- 100% complete. OK OMAP3 DevKit8000 # nand write.i 80000000 80000 160000

NAND write: device 0 offset 0x80000, size 0x160000

Writing data at 0x1df800 -- 100% complete. 1441792 bytes written: OK

3）内核映像更新 OMAP3 DevKit8000 # tftp 80000000 uImage dm9000 i/o: 0x2c000000, id: 0x90000a46 MAC: aa:bb:cc:dd:ee:ff operating at 100M full duplex mode TFTP from server 192.192.192.90; our IP address is 192.192.192.200 Filename 'uImage'. Load address: 0x80000000 Loading: T ################################################################# done Bytes transferred = 1991900 (1e64dc hex) OMAP3 DevKit8000 # nand unlock device 0 whole chip nand_unlock: start: 00000000, length: 268435456! NAND flash successfully unlocked OMAP3 DevKit8000 # nand ecc sw OMAP3 DevKit8000 #  nand erase 280000 200000

NAND erase: device 0 offset 0x280000, size 0x200000 Erasing at 0x460000 -- 100% complete. OK OMAP3 DevKit8000 # nand write.i 80000000 280000 200000

NAND write: device 0 offset 0x280000, size 0x200000

Writing data at 0x47f800 -- 100% complete. 2097152 bytes written: OK

4）文件系统映像更新 OMAP3 DevKit8000 # tftp 80000000 ubi.img dm9000 i/o: 0x2c000000, id: 0x90000a46 MAC: aa:bb:cc:dd:ee:ff operating at 100M full duplex mode TFTP from server 192.192.192.90; our IP address is 192.192.192.200 Filename 'ubi.img'. Load address: 0x80000000 Loading: T ################################################################# done Bytes transferred = 12845056 (c40000 hex) OMAP3 DevKit8000 # nand unlock device 0 whole chip nand_unlock: start: 00000000, length: 268435456! NAND flash successfully unlocked OMAP3 DevKit8000 # nand ecc sw OMAP3 DevKit8000 #  nand erase 680000 7980000

NAND erase: device 0 offset 0x680000, size 0x7980000 Erasing at 0x7fe0000 -- 100% complete. OK OMAP3 DevKit8000 # nand write.i 80000000 680000 $(filesize)

NAND write: device 0 offset 0x680000, size 0xc40000

Writing data at 0x12bf800 -- 100% complete. 12845056 bytes written: OK

linux交叉编译工具安装
1.网站下载交叉编译工具： http://www.codesourcery.com/sgpp/lite/arm/portal/package1787/public/arm-none-linux-gnueabi/arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 2.解压缩软件 sudo tar xvf arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C /home/

3. 工具安装 mkdir /home/embest/tools cp /media/cdrom/linux/tools/mkimage /home/embest/tools cp /media/cdrom/linux/tools/signGP /home/embest/tools cp /media/cdrom/linux/tools/mkfs.ubifs /home/embest/tools cp /media/cdrom/linux/tools/ubinize /home/embest/tools cp /media/cdrom/linux/tools/ ubinize.cfg /home/embest/tools

4. 设置环境变量 export PATH=/home/arm-2007q3/bin/:/home/embest/tools:$PATH

linux摄像头显示模式转化
操作方法： 1、LCD显示： /usr/bin/saMmapLoopback 2、DVI显示： echo DVI > /sys/class/display_control/omap_disp_control/ch0_output /usr/bin/saMmapLoopback 3、S-Video显示： echo channel1 > /sys/class/display_control/omap_disp_control/video1 /usr/bin/saMmapLoopback

OTG主口使用问题
USB使用方法: 1. 连接USB hub电源到USB HUB 2. 连接USB OTG转接线到DevKit8000板上， 3. 上电待开发板进入linux系统 4. 插入usb hub线到USB OTG转接线上 5.可以插入usb 鼠标键盘到hub了

7LCD触摸屏不准的解决方法
修改此文件arch/arm/mach-omap2/board-omap3devkit8000.c为如下数据即可 struct ads7846_platform_data ads7846_conf = { .x_max                 = 0x0fff, .y_max                 = 0x0fff, //     .x_plate_ohms           = 180, //     .pressure_max           = 255, .debounce_max          = 10, .debounce_tol          = 5, .debounce_rep          = 1, .get_pendown_state     = ads7846_get_pendown_state, .keep_vref_on          = 1, .settle_delay_usecs    = 150, };

=wince问题=

烧写wince到NAND Flash系统映像更新
1.更新文件准备 （1）	用软件HP Disk Storage Format Tool格式化SD卡为FAT或FAT32文件系统. （2）	拷贝光盘目录image[\wince_6]下子目录dvi1280X720或lcd480X272下文件MLO、EBOOTNAND.nb0、NK.bin、XLDRNAND.nb0和ADevKit9000.exe到SD卡并重命名EBOOTNAND.nb0为EBOOTSD.nb0 2. 映像更新 （1）	按住BOOT键，后插入SD卡重新启动系统. 这时系统从SD卡启动. 超级终端输出启动打印信息，按[SPACE]进入EBOOT菜单. （2）	按[5]进入Flash管理菜单. （3）	分别按[a]、[b]和[c]，写XLDR、EBOOT和NK映像. （4）	然后按[0]键回到主菜单，并分别按下[2]、[4]、[7]和[y]更改启动设备. （5）	拔除SD卡，后重新启动系统. 这时系统将从NAND Flash启动. 英文显示 the method to Update the image for NAND Flash (1)Run the software of HP Disk Storage Format Tool and format the SD card for FAT or FAT32 filesystem. (2) Copy the image file(MLO, EBOOTNAND.nb0, NK.bin, ADevKit8000.exe) from CD:\wince_6\image\ lcd480X272 to SD card, then change the name from EBOOTNAND.nb0 to EBOOTSD.nb0 in the SD card. (3) Insert the SD card to the board, press the BOOT button and then power on the board again; HyperTerminal will start printing the output information, at the same time press [SPACE] to enter the EBOOT menu. (4) Press [5] to enter the Flash manage menu. (5) Press [a], [b], [c] separately to write the image(XLDR, EBOOT, NK) to flash. (6) Press [0] to return to the main menu, and press [2], [4], [7], [7] to change the boot device. (7) Power on the system again, and then the board will boot from the NAND flash.

屏蔽WinCE启动后的触摸屏打印信息
修改函数DevKit8000\SRC\DRIVERS\TOUCH\touchscreen.cpp, 把564行		RETAILMSG(1, ( TEXT( "Point: (%d,%d)\r\n" ), *pUncalX, *pUncalY ) ); 屏蔽掉然后重新编译就行了. 如下所示： //RETAILMSG(1, ( TEXT( "Point: (%d,%d)\r\n" ), *pUncalX, *pUncalY ) );

关闭调试串口打印
setp: 1,commnent out the RETAILMSG call in TouchDriverCalibrationPointGet function of touchscreen.cpp 2,commnent out the RETAILMSG call in DdsiTouchPanelGetPoint function of touchscreen.cpp 3,commnent out the RETAILMSG call in TLED_Backlight::SetPowerState function of tled_backlight.cpp 4,commnent out the RETAILMSG call in SetDutyCycle function of tled.cpp 5,commnent out the RETAILMSG call in LcdPdd_LCD_Initialize function of lcd_vga.c 6,make sure that "set BSP_NOCOM=" is not set in DevKit8000.bat 7,make sure that "set BSP_NOCOM3=" is not set in DevKit8000.bat 8,delete the "IF BSP_COM3" of _FLATRELEASEDIR/platform.reg in line 1103 9,delete the "ENDIF BSP_COM3" of _FLATRELEASEDIR/platform.reg in line 1124 10,rebuilt the BSP

关闭触摸屏校准
setp: 在BSP包的一级目录下，有DevKit8000.bat文件，在其中任一行添加： set IMGNOCALIBRATION=1 然后重新build编译即可

关于触摸屏不能用的问题解决方法
是编译时使用 build and sysgen导致的，在wince下不能用bulid and sysgen编译，用它就出问题，而且必须把pb6.0重装才可以

WINCE无法存储
在SRC\DRIVERS\BLOCK\NAND\nand_MT29F2G16.h 把下面这句 改成
 * 1) define NUMBER_OF_BLOCKS       (2048)  // 2048 blocks
 * 1) define NUMBER_OF_BLOCKS       (1024)  // 1024 blocks

WINCE无法设置时间
1,把新的rtc.c替换原来的src/oal/oalrtc/rtc.c（可询问技术人员提供） 2,在src/inc/bsp_cfg.h后面加上#define BSP_OAL_RTC_USES_TWL4030	TRUE

=其他问题=

格式化工具下载
网址：http://www.embedinfo.com/english/download/SP27213.exe

SD卡不能启动
推荐使用HP USB Disk Storage Format Tool 2.0.6：下载下列网址工具 http://www.embedinfo.com/english/download/SP27213.exe 安装后执行如下操作. 1、把MMC/SD卡插入PC下读卡器中 2、打开HP USB Disk Storage Format Tool 3、选择”FAT32“系统格式 4、点击”Start” 5、等待格式化完成，点击”OK” 6、把映像文件拷贝到SD卡中.  you should downlod the tools http://www.embedinfo.com/english/download/SP27213.exe then format your SD card for the fat32,then copy the file to it, then it can be booted.

提供demo配套u-boot.bin无法修改参数
提供demo配套u-boot.bin无法修改参数，用户想要修改并保存u-boot下参数，可采用DevKit8000提供u-boot源码，修改传递给内核的MACH_ID，重新编译即可. 具体操作方法： 1、u-boot-1.3.3源码 vi board/omap3devkit8000/omap3devkit8000.c 找到board_init函数 修改： gd->bd->bi_arch_number = MACH_TYPE_DEVKIT8000;为 gd->bd->bi_arch_number = XXX; 重新编译u-boot. 注： 1、对于angstrom，XXX为MACH_TYPE_DEVKIT8000 2、对于android，XXX为MACH_TYPE_OMAP3_BEAGLE 3、对于dvsdk，XXX为MACH_TYPE_OMAP3EVM

DevKit8000跑QT程序鼠标不工作
在输入make menuconfig后，在内核添加的：

Device Drivers ---> Input device support --->

<*>Mouse interface [*]Provide legacy /dev/psaux device (1024) Horizontal screen resolution (768)  Vertical screen resolution