Blackfin uClinux test specification: Unterschied zwischen den Versionen
en>Peter K (1 Version importiert) |
Peter (Diskussion | Beiträge) K (1 Version importiert) |
(kein Unterschied)
|
Aktuelle Version vom 31. Oktober 2023, 09:03 Uhr
The following is a reference of commands etc. that we use to test our hardware with U-Boot/uClinux (Blackfin Core Modules and development boards).
Please note that not all listed tests are available for all Core Modules. Refer to the support matrix for more information.
U-Boot
Load U-Boot via serial
- Set boot mode to UART boot
bfin-uclinux-ldr -l blackfin/blt-scripts.git/images/cm-bf527/u-boot-UARTBOOT.ldr /dev/ttyUSB0 && kermit ~/stuff/kermit0USB
Flash U-Boot and uClinux
- U-Boot prompt:
setenv ipaddr 192.168.1.2 setenv serverip 192.168.1.1
CM-BF537E, CM-BF537U, TCM-BF537 only:
setenv ubootfile u-boot.bin
All:
run update tftp 0x1000000 uImage protect off 0x20040000 +$(filesize) erase 0x20040000 +$(filesize) cp.b 0x1000000 0x20040000 $(filesize)
- Set boot mode to Parallel (TCM-BF518, CM-BF527, CM-BF561, eCM-BF561) or Bypass (CM-BF533, CM-BF537E, CM-BF537U, TCM-BF537) respectively
- After a reset uClinux boots
Flash uClinux using JFFS2 image (for CMs with min. 4 MiB flash mem)
- U-Boot prompt:
setenv ipaddr 192.168.1.2 setenv serverip 192.168.1.1 tftp 0x1000000 vmImage protect off 0x20040000 +$(filesize) erase 0x20040000 +$(filesize) cp.b 0x1000000 0x20040000 $(filesize) tftp 0x1000000 rootfs.jffs2
CM-BF527, CM-BF561:
protect off 0x20140000 0x207fffff erase 0x20140000 0x207fffff
eCM-BF561:
protect off 0x20140000 0x21ffffff erase 0x20140000 0x21ffffff
CM-BF537E:
protect off 1:13-34 erase 1:13-34
CM-BF537U:
protect off 1:13-31 erase 1:13-31
TCM-BF537:
protect off 1:13-66 erase 1:13-66
All:
cp.b 0x1000000 0x20140000 $(filesize)
CM-BF527:
setenv bootargs root=/dev/mtdblock2 rw clkin_hz=50000000 earlyprintk=serial,uart0,115200 console=ttyBF0,115200 rootfstype=jffs2
CM-BF537E, TCM-BF537, CM-BF561, eCM-BF561:
setenv bootargs root=/dev/mtdblock2 rw clkin_hz=25000000 earlyprintk=serial,uart0,115200 console=ttyBF0,115200 rootfstype=jffs2
CM-BF537U:
setenv bootargs root=/dev/mtdblock2 rw clkin_hz=30000000 earlyprintk=serial,uart0,115200 console=ttyBF0,115200 rootfstype=jffs2
All:
saveenv
- After a reset uClinux boots
Ethernet test
- U-Boot prompt:
setenv ipaddr 192.168.1.2 setenv ethact bfin_mac ping 192.168.1.1 setenv ethact smc911x-0 ping 192.168.1.1
If available, both devices must be able to ping the 192.168.1.1 machine.
SD card test
- Insert SD card, formatted with FAT partition, with file "uImage" on it
- U-Boot prompt:
CM-BF548 only:
mmcinfo
TCM-BF518, CM-BF527, CM-BF533, CM-BF537E, CM-BF537U, TCM-BF537, CM-BF561, eCM-BF561:
mmc init
fatinfo mmc 0:1 fatls mmc 0:1 fatload mmc 0:1 0x1000000 /uimage bootm
- The uClinux kernel boots
USB test
U-Boot supports mass storage devices.
- Connect USB mass storage device to mini-USB-plug, formatted with 1 partition (EXT2), uImage on it
- Reset board
- Start USB
usb start usb storage
- List files
ext2ls usb 0:1
- Load uImage
ext2load usb 0:1 0x1000000 uImage
- Boot Linux
bootm
Linux boots, hence uImage was read correctly.
uClinux
SD card test
- Boot up Linux
- Insert formatted SD card
- Linux prompt:
eCM-BF561:
modprobe spi_bfin5xx
TCM-BF518, CM-BF527, CM-BF533, CM-BF537E, CM-BF537U, TCM-BF537, CM-BF561, eCM-BF561:
modprobe mmc_spi
CM-BF548 only:
modprobe bfin_sdh
mkdir /mnt/card mount /dev/mmcblk0p1 /mnt/card/ dd if=/dev/urandom of=/mnt/card/randomfile bs=1M count=1 md5sum /mnt/card/randomfile umount /mnt/card/
TCM-BF518, CM-BF527, CM-BF533, CM-BF537E, CM-BF537U, TCM-BF537, CM-BF561, eCM-BF561:
modprobe -r mmc_spi modprobe mmc_spi
CM-BF548 only:
modprobe -r bfin_sdh modprobe bfin_sdh
mount /dev/mmcblk0p1 /mnt/card/ md5sum /mnt/card/randomfile
The md5sums are identical.
USB test
Device mode (CM-BF527, CM-BF548)
- CM-BF527 only (uClinux prompt):
modprobe nop-usb-xceiv modprobe usbcore modprobe musb_hdrc modprobe g_ether
- Connect board to PC
- uClinux prompt:
ifconfig usb0 up 192.168.4.2
- PC prompt:
sudo ifconfig usb0 up 192.168.4.1 ping 192.168.4.2
- uClinux prompt:
ping 192.168.4.1
Board and PC must be able to ping each other.
Device mode (CM-BF537U, TCM-BF537, CM-BF561, CM-BF533, TCM-BF518, CM-BF527 with EXT-BF5xx-USB-ETH2 board, CM-BF537E, eCM-BF561)
- CM-BF527 only: You must change the Linux kernel configuration
Device Drivers ---> [*] USB support ---> <*> USB Gadget Support ---> (2) Maximum VBUS Power usage (2-500 mA) USB Peripheral Controller (PLX NET2272) ---> <*> USB Gadget Drivers (Ethernet Gadget (with CDC Ethernet support)) ---> [*] RNDIS support
- Connect board to PC
- TCM-BF518, CM-BF533, CM-BF537E, CM-BF561, eCM-BF561: uClinux prompt
modprobe net2272 modprobe g_ether
- Configure eth device
ifconfig usb0 up 192.168.4.2
- PC prompt:
sudo ifconfig usb0 up 192.168.4.1 ping 192.168.4.2
- uClinux prompt:
ping 192.168.4.1
- TCM-BF518, CM-BF533, CM-BF537E, CM-BF561, eCM-BF561: Unload modules
modprobe -r g_ether modprobe -r net2272
Board and PC must be able to ping each other.
Ethernet test
- TCM-BF537, TCM-BF518, CM-BF527, CM-BF537E: Load kernel module (Linux prompt):
modprobe bfin_mac - or - modprobe smsc911x
- CM-BF537U, eCM-BF561: Load kernel module (Linux prompt):
modprobe smsc911x
- Configure eth interface
ifconfig eth0 up 192.168.1.2
- Get file (Linux prompt):
tftp -r 1MBrandomfile -g 192.168.1.1 md5sum 1MBrandomfile
- PC prompt:
md5sum /tftpboot/1MBrandomfile
- TCM-BF537, TCM-BF518, CM-BF527, CM-BF537E (Linux prompt):
modprobe -r bfin_mac - or - modprobe -r smsc911x
- CM-BF537U, eCM-BF561 (Linux prompt):
modprobe -r smsc911x
The md5sums must match. If available, the test must work for both Ethernet devices.
CAN test
- You need two identical boards and core modules. Connect the CAN connectors with cables/wires (no crossover).
- Linux prompt, both boards:
modprobe bfin-can ip link set can0 type can bitrate 125000 ifconfig can0 up
- Linux prompt, receiver side:
candump can0
- Linux prompt, sender side:
cansend can0 123#AABBCCDD cansend can0 123#R cansend can0 1F334455#1122334455667788 cansend can0 1F334455#R
- On the receiver side, you must see the following messages:
can0 123 [4] AA BB CC DD can0 123 [0] remote request can0 1F334455 [8] 11 22 33 44 55 66 77 88 can0 1F334455 [0] remote request
- Switch roles and do again
AD1836 Audio Test
- TCM-BF518, CM-BF533 only: Change uClinux-dist configuration
Miscellaneous Applications ---> [*] madplay Blackfin app programs ---> [*] ALSA utils
and recompile
- TCM-BF518, CM-BF533, CM-BF537E, CM-BF537U, CM-BF561 only: Load SPI module
modprobe spi_bfin5xx
- Load modules & check mixer
modprobe snd-ad183x modprobe snd-pcm-oss amixer
- Connect headphone to X4 (near C213)
- Connect audio input from PC to X3 (near C211)
- Make a loop
arecord -f cd | aplay &
- Change the volume
amixer sset 'DAC1' 0 amixer sset 'DAC1' 511 amixer sset 'DAC1' 1023
- Kill loop
fg Ctrl+C
- Load mp3 file
tftp -r test.mp3 -g 192.168.1.1
- Play mp3 file
madplay -o wave:- test.mp3 | aplay
TFT test (EXT-BF5xx-CAM)
- Connect display to EXT-BF5xx-CAM board
- Linux prompt
modprobe hitachi-tx09
- You must see the text console on the screen
- Change backlight intensity
echo 10 > /sys/class/backlight/hitachi-bl/brightness echo 100 > /sys/class/backlight/hitachi-bl/brightness
- Backlight intensity must change
TFT test (eDEV-BF5xx)
- Connect Emerging Displays ET0500 display to eDEV board
- Linux prompt: Load module
modprobe bfin-et0500 echo 100 > /sys/class/backlight/bfin-et0500/brightness
- You must see the text console on the screen ("BusyBox...")
- Change backlight intensity
echo 10 > /sys/class/backlight/bfin-et0500/brightness echo 100 > /sys/class/backlight/bfin-et0500/brightness
- Backlight intensity must change
- Test picture: Download Datei:800x480-testpic.raw.tar and copy it onto the Blackfin (see Ethernet test to copy via Ethernet and TFTP)
tar -xf 800x480-testpic.raw.tar dd if=800x480-testpic.raw of=/dev/fb0
- You must see this test image on your display:
Touchscreen test
- Connect display to EXT-BF5xx-CAM or eDEV-BF5xx board
- Boot uClinux
- Load kernel module
modprobe tsc2007
- Start event_test
event_test /dev/input/event0
- Tap and move on the TFT, you must see Input events (look for the X and Y values!)
- Hit Ctrl+C
- Unload kernel module
modprobe -r tsc2007
Board settings
CM-BF527/CM-BF527-64SD
- EVAL-BF5xx/DEV-BF5xxDA-Lite
- S1: 11111111
- S2: 10010100
- S4: 0
- JP1: 1
- JP2: 1
- JP3: 1
- JP6: 0
- EXT-BF5xx-USB-ETH2
- S1: 01111000
TCM-BF518
- EVAL-BF5xx/DEV-BF5xxDA-Lite
- S1: 00000000
- S2: 10001000
- S4: 0
- JP1: 1
- JP2: 1
- JP3: 0
- JP6: 0
- EXT-BF5xx-USB-ETH2
- S1: 10111000
- EXT-BF5xx-AUDIO
- SW100: 0
CM-BF533
- EVAL-BF5xx/DEV-BF5xxDA-Lite
- S1: 00000000
- S2: 00000100
- S4: 0
- JP1: 1
- JP2: 1
- JP3: 0
- JP6: 0
- EXT-BF5xx-USB-ETH2
- S1: 01111000
- EXT-BF5xx-AUDIO
- SW100: 1
CM-BF537E/CM-BF537E-64SD
- EVAL-BF5xx/DEV-BF5xxDA-Lite
- S1: 11111111
- S2: 00001011
- S4: 0
- JP1: 1
- JP2: 1
- JP3: 0
- JP6: 0
- EXT-BF5xx-USB-ETH2
- S1: 01111000
- EXT-BF5xx-AUDIO
- SW100: 0
- EXT-BF5xx-CAM
- JP1: 1
- S1: 10000011
- S2: 0
- S3: 1
CM-BF537U
- EVAL-BF5xx/DEV-BF5xxDA-Lite
- S1: 00000000
- S2: 00011011
- S4: 0
- JP1: 1
- JP2: 1
- JP3: 0
- JP6: 0
- EXT-BF5xx-USB-ETH2
- S1: 01001000
- EXT-BF5xx-AUDIO
- SW100: 1
- EXT-BF5xx-CAM
- JP1: 1
- S1: 10000011
- S2: 0
- S3: 1
TCM-BF537
- EVAL-BF5xx/DEV-BF5xxDA-Lite
- S1: 00000000
- S2: 00001011
- S4: 0
- JP1: 1
- JP2: 1
- JP3: 0
- JP6: 0
- EXT-BF5xx-USB-ETH2
- S1: 01111100
- JP4 and JP5 (solder pads) of EVAL-BF5xx/DEV-BF5xxDA-Lite must be connected
- EXT-BF5xx-AUDIO
- SW100: 0
CM-BF561
- EVAL-BF5xx/DEV-BF5xxDA-Lite
- S1: 00000000
- S2: 00000100
- S4: 0
- JP1: 1
- JP2: 1
- JP3: 0
- JP6: 0
- EXT-BF5xx-USB-ETH2
- S1: 01111000
- EXT-BF5xx-AUDIO
- SW100: 0
- EXT-BF5xx-CAM
- JP1: 1
- S1: 10000011
- S2: 0
- S3: 0
CM-BF548
- DEV-BF548-Lite
- S2: 0110
- S3: 0
- S4: 10001100
- JP1: 0
- JP2: 1
- JP3: 1
- JP4: 0
- EXT-BF5xx-AUDIO
- SW100: 1
eCM-BF561
- eDEV-BF5xx
- S2: 11111111
- S3: 11111111
- S5: 1
- S6: 1000
- JP1: open