Prerequisites
- Set up debug UART.
- Go to UART terminal.
- To enable logging on to UART terminal, do the following:
-
Select Enter in the UART Shell to access
sail_proc@home$. The following sample output shows the logs that confirm the access tosail_proc@home$. -
Run
setlog <Level > <Privilege>on the UART terminal to set the allowed logging based on level and privilege. Parameters:<Level>: info, err, warn, or dbg<Privilege>: el1 or el2
The following sample output shows the logs for loglevel set to LOG_INFO:
-
Select Enter in the UART Shell to access
Procedure
Run the following commands and verify the logs to validate the successful execution of commands:helpgpioi2cel1spigpttmr_testospinor_el1can
help
Runhelp on the UART terminal to know about the list of supported commands and their usage.
For example,
gpio
Run the followinggpio commands on the UART terminal to do the GPIO functional test.
Note
GPIO 11 is used as the reference GPIO number in all examples below. Replace
GPIO 11 is used as the reference GPIO number in all examples below. Replace
<gpio_num> with the actual GPIO number available on your hardware. The canMailboxTask: MD S1 NOT READY!!! messages on core c1 are CAN mailbox background messages and don’t affect GPIO test results.-
gpioRun the generic GPIO test suite that covers all basic test cases (TC_GPIO_000 through TC_GPIO_004). For example,Parameters: None Sample logs: -
gpio input <gpio_num>Configure a GPIO pin as input using the RAW driver interface. Parameter:<gpio_num>: GPIO pin number to configure as input. For example,Sample logs: -
gpio output <gpio_num>Configure a GPIO pin as output using the RAW driver interface. Parameter:<gpio_num>: GPIO pin number to configure as input. For example,Sample logs: -
gpio high <gpio_num>Drive a GPIO pin to logic high using the RAW driver interface. Parameter:<gpio_num>: GPIO pin number to drive high. For example,Sample logs: c0[ 156.699917s]Setting gpio 11 as High with RAW -
gpio low <gpio_num>Drive a GPIO pin to logic low using the RAW driver interface. Parameter:<gpio_num>: GPIO pin number to drive low. For example,Sample logs: c0[ 168.908299s]Setting gpio 11 as Low with RAW -
gpio read <gpio_num>Read and report the current logic state of a GPIO pin. Parameter:<gpio_num>: GPIO pin number to read. For example,Sample logs: -
gpio intr_low <gpio_num>Enable a low-level triggered interrupt on a GPIO pin. Parameter:Note
Thegpio intr_low,gpio intr_high,gpio intr_rising,gpio intr_falling, andgpio intr_dualcommands register summary interrupts for the specified GPIO. Before configuring the same GPIO with a different interrupt trigger type, deregister the existing summary interrupt by runninggpio summary_intr_dereg <gpio_num><gpio_num>: GPIO pin number on which to enable low-level interrupt. For example,Sample logs: c0[ 192.765044s]Enabled Low Level Interrupt on gpio 11 with RAW -
gpio intr_high <gpio_num>Enable a high-level triggered interrupt on a GPIO pin. Parameter:<gpio_num>: GPIO pin number on which to enable high-level interrupt. For example,Sample logs: c0[ 502.252913s]Enabled High Level Interrupt on gpio 11 with RAW -
gpio intr_rising <gpio_num>Enable a rising-edge triggered interrupt on a GPIO pin. Parameter:<gpio_num>: GPIO pin number on which to enable rising-edge interrupt. For example,Sample logs:NoteThe log reports Low Level Interrupt instead of Rising Edge Interrupt. Verify whether this is the expected firmware behaviour or flag it as a log string defect in the driver. -
gpio intr_falling <gpio_num>Enable a falling-edge triggered interrupt on a GPIO pin. Parameter:<gpio_num>: GPIO pin number on which to enable falling-edge interrupt. For example,Sample logs: -
gpio intr_dual <gpio_num>Enable a dual-edge (both rising and falling) triggered interrupt on a GPIO pin. Parameter:<gpio_num>: GPIO pin number on which to enable dual-edge interrupt. For example,Sample logs: -
gpio intr_trigger <gpio_num>Wait and validate an interrupt trigger on a GPIO pin. The command blocks until the interrupt fires and the ISR executes. Parameter:<gpio_num>: GPIO pin number on which to trigger and validate the interrupt. For example,Sample logs: -
gpio direct_intr_dereg <gpio_num>Deregister a previously registered direct interrupt handler on a GPIO pin. Parameter:<gpio_num>: GPIO pin number from which to deregister direct interrupt. For example,Sample logs: c0[ 453.821464s]Direct Interrupt deregister test passed -
gpio summary_intr_reg <gpio_num>Register a summary interrupt handler on a GPIO pin and validate the registration. Parameter:<gpio_num>: GPIO pin number on which to register summary interrupt. For example,Sample logs: -
gpio summary_intr_dereg <gpio_num>Deregister a previously registered summary interrupt handler on a GPIO pin. Parameter:<gpio_num>: GPIO pin number from which to deregister summary interrupt. For example,Sample logs:
i2cel1
Runi2cel1 on the UART terminal to do the I2C functional test.
NoteThe
i2cel1 test command is for i2c0 only. For i2c1, you must update the test application.Note
PMIC is connected to I2C.
i2cel1 command:
NoteTo get all the I2C test result logs, enable the INFO log level by running the following command:
spi
Runspi on the UART terminal to do the SPI functional test.
NoteThe
spi test command is for spi0 only. For multiple SPI channels, you must configure the DTS file.spi command:
Note
TC_SPI_002/TC_SPI_003/TC_SPI_005 are expected to fail due to no device ID and scratch register. These test cases will be removed in a future release.NoteTo enable the SPI loopback, add the following code changes in Spi_PBcfg.c:
NoteDue to a known task-priority issue, the SPI test case may occasionally fail to execute. If the SPI test case doesn’t run, apply the following changes and re-test. This will be fixed in the future release.
gpttmr_test
Rungpttmr_test on the UART terminal to do the GPT functional test.
NoteRunning
gpttmr_test across different RTSS clusters (CPU cores) can expose interrupt-handling issues that may occasionally result in a device crash. However, there is no functional issue with the GPT driver itself.-
gpttmr_test ft <N>N: <0/1/2/3> specifies the core on which the test will run. The user can explicitly select the core using this parameter. If no core is specified, the test will run on Core 0 by default.gpttmr_test ft 3- Runs the functional test on core 3gpttmr_test ft- Runs the test on core 0 (default)
-
gpttmr_test statsThe command prints the tick count delta and represents the difference between the configured target tick count and the actual tick count. It can be used to evaluate the accuracy and performance of the timer functionality. The following sample logs show the statistics for various GPT channels: For example,
ospinor_el1
Runospinor_el1 on the UART terminal to do the SPI functional test. The command executes the positive and async test to evaluate the SPINOR memory read, write, and erase functionality.
Parameters: None
For example,
The following sample logs show the successful validation of the
ospinor_el1 command:
CAN – RTSS test commands
Run the followingcan commands on the UART terminal to do the CAN functional test:
can initcan TXcan RX
-
can initSyntax:Sample logs forcan -t 0 -config 1:can TX - standard IDSyntax:Parameters:x= CAN controller ID: 0 to 7 Sample logs forcan -t 3 -c 1The CAN TX data shows up on the PCAN-View application.
can TX - FD IDSyntax:Parameters:x= CAN controller ID: 0 to 7 Sample logs forcan -t 5 -c 1The CAN TX FD data shows up on the PCAN-View application

CAN RX
To run the CAN RX command, do the following:
a. Select Transmit > New Message ….


- ID: Enter the CAN ID (For example, 123).
- Length: Set the number of data bytes (8, 12, 32, 64).
- Data: Enter the data bytes (For example, 11 22 33 44 55 66 77 88).
- cycle time : 1000 ms
- under Message Type, ensure to select the CAN FD checkbox if it’s a CAN FD frame.

NoteTo stop sending the message, unselect the cycle time.

CAN – HLOS mailbox test commands
The following are the HLOS mailbox CAN test commands:Enable sail_can user-space application
Run the command to start the sail_can application to use this feature:NoteFor high performance requirements, —debug must be skipped. Use —debug to print the log messages on the console.
View CAN ports
Run the command to see all the CAN ports from APSS:vcan0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00inet addr:169.254.185.103 Mask:255.255.0.0vcan1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00inet addr:169.254.185.103 Mask:255.255.0.0vcan8 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00inet addr:169.254.185.103 Mask:255.255.0.0vcan9 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00inet addr:169.254.185.103 Mask:255.255.0.0wlan0 Link encap:Ethernet HWaddr F6:4F:02:32:74:EA
NoteEdit the active_controller value at /etc/sail_can/sail_can.conf to reflect the actual number of controllers on the device.Start sail_can only after editing and saving the conf file.
Bootup CAN port status
Run the command to update the CAN port status at bootup:NoteEnsure this test sail_can is running in the background.
Set CAN port baud
Run the command to configure the CAN node with bit rate per the CAN bus:Send data
Run the command to send data on CAN bus and receive using a PCAN analyzer on another end:Receive data
Run the command to receive data from CANutils (candump) on the can port. Data is sent from PCAN or other external device.Error CAN
Send error frame on CAN bus using PCAN analyzer. Use external analysers, such as PCAN, to send error frames.Send multiple data
To verify CAN communication using one of the following setups:- Send data over multiple CAN buses and receive it using a PCAN analyzer.
- Connect two devices through multiple CAN ports and receive data on the corresponding ports.
- Connect multiple CAN ports on the same device to a single CAN bus and transmit/receive data across different CAN ports.
Set baud to multiple CAN port
Run the command to configure the CAN node with bit rate per the CAN bus for more than one CAN port.Receive multiple data
Run the command to receive data using SOCKETCAN APIs on more than one CAN port:Mailbox test applications
Prerequisites
Before running mailbox test applications:- Update SELinux configuration:
- Change
SELINUX=enforcingtoSELINUX=permissivein the/etc/selinux/configfile. - Verify the updated configuration:
Sample output:
- Change
- Reboot the device by running the following command either in the ADB shell or in the UART shell:
Check mailbox driver status
-
Run the following command to verify that the mailbox driver is initialized:
Sample output:
-
Verify device node:
Sample output: /dev/sailMB
sail_console_chan_app
-
Run the following command in the APSS UART shell:
Sample output:
NoteThe
sail_console_chan_app test application emulates (acts like) the RTSS UART console shell.saildbg
I²C testing- Run the following command in APSS UART shell:
- Sample logs:
- APSS side:
- RTSS side:
- APSS side:
- Run the following command in APSS UART shell:
- Sample logs:
- APSS side:
- RTSS side:
NoteThe failure of TC_I2C_09 is expected, as it is intended to validate negative test scenarios.
mailbox
Themailbox command executes the functional testcases to evaluate the external mailbox performance. Reboot the system after the test is completed.
NoteRun the
mailbox command in the RTSS UART console.sailmb_demo
Run the application from the APSS UART shell:
Example scenarios:
-
Send multiple messages to a core.
The following command sends the default message 10 times to Core 1:
Sample output:
- APSS side:
- RTSS side:
- APSS side:
-
Send a custom message.
The following command sends Ping from Linux 10 times to Core 2:
Sample output:
- APSS side:
- RTSS side:
- APSS side:
-
Specify the core in hexadecimal format.
The following command sends Testing Core 3 five times to Core 3:
Sample output:
- APSS side:
- RTSS side:
- APSS side:
Ethernet test commands
View the interface configuration
When the device is connected to a public network, the Dynamic Host Configuration Protocol (DHCP) automatically assigns an IP address to the RTSS Ethernet interface. Run the following command to view the assigned IP address, subnet mask, gateway, MAC address, and Ethernet link status:[NW] ipv4 192.168.200.20 up=1 dhcp=1
[NW] mask 255.255.255.0
[NW] gw 192.168.200.10
[NW] mac e8:e0:b7:b5:7d:e1
[NW] ipv6 fe80::eae0:b7ff:feb5:7de1 up=1
Set static IPv4 configuration
Run the following command to apply a static IPv4 configuration to the Ethernet device:<ip>: Static IPv4 address to assign to the RTSS Ethernet interface.<mask>: Subnet mask for the assigned IPv4 address.<gw>: Default gateway IP address used to reach devices outside the local subnet.
View network statistics
Use the following command to display network buffer and heap counters:- net buffers: min—if this reaches 0, packet drops may occur.
- heap: min_ever—if this approaches 0, memory pressure exists.
Run a ping test
Run the following command to send ICMP echo requests to a remote host and confirm data connectivity:<ip>: Link partner IP address <N>: Number of probes. The default value is 4, and the maximum supported value is 32.
Example:
Testing network protocols
The following figure shows the high-level client/server connection used to validate Ethernet communication between the IQ-9075 target and a connected host. RTSS on the target uses the FreeRTOS TCP/UDP network stack and Ethernet interface to exchange data with the host over a standard Ethernet link. This setup supports TCP client/server testing and UDP packet transmission to verify network connectivity or protocol functionality.
<ip>: IP address of the remote TCP server.<port>: Port number on the remote TCP server.<data>: Data payload to send over the active TCP connection.
<ip>: IPv4 address of the remote host.<port>: Port number on the remote host.[size]: packet payload size, in bytes.
Watchdog test commands
By default, Watchdog is enabled after device bootup. Watchdog enable and disable commands provide feasibility for debugging the software faults. To run the RTSS watchdog commands, do the Prerequisites.Disable all watchdogs
Thewdg disable command disables all four cores simultaneously to stop watchdog petting across the system.
For example,
Note
c0[ 197.375253s] [ WDT ] WDT disabled for core 0
c0[ 197.375291s][WDT] : Core_0 wdt disable performed
c0[ 197.375765s][WDT test] disable command send
c0[ 266.639045s][WDT] Watchdog enabled on core 0 cluster-: 0
c0[ 266.639184s] [ WDT ] Petting started for core 0
c0[ 266.639592s][WDT] Petting Queuesend success with time-: 55000 core-:0
c0[ 266.639641s][WDT] : Core_0 wdt enable performed
- If all active cores (Core 0, Core 1, Core 2, and Core 3) remain idle for more than 30 seconds, they enter the Sleep state. In the Sleep state, the
wdg disablecommand can’t disable the watchdog on Core 1, Core 2, and Core 3. Additionally, commands executed while the cores are in the Sleep state don’t take effect on Core 1, Core 2, and Core 3.
c0[ 197.375253s] [ WDT ] WDT disabled for core 0
c0[ 197.375291s][WDT] : Core_0 wdt disable performed
c0[ 197.375765s][WDT test] disable command send
- When user selects Enter on RTSS console, then core 0 will exit the Sleep state and watchdog is enabled as UART interrupts are registered on core 0. External interrupts are required for cores 1, core2, core3 to exit Sleep mode.
c0[ 266.639045s][WDT] Watchdog enabled on core 0 cluster-: 0
c0[ 266.639184s] [ WDT ] Petting started for core 0
c0[ 266.639592s][WDT] Petting Queuesend success with time-: 55000 core-:0
c0[ 266.639641s][WDT] : Core_0 wdt enable performed
Enable watchdog
Thewdg core<N> enable command enables the watchdog for the specified core. The watchdog starts counting and expects periodic petting.
N is core number.
Note
For a split-split cluster configuration, the number of cores is 4. For a split-lock configuration, the number of cores is 3.
For example,
Disable watchdog
Thewdg core<N> disable commands disables the watchdog for the specified core. The counter stops and no reset will be triggered.
N is core number.
For example,
Trigger watchdog bite
Thewdg core<N> triggerbite <time_ms> command forces an immediate watchdog bite on the specified core after the given timeout in milliseconds. This is used to test the bite-triggered reset and recovery sequences.
N: Core numbertime_ms: Timeout value in milliseconds
c0[ 1930.863200s] BITE trigger recived on core 0
NoteAfter exection of this command, the device enters the Crash state.
Verify window maximum violation
Thewdg core<N> winmax command tests the window maximum violation behavior, such as the watchdog is deliberately not petted until after WIN_MAX, verifying that a bark interrupt is correctly generated.
Verify window minimum violation
Thewdg core<N> winmin command tests the window minimum violation behavior, such as the watchdog is petted before WIN_MIN, verifying that a window error interrupt is correctly generated.

