This document outlines the various functions available for testing the basic functionalities and peripherals of the board, organized by category.
NOTE: Physical values or addresses may vary.
To fully utilize the application, ensure you have the following:
- Network cable (RJ45 standard)
- CAN cable
- RS485 USB adapter
- Personal Computer
Ensure the switches for the CAN Bus and RS485 are enabled.
- Connect a USB cable from the PC host to the OpenSDA (or USB to Serial) USB port on the target board.
- Open a serial terminal with the board's specified settings.
- Connect an Ethernet cable to the target board's RJ45 port (X5) and your PC network adapter.
- Attach the RS485 USB adapter to the RS485 port, ensuring correct connection of Tx and Rx lines.
- Attach the CAN cable to both CAN ports.
- Download the program to the target board.
Use the following settings to configure Tera Term or a similar program for RS485 communication:
Setting | Value |
---|---|
Baud Rate | 115200 bps |
Data Bits | 8 bits |
Parity | None |
Stop Bits | 1 |
Flow Control | None |
New Line Char | CR+LF |
Local Echo | Enabled (Recommended) |
Commands are categorized by functionality. Each entry includes a description of the command, its usage, and the expected output.
- Description: Displays all available commands.
- Usage:
help
- Expected Output: List of commands.
-
Description: Blinks an LED a specified number of times.
-
Usage:
ledblink [1|2]
-
Expected Output:
GPIO LED Blink Test Started... LED will Blink for 4 seconds... GPIO LED Blink Test Passed!! All tests have passed!! Command executed successfully.
-
Description: Measures temperature using the I2C temperature sensor.
-
Usage:
i2ctemp
-
Expected Output:
[I2C] Temperature sensor found at device address 0x4a [I2C] 41.375000 (Celsius) All tests have passed!! Temperature sensor: 41.38 deg C.
-
Description: Scans the I2C bus for devices.
-
Usage:
i2cbusscan
-
Expected Output:
0 1 2 3 4 5 6 7 8 9 A B C D E F 03 -- -- -- -- -- -- -- -- -- -- -- -- -- 10 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40 -- -- -- -- -- -- -- 48 -- 4A -- -- -- -- -- -- 50 50 51 -- -- 54 -- -- -- -- -- -- -- 5C -- -- -- 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70 -- -- -- -- -- -- -- --
-
Description: Accesses the Real-Time Clock over I2C.
-
Usage:
i2crtc [r|w] [t|d] [val1] [val2] [val3]
r
for read,w
for writet
to set time,d
to set dateval1
,val2
,val3
for hour/minute/second or day/month/year
-
Expected Output:
[I2C] Read RTC data. Date: 28.03.24 Time: 16:31:20
[I2C] Write RTC data. RTC successfully set
-
Description: Executes an eMMC raw I/O test.
-
Usage:
emmc [eMMC]
-
Expected Output:
[MMCSD RAW IO] Starting... All tests have passed!! eMMC all tests have passed
-
Description: Conducts a NOR flash test involving data writing and reading.
-
Usage:
qspiflash
-
Expected Output:
All tests have passed!! [QSPI FLASH] All tests have passed.
-
Description: Enables reading from or writing to the EEPROM.
-
Usage:
eeprom [instance] [offset] [access] [data]
instance
: 0 for TQ_EEPROM_ADD, 1 for CUST_EEPROM_ADDoffset
: Memory address offset in hexaccess
: 'w' for write, 'r' for readdata
: Data to write in hex
-
Expected Output:
[I2C] Read EEPROM instance: 0. [EEPROM] Read data 0xFF. EEPROM data 0xFF
[EEPROM] Write data 0x05. EEPROM write 0x05
- Description: Manages factory data in EEPROM.
- Usage:
factoryData [set|read] [vard|mac|sn|variant] [value]
set
:vard
32-byte binary (the programm will ask for the .bin file)mac
xx:xx:xx:xx:xx:xx (values consists of 6 bytes separated by ':')sn
(Serial Number) xxxxxxxx (value must consist of 8 chars)variant
(value must be string of maximal 64 chars)
read
: returns the content of the storage in which the factory data is stored. The value consists of 128 bytes.- Expected Output:
factoryData read
00 : FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
10 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
20 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
30 : 31 32 33 34 35 36 37 38 00 00 00 00 00 00 00 00 | 12345678........
40 : 54 51 4D 61 32 34 33 34 4C 5F 50 31 2E 30 32 30 | TQMa2434L_P1.020
50 : 30 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 0 ..............
60 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
70 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
MAC: 00:00:00:00:00:00
Serial Number: 1234567
Variant: TQMa2434L_P1.0200
Operation successful.
factoryData set variant TQMa2424L_P1.200
Operation successful.
-
Description: Sends or receives CAN messages.
-
Usage:
mcan [channel] [mode]
channel
: 0 for CAN 0, 1 for CAN 1mode
: 0 to send messages, 1 to receive
-
Expected Output:
mcan 0 0 [MCAN] TX Application, Interrupt mode started... [MCAN] TX test passed!! send: 0 1 2 3 4 5 6 7 mcan 1 1 [MCAN] RX Application, Interrupt mode started... All tests have passed!! received: 0 1 2 3 4 5 6 7
-
Description: Manages data transmission via RS485.
-
Usage:
rs485
-
Expected Output:
rs485 [UART] Echo example started... All tests have passed!! [rs485] Echo success
- Description: Accesses the LPDDR4 for read or write operations.
- Usage:
lpddr4 [access] [offset] [value]
access
: 'w' for write, 'r' for readoffset
: Address offset in hexvalue
: Data value for write operations
-
Description: Manages GPIO for reading inputs or setting outputs.
-
Usage:
gpio [access] [output num] [state]
access
: 'r' for read, 'w' for writeoutput num
: Specifies which of the 1-4 digital outputs to manipulatestate
: 0 for low, 1 for high
-
Expected Output:
User Button = 1 GPIO_IN_1 = 0 GPIO_IN_2 = 0 GPIO_IN_3 = 0 GPIO_IN_4 = 0 GPIO_OUT_1 = 0 GPIO_OUT_2 = 0 GPIO_OUT_3 = 0 GPIO_OUT_4 = 0
[GPIO] Set output successfully. [GPIO] dig out pinStatus 1 state: 1
-
Description: Conducts ADC tests to read voltage levels.
-
Usage:
adc
-
Expected Output:
ADC Single Shot Test Started... Number of Samples in FIFO : 8 Step ID Voltage Level ------- ------------- 1 1050 mV 2 903 mV 3 0 mV 4 1250 mV 5 1101 mV 6 1269 mV 7 1086 mV 8 973 mV ADC Single Shot Test Completed!! All tests have passed!!
-
Description: Accesses the Analog Front End (AFE) for various functions.
-
Usage:
afe [access] [channel] [value]
access
: Options includeadc
,temp
for temperature,gpio
for GPIO state,set
for setting GPIO statechannel
: 0-11 for ADC, 0-9 for GPIO
-
Expected Output:
afe temp r Temperature 38.0°C
afe set 1 1 OK
afe gpio 1 GPIO 0
afe adc 2 Voltage 0.2V
- Description: Manages Ethernet settings and operations.
- Usage:
eth [command] [option] [value]
command
: Choose fromconfig
,ping
, orreadAddrs
.option
: Depending on the command, selectip
,gw
(gateway), ornm
(netmask).value
: The value to set or address to ping.
For a simple test of the ethernet ping the ip address of your board via your host PC.
-
config: Configures network settings.
-
Options:
ip
: Set the IP address.gw
: Set the gateway address.nm
: Set the netmask.
-
Usage:
eth config [ip|gw|nm] [value]
-
Example:
eth config ip 10.250.250.100
-
Expected Output:
eth config ip 10.250.250.100 [0]status_callback==DOWN [0]status_callback==UP, local interface IP is 10.250.250.100 Success!
-
-
readAddrs: Reads the current network configurations.
-
Usage:
eth readAddrs
-
Expected Output:
eth readAddrs IP: 10.250.250.100 GateWay: 10.250.250.10 Netmask: 255.255.255.0
-