AM335x evaluation board quick test (2)

CAN bus test

The evaluation board leads to a CAN interface. Use the USB to CAN module to connect the evaluation board hardware CAN0 interface and the PC USB interface, as shown in the figure below. Install the CAN interface debugging tool ECAN Tools according to the debugging tool installation document.

 

Figure 28

 

Enter the evaluation board file system, execute the following commands to configure the CAN0 bus bit rate to 1MHz, and start the CAN bus.

Target# canconfig can0 bitrate 1000000

Target# canconfig can0 start

 

Figure 29

 

Execute the following commands to receive the data sent by the PC.

Target # candump can0

 

Figure 30

 

Open the ECANTools software on the PC, select the device type, and then click "Open Device".

 

Figure 31

 

After the software detects the device, click "OK" to enter the sending interface, as shown in the figure below.

 

Figure 32

 

In the following data sending interface, click "Send" to start sending data.

 

Figure 33

 

Send two sets of data to the receiving end in turn, and you can see the data in ECAN Tools and the serial debugging terminal, as shown in the figure below.

 

Figure 34

 

Figure 35

 

FRAM read and write test

In this section, read and write tests on the evaluation board FRAM.

Execute the following command to write string data to FRAM.

Target# echo "www.tronlong.com" > /sys/devices/platform/ocp/44e0b000.i2c/i2c-0/0-0050/eeprom

Execute the following command to read the data written to FRAM.

Target# head -c 16 /sys/devices/platform/ocp/44e0b000.i2c/i2c-0/0-0050/eeprom

 

Figure 36

 

D DR read and write test

When the Linux system starts, the DDR initialization is completed in the U-Boot stage, and the actual DDR capacity is printed, as shown in the following figure.

 

Figure 37

 

The DDR read and write speed is affected by actual conditions. The test rate is subject to specific conditions. The following test data is for reference only.

  • DDR read speed test

Enter the evaluation board system and execute the following command to test the DDR read speed.

Target# bw_mem 50M rd

 

Figure 38

 

The test reads 50MB yte data from D DR , it can be seen that the read speed of this test is about: 262.26MB/s.

  • DDR write speed test

Enter the evaluation board system and execute the following command to test the DDR write speed.

Target# bw_mem 50M wr

 

Figure 39

 

Test writing into 50MB YTE data to the DDR in , this test can be seen that the write speed is about: 1365.52MB / s.

  • DDR copy speed test

Enter the evaluation board system and execute the following command to test the DDR copy speed.

Target# bw_mem 50M cp

 

Figure 40

 

Test copy 50MB YTE data to the DDR in , this test can be seen copy speed is about: 185.06MB / s.

SD card read and write test

 

In this section, use the Linux system boot card provided with the evaluation board to test the read and write speed of the SD card. Different SD cards and test files of different sizes will cause certain differences in the test results of the SD card. After the evaluation board is started, the BOOT partition of the boot card of the Linux system will be mounted under the file system "/run/media/mmcblk0p1" directory.

Target# ls /run/media/mmcblk0p1

 

Figure 41

 

  • SD card write speed test

Enter the evaluation board system and execute the following command to test the SD write speed.

Target# time dd if=/dev/zero of=/home/root/test bs=1024K count=200

The time command has a timing function. dd is used to copy, read from the if (input file) file, and write to the file specified by of (output file). bs is the size of each write block, and count is the number of read and write blocks.

"If=/dev/zero" does not generate IO, that is, continuously output data, which can be used to test pure writing speed.

 

Figure 42

 

Here, a total of 200MByte test data is written to the test file of the SD card. You can see that the write speed of the SD card in this test is about: 200MB/22.57s=8.86MB/s.

  • SD card reading speed test

After measuring the writing speed, restart the evaluation board and execute the following command to test the SD card reading speed.

Target# time dd if=/home/root/test of=/dev/null bs=1024K

"Of=/dev/null" does not generate IO, that is, continuously receives data, which can be used to test pure reading speed.

 

Figure 43

 

Here, a total of 200MByte of data is read from the test file. It can be seen that the reading speed of the SD card in this test is about: 200MB/9.78s=20.45MB/s.

eMMC read and write test

The eMMC device must be partitioned before it can be read and written. When the evaluation board leaves the factory, the eMMC device partitioning is completed by default. You can execute the following commands to view the eMMC capacity and partition information.

Target# dmesg | grep mmcblk1

 

Figure 44

 

The file system mount path of the boot partition on the evaluation board is "/run/media/mmcblk1p1", and the rootfs partition mount path on the evaluation board file system is "/run/media/mmcblk1p2". Run the following command to view the mounting status.

Target# df

 

Figure 45

 

  • eMMC write speed test

Enter the evaluation board system and execute the following command to test the write speed of the eMMC device.

Target# time dd if=/dev/zero of=/run/media/mmcblk1p2/test bs=1024K count=200 conv=fsync

 

Figure 46

 

Here, a total of 200MB of yte test data is written to the test file under the rootfs partition of the eMMC device . You can see that the write speed of the eMMC device in this test is about: 200MB/21.91s=9.13MB/s.

  • eMMC reading speed test

Restart the evaluation board, enter the evaluation board system, and execute the following command to test the read speed of the eMMC device.

Target# time dd if=/run/media/mmcblk1p2/test of=/dev/null bs=1024K

 

 

Here, a total of 200MB yte data is read from the test file. It can be seen that the reading speed of the eMMC device in this test is about: 200MB/9.51s=21.03MB/s.

SPI FLASH read and write test

In this section, read and write speed test of MTD4 partition of SPI FLASH. MTD4 is the core backup partition of SPI FLASH. The partition size is 6.6Mbyte. The content of the partition will be erased by reading and writing tests. Please make a data backup.

Execute the following command to query the SPI FLASH partition, confirm the MTD4 partition size (do not exceed the partition size for reading and writing), and erase the contents of the partition.

Target# cat /proc/mtd

Target# flash_erase /dev/mtd4 0 0

 

Figure 47

 

  • SPI FLASH write speed test

Enter the evaluation board system and execute the following commands to test the write speed of SPI FLASH.

Target# time dd if=/dev/zero of=/dev/mtd4 bs=512k count=2

 

Figure 48

 

Test write 1MByte data to the MTD4 partition of SPI FLASH, you can see that the SPI  FLASH write speed of this test is about: 1MB/2.27s=0.44MB/s.

  • SPI FLASH read speed test

Restart the evaluation board, enter the evaluation board system, execute the following commands to test the read speed of SPI FLASH.

Target# time dd if=/dev/mtd4 of=/dev/null bs=512k count=2

 

Figure 49

 

The test reads 1MByte data from the MTD4 partition of SPI FLASH, and it can be seen that the SPI  FLASH read speed of this test is about: 1MB/0.56s=1.79MB/s.

Temperature sensor test

The core board is equipped with a temperature sensor, using the I2C0 bus, and the address is 0x49. Enter the evaluation board file system and enter the following command to view the sensor temperature value.

Target# cat /sys/devices/platform/ocp/44e0b000.i2c/i2c-0/0-0049/hwmon/hwmon1/temp1_input

 

Figure 50

 

The temperature value is (test value/1000) and the unit is degrees Celsius. The temperature value of this test is: 36812/1000=36.812 degrees Celsius.

Debug serial port switch test

 

  • Switch the debug serial port to RS232 serial port UART3

Use the RS232 cross serial bus and USB to RS232 male serial cable to connect the RS232 serial port of the evaluation board to the USB interface of the PC, as shown in the figure below.

 

Figure 51

 

Open the device manager and confirm the COM port number of the RS232 serial port, as shown in the figure below.

 

Figure 52

 

Open the serial port debugging terminal, select the correct COM port, the baud rate is 115200, 8N1, no check bit, and establish a serial connection, as shown in the figure below.

 

Figure 53

 

Enter the evaluation board file system, execute the following command to switch the debug serial port to RS232 serial port.

Target# setsid getty 115200 ttyS0

 

Figure 54

 

After the command is executed, the login information similar to the following will be printed in the newly created RS232 serial port dialog box. Please enter the user name root and press Enter to log in, as shown in the figure below.

 

Figure 55

 

  • Switch the debug serial port to RS485 serial port UART1

Use the RS232 to RS485 module and USB to RS232 male serial cable to connect the RS485 serial port of the evaluation board to the USB interface of the PC, as shown in the figure below.

 

Figure 56

 

The connection method between the RS232 to RS485 module and the RS485 serial port on the evaluation board is as follows:

  1. RS232 to RS485 module 485+ terminal, connected to the RS485 serial port A terminal of the evaluation board.
  2. RS232 to RS485 module 485-terminal, connected to the RS485 serial port B terminal of the evaluation board.
  3. RS232 to RS485 module GND terminal, connect the evaluation board RS485 serial GND terminal.

Open the device manager and confirm the COM port number of the RS485 serial port, as shown in the figure below.

 

Figure 57

 

Open the serial port debugging terminal, select the correct COM port, the baud rate is 115200, 8N1, no check bit, and establish a serial connection, as shown in the figure below.

 

Figure 58

 

If you need to use two debug serial ports at the same time, enter the evaluation board system and execute the following command to create a new user (such as Tronlong), and the user password is customized. If you do not need to use two debugging serial ports at the same time, you do not need to create a new user.

Target# adduser Tronlong

 

Figure 59

 

Execute the following command to switch the debug serial port to RS485 serial port.

Target# setsid getty 115200 ttyS1

 

Figure 60

 

After executing the command, login information similar to the following will be printed in the newly created RS485 serial port dialog box. Please enter the user name root and press Enter to log in, or enter the user name Tronlong and then enter the custom password to log in, as shown in the figure below.

 

Figure 61

Guess you like

Origin blog.csdn.net/Tronlong/article/details/108663794