MCUSW
|
This application demonstrates execute-in-place, where in CAN Profiling Application is executed from OSPI memory. i.e. The secondary boot loader, will not fetch the CAN Profiling Application from on-board Flash to RAM. Instead execute it from the on-board memory. In addition to the CAN Profiling Application running in XIP mode, the demo also has a separate task that does firmware update in parallel to application execution. The demo showcases concurrent write while XIP read is in progress for a non RWW Flash. The demo also showcases the state machine logic for interleaving XIP read and New Application write access.
Table below list SoC/Cores on which this demo application is tested
SoC | Host Core | Comments |
---|---|---|
J721E | MCU 1 0 | MCAL could be hosted on other cores but this demo application runs only on MCU 1 0, at this point of time. |
J7200 | MCU 1 0 | MCAL could be hosted on other cores but this demo application runs only on MCU 1 0, at this point of time. |
The profiling application is configured to operate in loop-back mode by default. This application can be configured to operate in transmit-only, receive-only or loopback mode.
The below table lists the configuration changes required to change mode. Please ensure to recompile post modifications.
For TX Only | Flag Value | Location |
---|---|---|
APP_INSTANCE_1_INST_IN_CFG_ONLY | STD_ON | mcusw\mcuss_demos\profiling\can\can_profile.h |
CAN_LOOPBACK_ENABLE | STD_OFF | mcusw\mcuss_demos\mcal_config\Can_Demo_Cfg\output\generated\soc\j72xx\mcu1_0\include\Can_Cfg.h |
CAN_TX_ONLY_MODE | STD_ON | mcusw\mcuss_demos\profiling\can\can_profile.h |
This application would transmit CAN FD messages with extended ID (0xC0) at nominal-rate of 1 Mbps, data-rate at 5 Mbps
For RX Only | Flag Value | Location |
---|---|---|
APP_INSTANCE_1_INST_IN_CFG_ONLY | STD_ON | mcusw\mcuss_demos\profiling\can\can_profile.h |
CAN_LOOPBACK_ENABLE | STD_OFF | mcusw\mcuss_demos\mcal_config\Can_Demo_Cfg\output\generated\soc\j72xx\mcu1_0\include\Can_Cfg.h |
CAN_TX_ONLY_MODE | STD_OFF | mcusw\mcuss_demos\profiling\can\can_profile.h |
This application setup to receive CAN FD messages with extended ID (0xC0) at nominal-rate of 1 Mbps, data-rate at 5 Mbps
For Internal Loopback (default) | Flag Value | Location |
---|---|---|
APP_INSTANCE_1_INST_IN_CFG_ONLY | STD_OFF | mcusw\mcuss_demos\profiling\can\can_profile.h |
CAN_LOOPBACK_ENABLE | STD_ON | mcusw\mcuss_demos\mcal_config\Can_Demo_Cfg\output\generated\soc\j72xx\mcu1_0\include\Can_Cfg.h |
CAN_TX_ONLY_MODE | X | mcusw\mcuss_demos\profiling\can\can_profile.h |
No additional connections / setup is required in this mode
We need to have the following binaries built from pdk:
Go to (SDK Install Directory)/pdk_jacinto_07.x.x/packages/ti/build and run the following:
make sbl_ospi_img BOARD=j72xx_evm
Create a demo directory to store the binaries for this demo.
Create a subdirectory called "P2_image".
Go to (SDK Install Directory)/mcusw/build and run the following:
make can_profile_xip_fota_app BUILD_OS_TYPE=tirtos BOARD=j72xx_evm REGION=P1 cp ../binary/can_profile_xip_fota_app/bin/j72xx_evm/can_profile_xip_fota_app_mcu1_0_release.appimage (DEMO DIRECTORY) cp ../binary/can_profile_xip_fota_app/bin/j72xx_evm/can_profile_xip_fota_app_mcu1_0_release.appimage_xip (DEMO DIRECTORY) make allclean make can_profile_xip_fota_app BUILD_OS_TYPE=tirtos BOARD=j72xx_evm REGION=P2 cp ../binary/can_profile_xip_fota_app/bin/j72xx_evm/can_profile_xip_fota_app_mcu1_0_release.appimage (DEMO DIRECTORY)/P2_image/ cp ../binary/can_profile_xip_fota_app/bin/j72xx_evm/can_profile_xip_fota_app_mcu1_0_release.appimage_xip (DEMO DIRECTORY)/P2_image/ mv (DEMO DIRECTORY)/P2_image/can_profile_xip_fota_app_mcu1_0_release.appimage_xip (DEMO DIRECTORY)/P2_image/can_profile_xip_fota_app_mcu1_0_release_xip.appimage cp ../mcuss_demos/profiling/can_profile_xip_fota_app/bk_region.bin (DEMO DIRECTORY)
Install uniflash 6.3 from http://www.ti.com/tool/UNIFLASH
Note : Uniflash 6.3 does not support .appimage_xip file. Support for this would be added in Uniflash 6.4. Please follow the below steps after installing Uniflash.
For using OSPI the SW3 switch setting should be : 0XXX_XXXX_XX
Specific SW setting for different boot modes-
Mode | Switch Settings |
---|---|
UART | SW8: 0000_0000, SW9: 0111_0000 |
OSPI (J721E) | SW8: 0000_0000, SW9: 0100_0000 |
OSPI (J7200) | SW8: 1000_0010, SW9: 0011_0000 |
Run the following commands to flash
Power off the board and change the bootmode to OSPI. Connect to second instance of UART and Power on the board. You should see the logs on the MCU uart console
Note : In Windows, dslite.bat needs to be used instead of dslite.sh and during flashing if you get any error "Unknown response from the target", please disconnect UART cable and connect once again then try to flash. Note : In case of J7200 flash OSPI Phy Tuning bin file at location 3FC0000 and for J721E at 3FE0000.
Cache needs to be always ON and following BIOS setting change should be added in sysbios cfg file.
var Cache = xdc.useModule('ti.sysbios.family.arm.v7r.Cache');
Cache.skipEarlyCacheStartup = true;
Revision | Date | Author | Description | Status |
---|---|---|---|---|
0.1 | 25 Jun 2021 | Aditya W | Initial Version | Under Review |