SoC to Microcontroller Communications
Common Interface for SoC to MCU Communication
MCU manages power-on, power-off, recovery, and reset sequence of SoC on the DRIVE AGX board. It supports reflashing of its firmware and configuration, as well as GPIO-based boot chain selection of SoC firmware.
User applications on SoC, such as Drive Update, communicate with MCU to use these features of MCU. This communication is established through Common Interface, which exposes a set of interfaces on SoC and connects to MCU using UDP over Ethernet.
Common Interface provides the following features:
- Read InfoROM dump.
- Get current version information of MCU firmware.
- Validate MCU firmware to be flashed for compatibility.
- Flash program Update and Production MCU firmware.
- Set GPIO based Boot chain configuration.
- Read current configuration of GPIO-based boot chain configuration.
- SoC reboot and MCU reboot.
- Choose or get network configuration on MCU.
- Test behavior of MCU boot chain APIs.
- Test behavior of SoC reboot and MCU reboot.
- Set or reset the mission mode status for MCU.
The diagram below provides positioning of Common Interface modules in the system:
Library Usage and Configuration
User applications intending to use these functionalities shall link to Common Interface Library (libmcu_common_if.so).
Availability of these features depends on the build configuration. All features are available on the standard build. Boot Chain APIs are available in safety builds only.
The Common Interface communication with MCU is only supported over a VLAN ethernet interface; the VLAN interface is established at initialization.
Refer to the Configuration for Common Interface section for detailed information on the configuration parameters and VLAN interface creation.
Common Interface Sample Application Usage
The common_if_testapp
is a command-line interface to verify supported
features. Running the common_if_testapp -h
command lists supported commands
with brief description.
Examples of command with short description:
Resets MCU. Resets the complete DRIVE AGX board.
#common_if_testapp -mcureset
Reset Tegra x1.
#common_if_testapp -tegrareset x1
Set default boot chain of Tegra x1 to A.
#common_if_testapp -set_default_bootchain x1 A
Set the boot chain temporarily for next reboot.
#common_if_testapp -set_next_bootchain x1 B
Get the default boot chain for Tegra of x1.
#common_if_testapp -get_default_bootchain x1
Get active/current boot chain for Tegra x1.
#common_if_testapp -get_active_bootchain x1
Flash given production firmware.
#common_if_testapp -flash_mcu_fw lib/firmware/DRIVE-V6.0.0-P3663-AFW-Aurix-StepB-5.01.00.hex
Flash given update firmware.
#common_if_testapp -flash_mcu_ufw lib/firmware/DRIVE-V6.x.x-P3663-NV-Aurix-UPDATE-StepB-1.46.04.hex
Read currently running firmware version.
#common_if_testapp -get_fw_version
Read update firmware version flashed on MCU.
#common_if_testapp -get_update_fw_version
Read the version of the hex file from its content.
#common_if_testapp -get_mcu_hexfile_version lib/firmware/DRIVE-V5.2.x-E3550-NV-Aurix-UPDATE-StepA-1.29.16.hex
Read data from infoROM dump.
#common_if_testapp -get_inforom_dump
Reboot MCU in Production FW mode.
#common_if_testapp -reboot_mcu_afw
Reboot MCU in Update-FW mode.
#common_if_testapp -reboot_mcu_ufw
Choose network Configuration on MCU.
#common_if_testapp -nw_cfg base
Get NW Configuration on MCU. Print the current status of MCU network configuration.
#common_if_testapp -nw_cfg getStatus
The additional commands listed with the -h(help)
option are dummy and
meant for debugging purposes only.
Executing SC7 Entry and Exiting from Console
- On Orin console, run the
common_if_testapp -enter_sc7
command so that MCU starts the timer to wait for Orin to go in SC7. This is done by monitoring the GPIO -SOC_PWR_REQ. - On Orin console, run the command to trigger SC7 entry:
- For
Linux
echo 1 > /sys/class/tegra_hv_pm_ctl/tegra_hv_pm_ctl/device/trigger_sys_suspend
- For
QNX
echo 1 > /dev/nvsyseventclient/trigger_sys_suspend
- For
Linux
-
As soon as Orin enters SC7, pin SOC_PWR_REQ will be set to STD_HIGH, and MCU will execute SC7 entry sequence.
- In version 6.0.3.0, full VRS sequence is not implemented. VM_EN1 will be pulled low.
-
If Orin does not enter SC7 before the timeout of 20 seconds, MCU will go into error state. To recover from it, run either the
poweron
oraurixreset
command. - To exit, run the command
exitsc7
on the MCU console.- In version 6.0.3.0, AURIX_SOC_WAKE is toggled.
Running Safe-Shutdown from Console
For an orderly shutdown of NVIDIA Orin, when a shutdown request is triggered, MCU Software waits for an indication of safe-shutdown completion from Orin SoC through the GPIO pin (AURIX_HS_1). If the indication is not received before a configured timeout (20 seconds), MCU software continues to power off and report errors to the user application.
To initiate safe shutdown:
- On the Orin console, run the
common_if_testapp -tegrareset
command to perform a tegrareset or thecommon_if_testapp -mcureset
command to perform an Aurix reset. -
On the Orin console, run the following command to trigger shutdown of TCF:
- For
Linux
echo 1 > /sys/class/tegra_hv_pm_ctl/tegra_hv_pm_ctl/device/trigger_sys_shutdown
- For
QNX
echo 1 > /dev/nvsyseventclient/trigger_sys_shutdown
- For
Linux
- After the request is successfully received by NvMCU_BootChainCfg on Aurix, acknowledgment will be sent. This request will be forwarded to the user application for further arbitration and if preconditions are met, NvMCU_OrinPwrCtrl will start the monitoring of Handshake GPIO.
- As soon as the Handshake GPIO is set, NvMCU_OrinPwrCtrl will switch off the Orin CVM power rails and proceed with the hardware recommended shutdown sequence.
- If the Handshake GPIO is not set within 20 seconds, NvMCU_OrinPwrCtrl will report an error to the user application and proceed with the same shutdown sequence.