|
CAN-Ethernet Gateway demo
|
Gateway is one of the major use cases in modern cars. Performance requirements for gateway applications are ever increasing due to the advanced connected car architecture having multiple domain controllers. The CAN-Ethernet gateway demo showcases P2P (Protocol to Protocol) translation i.e. translating data and control information between incompatible networks like Ethernet and CAN for communication on the J7200 device through the IEEE-1722 protocol.
The demo application enables full duplex routing between: CAN-to-Ethernet, Ethernet-to-CAN, CAN-to-CAN, and Ethernet-to-Ethernet. The demo uses MCAL drivers running on one Main R5F core, along with a Ethernet remote switch server running on the other Main R5F.
Root access is required because the demo uses raw sockets, and raw sockets are only accessible with root privileges.
recv_1722.out and send_1722.out utilities on host PC. These utilities are available at <SDK_INSTALL_PATH>/gateway-demos/pctools
run_demo.py to run automation tools. There is a separate section on using the test automation framework below.The following block diagram shows the various functional blocks and the data flow used in the gateway demo application for J7200. As shown in the diagram, PC Ethernet applications are used for transmitting and receiving Ethernet frames between PC and the J7200 EVM. Similarly, any compatible CAN tool can be used for CAN message reception and transmission.
The routing is done based on a queue-based architecture, where the gateway task periodically polls the CAN and Ethernet queues, which are, in turn, populated by the respective drivers in the interrupt context. This architecture allows full packet inspection of packet and allows matching two asynchronous interfaces like Ethernet and CAN.
The CAN/Ethernet demo application is supported only on the Main_Cortex_R5_0_1 core of the Jacinto device along with the accompanying remote switch driver, which runs on the Main_Cortex_R5_0_0 core.
The CAN_ETH Gateway demo is located in the Processor SDK RTOS release under the following directory path
<SDK_INSTALL_PATH>/gateway-demos
This contains two folders :
Users must run either the can_traffic_generator app or the default sciclient test application for regular demo. For Out of Box configuration, users must run the can_traffic_generator application.
User must issue make command from <SDK_INSTALL_PATH>/gateway-demos location. Detailed description of other directories is given below:
RTOS components:
Processor SDK RTOS drivers:
Note : Windows build is at least 10-15x slower than Linux and since Gateway-Demo uses PDK, EthFW and MCUSW modules, the cumulative build time is huge.
Note : Running the automated CAN-Ethernet Gateway-Demo script is currently only supported on Linux given limitations with PCAN-USB driver and difficulties in automation of Layer2 Ethernet send/receive.
Given these two limitations, it has been decided to support Gateway-Demo build only on Linux. If you are a Windows user, please use a Virtual Machine running Linux to build Gateway-Demo.
can_eth_gateway_app and can_traffic_generator_app) are built using makefile. The low latency demo is also built using the can_traffic_generator_app command but with an additional macro LOW_LATENCY_DEMORefer to PDK rules.mk for setting tools paths. Run following commands after this has been done.
make help
cd <SDK_INSTALL_PATH>/gateway-demos make allclean
can_eth_gateway_app with all dependencies for J7200: cd <SDK_INSTALL_PATH>/gateway-demos make -s can_eth_gateway_app BOARD=j7200_evm
Note : can_traffic_generator_app has not been enabled on FreeRTOS.
can_traffic_generator_app with all dependencies for J7200: cd <SDK_INSTALL_PATH>/gateway-demos make -s can_traffic_generator_app BOARD=j7200_evm CORE=mcu1_0
can_traffic_generator/makefile to enable the macro LOW_LATENCY_DEMO and repeat the step above.If you are building the applications for the first time or after a clean build then all PDK dependencies are built first. For can_eth_gateway_app MCU2_1 dependencies get built and for can_traffic_generator_app MCU1_0 dependencies.
can_eth_gateway_app use the command (for J7200) make -s depend_can_eth_gateway BOARD=j7200_evm
can_traffic_generator_app use the command make -s depend_can_generator BOARD=j7200_evm
The PC tools for Ethernet reception, transmission and Test Automation are located under pctools directory. These tools can be built only for Linux:
cd <SDK_INSTALL_PATH>/gateway-demos/pctools make all
The python scripts can be used without any changes. Usage is described below under "Test Automation Framework"
The regular demo can be run either using the Automated Test Framework or manually. The Automated Test Framework has the limitation that it can only be used with the PCAN-USB tool from PEAK-System Technik GmbH.
If using a CAN tool from another manufacturer, please refer to the section which describes how to manually run the demo. The setup for both the systems looks the same, so it is described below before we discuss the Automated Test Framework.
The connections for J7200 are identical except the CPSW 9G ports which use the SGMII ports on the add on QSGMII add-on card. Shown below:
On J7200, the MCAN9 port is referred to as the MCAN8 port, but pins and wiring remains the same. The change is in the software.
As shown in the figure above, connect the two CPSW 9G Ethernet ports to PC's Ethernet ports and assign a fixed local IP to the interfaces to avoid unnecessary ARP traffic. If built-in NIC's are not available, then USB Ethernet NIC's can be used.
As shown in the picture below, connect the two USB-CAN analyzers to MCAN4 and MCAN8/9 instances, which are labeled as J30 and J32 respectively on the GESI card. The MCAN pin connection is as follows:
The following diagram shows the MCAN4 and MCAN9 connections on GESI card. MCAN8/9 has the same pin orientation (CAN_H, CAN_L and GND) as MCAN4.
If using the PCAN tool, the DB-9 connection is as follows:
Routing inside the gateway demo is now configurable, users can configure it as per their requirements.
This is achieved through the use of a simple lookup table inside the gateway application with 256 entries. Each entry has two masks, one for Ethernet and one for CAN.
The masks tell which ports are open for Transmit. So if Eth mask is set to 0 then no packets are sent out of any Ethernet port, same for CAN.
See figure below on how this is done.
Using the CAN ID as an index allows for O(1) lookup time.
The framework has two parts
In addition to these two, there is a GUI based on open frameworks, which allows the user to visualize the CPU Load, latency, and throughput.
There are two raw socket based Ethernet tools, send_1722.out and recv_1722.out which are used for sending and receiving IEEE 1722 frames, respectively. Their usage is described below.
The tools can be built by the user by executing the make all command in the <SDK_INSTALL_PATH>/gateway-demos/can_eth_gateway/pctools directory. The tools provide multiple options to the user, and they can be accessed by running them with the –help option. So, for example, to understand the options provided with send_1722.out run the command:
sudo send_1722.out --help
Example usage:
sudo ./send_1722.out --eth_interface eth0 --gateway_mac 70:ff:76:1d:92:c1 --dst_mac f8:b1:56:a6:86:e6 --ipg 1000 --route ETH --timeout 12 sudo ./recv_1722.out --eth_interface eth1 --timeout 12
sudo option is required since raw sockets in Linux require super user permission. As a result, even the python scripts that execute the automated tests require super user permission.
The analogous tool for CAN is called pcanfdtst, which supports both Tx and Rx modes. Its installation and usage is described below.
To install the PCAN Linux driver, follow these steps on your Linux PC. Supported from Ubuntu 20.04.
sudo apt-get install -y libpopt-dev
cd peak-linux-driver-8.16.0 make all sudo make install
sudo modprobe pcan
pcanfdtst tool provided in the Linux driver doesn't have the necessary extensions required for the automation. To do that, user needs to apply the pcanfdtst.patch provided in gateway-demos/pctools to the file pcanfdtst.c in the folder peak-linux-driver-8.16.0/test/src.pcanfdtst.patch from gateway-demos/pctools to peak-linux-driver-8.16.0/test/src and then execute the following commands in the directory peak-linux-driver-8.16.0/test/src: patch pcanfdtst.c pcanfdtst.patch cd .. make all
pcanfdtst tool in the peak-linux-driver-8.16.0/test directory.The pcanfdtst tool has many options, to see all of them run the command:
./pcanfdtst --help
Example usage to receive packets at 1 Mbps bitrate and 5 Mbps data rate:
./pcanfdtst rx --bitrate 1000000 --dbitrate 5000000 --clock 80000000 --brs --fd -q -M 12 /dev/pcan32
There are four routes to test in the demo:
Each route requires running sender(s) and listener(s) tasks simultaneously. This is automatically done by the Python script called run_demo.py. Besides these four routes, the script supports running System tests which enables all four routes simultaneously. The system tests can only be run with the GUI, which is described in Running GUI section.
Since the python script uses pcanfdtst utility from PCAN Linux Driver, the user first needs to copy the pctools folder to the folder peak-linux-driver-8.16.0/test:
cp -Rf <SDK_INSTALL_PATH>/gateway-demos/can_eth_gateway/pctools peak-linux-driver-8.16.0/test
User can now run the script from the peak-linux-driver-8.16.0/test folder. To find out what all option the script supports, run the command:
python3 pctools/run_demo.py --help
Due to hardcoded dependencies in the path of executables, the script must be run from the test folder as described above.
To run the demo, the Python script needs the following information:
lspcan
ifconfig
Providing so much information to the script is not easy, so the script provides a way to read this from a file. The file is called app_config.txt and should be kept in the same folder as the script. A sample app_config.txt file is provided in <SDK_INSTALL_PATH>/gateway-demos/can_eth_gateway/pctools folder. If the Python script cannot find the file, then the script tries to generate it automatically with the help from the user. The interaction is self-explanatory, but an example is provided below with comments.
Example usage:
python3 pctools/run_demo.py --iterations 1 --run_time 5 --system_test 0 --gui_enabled 0
Here --iterations 1 tells the script to run the unit tests only once, --run_time 5 tells the script to run each iteration for 5 seconds and --gui_enabled 0 tells the script not to invoke the GUI.
If the script cannot find app_config.txt, it will prompt the user with the following prompts:
Please remove any PCAN devices connected to the PC....hit Enter when ready Now connect the first PCAN device to MCAN4 interface (J14) on the GESI card...refer to the setup diagram
At this point, if the user connects a PCAN-USB device to PC, then user will get the prompt:
Found one interface
Continuing with the prompts, the user gets:
Now connect the second PCAN device to MCAN9 interface (J6) on the GESI card...refer to the setup diagram Please select the primary interface. Its usually the built in Ethernet card on a laptop or PC
Now, the user will be prompted with different ethernet interfaces on the PC and must select the appropriate interfaces connected to the Jacinto 7 EVM by entering Y or N. (See setup diagram)
For example, if eth0 and eth1 are connected to the Jacinto 7 EVM, then those must be selected:
Please select the secondary interface. Its usually a USB dongle on a laptop or a secondary NIC on a PC
At this prompt, user must select the second ethernet interface. Once that's done, the script will display something like:
--------Two CAN and two Ethernet Interfaces were added as shown below-------- CAN Interface for MCAN4 : /dev/pcanusbfd32 CAN Interface for MCAN9 : /dev/pcanusbfd33 Primary Eth Interface : enp1s2 Secondary Eth Interface : enxd037455f8444 If this is ok, then hit Y else hit N (to exit)
If the user proceeds and everything (Ethernet connection, CAN adapter, drivers, setup, cables) is OK, then user will get the prompt:
Found Gateway MAC. Good!
and the script will create the file app_config.txt file in the folder where the Python script is being run from. Else, the user will get the prompt:
Didn't get any packet from gateway, are you sure you are running it ? Maybe run wireshark and check ?
If this happens, then the user must debug the issue by checking each route manually and trying to figure out where the problem lies.
One can also attempt to create app_config.txt manually, if one is confident about the connections. Please see manually checking the routes section to debug the issue.
The routing table configuration is done automatically by the automation script. If you open run_demo.py file then you will see the following line.
sudo ./pctools/send_1722.out --eth_interface gateway_interfaces[3] --can_id gateway_interface_lut[gateway_interfaces[1]] --update_hash_table 1 --can_mask 0x1 --eth_mask 0x0
This line is used to configure the gateway for CAN 2 CAN routing such that CAN frames can only go out of the first port. No transmit from Ethernet ports is permitted.
The –can_id option is used to provide the CAN ID and –can_mask and –eth_mask are used to configure the Eth and CAN entries.
Below, one can see the sample output from a successful unit test run for all four routes for J7200:
J7200
The setup found an existing config file : ./pctools/app_config.txt and it will be used. If you think that's incorrect or if your setup has changed then please delete : ./pctools/app_config.txt and run this script again Script will run for 1 iteration(s) Each test will run for 5 second(s) Iteration # 0 : Script will now run individual tests Script will now run CAN 2 CAN tests -------------------CAN 2 CAN Test Results---------------------- Number of CAN frames sent : 27823 Number of CAN frames received : 27810 Test ran for : 5 seconds Average CAN 2 CAN delay : 101 us Max CAN 2 CAN delay : 382 us Average CPU Load : 13.297297 % Average SWI Load : 0.000000 % Average ISR Load : 0.000000 % CAN Rx rate : 5564 msgs/sec CAN Tx rate : 5562 msgs/sec CPU Load for 8k CAN (Rx + Tx) : 191.21452375388708 Mhz Script will now run CAN 2 Eth tests -------------------CAN 2 ETH Test Results---------------------- Number of CAN frames sent : 27823 Number of Eth frames received : 27820.0 Test ran for : 5 seconds Average CAN 2 Eth delay : 132 us Max CAN 2 Eth delay : 336 us Average CPU Load : 13.297297 % Average SWI Load : 0.000000 % Average ISR Load : 0.000000 % CAN Rx rate : 5564 msgs/sec Eth Tx rate : 5564 msgs/sec CPU Load for 8k CAN Rx + 8k Eth Tx : 191.18015922937298 Mhz Script will now run Eth 2 Eth tests -------------------ETH 2 ETH Test Results---------------------- Number of Eth frames sent : 66408 Number of Eth frames received : 66408 Test ran for : 5 seconds Average ETH 2 ETH delay : 222 us Max ETH 2 ETH delay : 877 us Average CPU Load : 13.297297 % Average SWI Load : 0.000000 % Average ISR Load : 0.000000 % Eth Rx rate : 13281 msgs/sec Eth Tx rate : 13281 msgs/sec CPU Load for 8k Eth Rx + Tx : 80.0945488495362 Mhz Script will now run Eth 2 CAN tests -------------------ETH 2 CAN Test Results---------------------- Number of Eth frames sent : 29556 Number of CAN frames received on 1st interface : 29556 Test ran for : 5 seconds Average ETH 2 CAN delay for 1st interface : 119 us Max ETH 2 CAN delay for 1st interface : 202 us Average CPU Load : 13.297297 % Average SWI Load : 0.000000 % Average ISR Load : 0.000000 % Eth Rx rate : 5911 msgs/sec CAN Tx rate : 5911 msgs/sec CPU Load for 8k Eth Rx + 8k CAN Tx : 179.96071186899445 Mhz Iteration # 0 completed
The command used to execute this test is:
python3 pctools/run_demo.py --iterations 1 --run_time 5 --system_test 0 --gui_enabled 0
As explained before, to run the unit tests, execute the command:
python3 pctools/run_demo.py --iterations 1 --run_time 5 --system_test 0 --gui_enabled 0
This will cycle through all the 4 routes, CAN-to-CAN, CAN-to-Eth, Eth-to-Eth and Eth-to-CAN cyclically once, while also displaying the statistics.
To run system tests, first run the GUI.
The GUI is packaged as a downloadable tarball in the Processor SDK Linux download page. The link is titled can-eth-gateway-demo-gui.tar.gz.
The GUI binaries have been compiled on an x86 machine running Ubuntu 18.04. If another Operating System or Ubuntu version is being used, then this will not work. At the moment, there is no plan to provide sources for compiling the GUI on a different Operating System.
The GUI has run-time dependencies on the Open Framework module, to install them follow the steps below.
./install_dependencies.sh as described on this pageTo run the GUI, extract the tarball in your machine at the location <GUI_INSTALL_DIR> and run the following commands to run the data aggregator:
cd <GUI_INSTALL_DIR>/aggregator/bin ./makefifo.sh ./ces-gui-data-aggregator
This will create the pipes and launch the aggregator, which serves as an Inter Process Communication system between the GUI and the PC tools.
Now, to run the actual GUI, run the following command in another terminal:
cd <GUI_INSTALL_DIR>/gui/bin ./ces2020-gui-template
This will launch a GUI which looks like this:
Now to see the GUI in action, run the following command in peak-linux-driver-8.16.0/test folder:
python3 pctools/run_demo.py --iterations 1 --run_time 20 --system_test 1 --gui_enabled 1
This will run the system tests for 20 seconds. If you see the GUI while the test is running, you will see the bars and dials moving.
This section describes how to manually check all four routes using the PCAN-USB FD tool or, for that matter, any other tool. Information provided here can also be used to debug the setup. We now describe how to test each route separately.
Note: Do not use 0xAA as the first byte of any CAN message sent to CAN Eth Gateway as it's reserved for test automation
There are two CAN-to-CAN routes, MCAN4 to MCAN9 and vice versa. The routing is decided based on the value of some bytes in the CAN-FD message. These byte offsets have been chosen keeping future requirements in mind. If the user is using the customised tools provided with the demo, then this is handled automatically based on command line arguments. But if user has their own tools, then they need to re-create the message and use the particular Message ID.
The CAN ports on the Gateway (Jacinto 7 EVM) can only accept a particular extended message ID. This is documented below:
| CAN Port | Message ID |
|---|---|
| MCAN4 | 0xD0 |
| MCAN9 | 0xE0 |
If you see the sample app_config.txt file, then you will find the same information.
To send an extended CAN FD message from MCAN4 to MCAN9, run the following command in peak-linux-driver-8.16.0/test directory:
./pcanfdtst tx CAN_ONLY --bitrate 1000000 --dbitrate 5000000 --clock 80000000 -n 1 -ie 0xD0 --fd -l 64 --tx-pause-us 1000 /dev/pcanusbfd32
Here, we assume that /dev/pcanusbfd32 is connected to MCAN4.
This will send 1 CAN message with the ID 0xD0 with correct formatting to the gateway, which will route it to MCAN9.
To listen and display the CAN message being received on MCAN9, run the following command in another terminal:
./pcanfdtst rx --bitrate 1000000 --dbitrate 5000000 --clock 80000000 --fd -M 10 /dev/pcanusbfd33
If routing from MCAN9 to MCAN4, use the same message but change the message ID and CAN port. So the command will change to:
./pcanfdtst tx CAN_ONLY --bitrate 1000000 --dbitrate 5000000 --clock 80000000 -n 1 -ie 0xE0 --fd -l 64 --tx-pause-us 1000 /dev/pcanusbfd33
On the listener side, we will change the command to listen on a different port:
./pcanfdtst rx --bitrate 1000000 --dbitrate 5000000 --clock 80000000 --fd -M 10 /dev/pcanusbfd32
To do CAN-to-ETH routing, we need to configure the routing table appropriately as described in this section
To send on second Eth port, set the eth_mask field to 0x2. If sending on both Ethernet ports then eth_mask field should be 0x3. While doing CAN to Eth routing, can_mask should be 0 or else there will be CAN 2 CAN routing.
To send packet from MCAN4 to both ETH ports, run this command:
./pcanfdtst tx ETH_ONLY --bitrate 1000000 --dbitrate 5000000 --clock 80000000 -n 1 -ie 0xD0 --fd -l 64 --tx-pause-us 1000 /dev/pcanusbfd32
On the listener side, we need to run this command in pctools directory to check for Ethernet frames:
sudo ./recv_1722.out --eth_interface eth0 --timeout 12 --pipes 0
Here, we assume that eth0 interface is connected to one of the GESI ethernet ports as shown in J7 Board setup.
To do Eth to Eth routing there are two requirements.
Both these requirements are taken care of by the send_1722.c tool, which reads the app_config.txt configuration file to know the PC and gateway device MAC addresses. The second requirement to tell the device about the MAC ID of the PC is also taken care of by the send_1722.c tool.
To configure the MAC address on the device, use the following command (also present in run_demo.py)
sudo ./pctools/send_1722.out --eth_interface ``70:ff:76:1d:92:c1`` --send_mac_address 1
Additionally user must configure the routing table by setting the can_mask to 0 and eth_mask to appropriate value based on routing requirement.
To send packets, run the following command in the pctools directory:
sudo ./send_1722.out --eth_interface eth0 --gateway_mac 70:ff:76:1d:92:c1 --dst_mac 00:ad:24:8f:f6:4e --ipg 1000 --route ETH --num_packets 10
This will send 10 packets on the interface eth0 to gateway device with a MAC ID of 70:ff:76:1d:92:c1, where the MAC ID of other ethernet interface is 00:ad:24:8f:f6:4e. Here, --ipg 1000 will add an approximate delay of 1000 us between two ethernet frames.
To receive packets, run the following command in the pctools directory:
sudo ./recv_1722.out --eth_interface eth1 --timeout 12 --pipes 0
To change routing from eth1 to eth0, swap the interface names and MAC ID in the sender and listener commands.
Here, we assume that eth0 and eth1 are ethernet interfaces connected to the GESI card.
To do Ethernet to CAN routing, we need to configure eth_mask and can_mask appropriately (see CAN to CAN section above) and run Ethernet sender and CAN receiver tasks.
Send 10 packets from eth0 to MCAN4 at an IPG of 1ms:
sudo ./send_1722.out --eth_interface eth0 --gateway_mac 70:ff:76:1d:92:c1 --ipg 1000 --route MCAN4 --num_packets 10
Listen on MCAN4 for CAN messages for 10 seconds:
./pcanfdtst rx --bitrate 1000000 --dbitrate 5000000 --clock 80000000 --fd -M 10 /dev/pcanusbfd32
Here, we assume that /dev/pcanusbfd32 is connected to MCAN4.
The tool also supports sending output to both CAN ports. To do that, change the --route option to BOTH:
sudo ./send_1722.out --eth_interface eth0 --gateway_mac 70:ff:76:1d:92:c1 --ipg 1000 --route BOTH --num_packets 10
For more details about installation of CCS and J7200 target creation, refer to the Processor SDK RTOS User's Guide inside "psdk_rtos/docs/user_guide" folder, which can be found in SDK installation.
XDS110 (J3).Main UART (J44). This will create 4 UART ports from /dev/ttyUSB0 to /dev/ttyUSB3SW8 and SW9 for no-boot mode:
launch.js script at <SDK_INSTALL_PATH>/pdk_j7200_11_00_00_21/packages/ti/drv/sciclient/tools/ccsLoadDmsc/j7200.<SDK_INSTALL_PATH>/gateway-demos/binary/can_traffic_generator_app_freertos/bin/j7200/can_traffic_generator_app_freertos_mcu1_0_release.xer5f.
<SDK_INSTALL_PATH>/gateway-demos/binary/can_eth_gateway_app_freertos/bin/j7200/can_eth_gateway_app_freertos_mcu2_1_release.xer5f
<SDK_INSTALL_PATH>/ethfw/out/J7200/R5Ft/FREERTOS/release/app_remoteswitchcfg_server_ccs.xer5f
Note: User must first run the gateway app on MAIN_Cortex_R5F_0_1 followed by a delay of 5 seconds before running the Ethernet firmware on MAIN_Cortex_R5F_0_0 to enable synchronization.
70:ff:76:1d:92:c1 value shown above refers to the MAC address of the Gateway and is the same one that is used in ETH to ETH routing. It will change from device to device.OSPI boot is currently not functional for J7200, the alternative is to use CCS Boot. See (here)
MCU UART (J43).SW8 and SW9 for UART boot mode:Power cycle the EVM. You should see continuous CCCC prints on the console. This means that the EVM is now in UART boot mode and ready to flash OSPI binaries.
> Close the serial terminal or you won't be able to flash the binaries.
make -s sbl_ospi_img
gen_combined_image.sh in <SDK_INSTALL_PATH>/gateway-demos/pctools to generate the image app_switch2.appimagePlease edit the script
gen_combined_image.shas per your requirement as the paths may not match sometimes
<SDK_INSTALL_PATH>/pdk_j7200_11_00_00_21/packages/ti/boot/sbl/binary/j7200_evm/ospi/bin/sbl_ospi_img_mcu1_0_release.tiimage to <OSPI_BINARIES> and rename it to tiboot3.bin.<SDK_INSTALL_PATH>/pdk_j7200_11_00_00_21/packages/ti/drv/sciclient/soc/V1/tifs.bin to <OSPI_BINARIES>.app_switch2.appimage to <OSPI_BINARIES>.pdk\packages\ti\board\src\flash\nor\ospi\nor_spi_patterns.bin to <OSPI_BINARIES>sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f /<PATH_TO_UNIFLASH_TOOL>/uniflash_6.1.0/processors/FlashWriter/j7200_evm/uart_j7200_evm_flash_programmer_release.tiimage -i 0
sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f <OSPI_BINARIES>/tiboot3.bin -d 3 -o 0 sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f <OSPI_BINARIES>/sysfw.bin -d 3 -o 80000 sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f <OSPI_BINARIES>/app_switch2.appimage -d 3 -o 100000 sudo ./dslite.sh --mode processors -c /dev/ttyUSB1 -f <OSPI_BINARIES>/nor_spi_patterns.bin -d 3 -o 3FC0000(J7200)
SW8 and SW9 for xSPI boot modeMain UART (J44).The Out of Box demo is identical to the regular demo with the exception that no PCAN-USB devices are used. Hence it's much easier to setup.
To run the demo, the following connections need to be made
See the picture below on how connections are made with the help of two color coded jumper cable strips.
Note: Out of Box demo does not support GUI or Manual checking of the routes
can_traffic_generator_app and it's used to showcase that J7 family of devices are capable of routing traffic from one CAN port to another with extremely low latency.0xD0 to MCU MCAN0 and it gets routed to MCU MCAN1 by default. The reverse is not true.0xD0 on say /dev/pcan32 which is connected to MCU MCAN0, use the following command: ./pcanfdtst tx --bitrate 1000000 --dbitrate 5000000 --clock 80000000 -ie 0xD0 --fd --brs -l 64 -w -n 10 /dev/pcan32
./pcanfdtst NO_GUI rx --bitrate 1000000 --dbitrate 5000000 --clock 80000000 -q /dev/pcan33
See picture below regarding connections. The MCU MCAN0 and MCU MCAN1 ports are the same ones which are used for OOB demo, except that they are connected to PCAN devices now.
Three types of statistics are of concern to use when running gateway application.
When a unit test is run, the test automation script automatically displays all the statistics from the test run.
index.html) at <SDK_INSTALL_PATH>/gateway-demos| KPIs | CAN-CAN | CAN-ETH | ETH-ETH | ETH-CAN |
|---|---|---|---|---|
| Avg. CPU Load (%) | 31.6 | 31.1 | 35.9 | 26.8 |
| Avg. Delay (us) | 215 | 167 | 239 | 125 |
| Max Delay (us) | 407 | 377 | 1556 | 335 |
| Rx Packet Rate (pps) | 5564 | 5564 | 15632 | 6297 |
| Tx Packet Rate (pps) | 5564 | 5564 | 15611 | 6297 |
1.8.15