Other Parts Discussed in Thread: J721S2XSOMXEVM
Hi, Ti's experts:
SDK: ti-processor-sdk-rtos-j721s2-evm-08_06_01_03, ti-processor-sdk-linux-j721s2-evm-08_06_01_02
Development board: J721S2XSOMXEVM
I am study the MCUSS Demo Application : CAN Profiling Application, and do the follow six test, please check it and help to fix the Questions(Q1, Q2, Q3, Q4).
Test 1. operate in internal loop-back and interrupt mode by default : Run OK.
step1: build
hduser@J721S2:~/ti-processor-sdk-rtos-j721s2-evm-08_06_01_03/mcusw/build$ sudo make can_profile_app BOARD=j721s2_evm SOC=j721s2 BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=freertos -sj
step2: use the CCS to load and run the can_profile_app_freertos_mcu1_0_release.xer5f on MCU_Cortex_R5_0.
Step3: Read the UART log, and we can find it works ok.
[2023-07-06 15:52:45.797] CAN Profile App:Variant - Pre Compile being used !!! [2023-07-06 15:52:45.797] CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN0!!! [2023-07-06 15:52:45.877] CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN1!!! [2023-07-06 15:52:45.941] CAN Profile App:Will Transmit & Receive (Internal-loopback) 10000 Messages, 2 times [2023-07-06 15:52:49.493] CAN Profile App:NOTE : Operating in interrupt mode! [2023-07-06 15:52:49.541] CAN Profile App:Transmit & Receive (Internal-loopback) 10000 packets 2 times [2023-07-06 15:52:49.621] CAN Profile App:Average of 86.20032 usecs per packet [2023-07-06 15:52:49.669] CAN Profile App:Average of 11560 packets in 1 second with CPU Load 0.000000% [2023-07-06 15:52:49.749] CAN Profile App:Packets sent: 20000, Packets recv: 20000 in total time: 3460032 us [2023-07-06 15:52:49.845] CAN Profile App:Measured Load: Total CPU: 100.000000%, TSK: 0.000000% [2023-07-06 15:52:49.910] CAN Profile App:Message Id Received c00000c0 Message Length is 64 [2023-07-06 15:52:49.989] CAN Profile App:Test completed for 0 instance [2023-07-06 15:52:50.036] [2023-07-06 15:52:50.036] CAN Profile App: 2744 bytes used for stack [2023-07-06 15:52:50.085] CAN Profile App:Profiling completes sucessfully!!!
Test 2. operate in internal loop-back and polling mode : Run OK.
step1: According to the MCUSW: CAN Profiling Application shows, update related codes to configure the can profiling application operate in internal loop-back and polling mode.
admin:///media/sf_J721S2TDA4Share/Polling%20mode.PNG
step2: build
hduser@J721S2:~/ti-processor-sdk-rtos-j721s2-evm-08_06_01_03/mcusw/build$ sudo make can_profile_app BOARD=j721s2_evm SOC=j721s2 BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=freertos -sj
step3: use the CCS to load and run the can_profile_app_freertos_mcu1_0_release.xer5f on MCU_Cortex_R5_0.
Step4: Read the UART log, and we can find it works ok.
[2023-07-06 16:09:47.631] CAN Profile App:Variant - Pre Compile being used !!!
[2023-07-06 16:09:47.647] CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN0!!!
[2023-07-06 16:09:47.710] CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN1!!!
[2023-07-06 16:09:47.775] CAN Profile App:Will Transmit & Receive (Internal-loopback) 10000 Messages, 2 times
[2023-07-06 16:11:07.866] CAN Profile App:NOTE : Operating in polling mode!
[2023-07-06 16:11:07.913] CAN Profile App:NOTE : Batch processing enabled!
[2023-07-06 16:11:07.961] CAN Profile App:Transmit & Receive (Internal-loopback) 10000 packets 2 times
[2023-07-06 16:11:08.041] CAN Profile App:Average of 250.34 usecs per packet
[2023-07-06 16:11:08.106] CAN Profile App:Average of 3999 packets in 1 second with CPU Load 0.000000%
[2023-07-06 16:11:08.185] CAN Profile App:Packets sent: 160000, Packets recv: 160000 in total time: 80000034 us
[2023-07-06 16:11:08.265] CAN Profile App:Measured Load: Total CPU: 100.000000%, TSK: 0.000000%
[2023-07-06 16:11:08.345] CAN Profile App:Message Id Received c00000c0 Message Length is 64
[2023-07-06 16:11:08.409] CAN Profile App:Test completed for 0 instance
[2023-07-06 16:11:08.456]
[2023-07-06 16:11:08.456] CAN Profile App: 2744 bytes used for stack
[2023-07-06 16:11:08.505] CAN Profile App:Profiling completes sucessfully!!!
Test 3. operate in TX Only and polling mode : Run Failed
step1: According to the MCUSW: CAN Profiling Application shows, update related codes to configure the can profiling application operate in Tx Only and polling mode.
admin:///media/sf_J721S2TDA4Share/Tx%20only.PNG
step2: build
hduser@J721S2:~/ti-processor-sdk-rtos-j721s2-evm-08_06_01_03/mcusw/build$ sudo make can_profile_app BOARD=j721s2_evm SOC=j721s2 BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=freertos -sj
step3: use the CCS to load and run the can_profile_app_freertos_mcu1_0_release.xer5f on MCU_Cortex_R5_0.
Step4: Read the UART log, and we can find it shows CAN Test Failed!!!.
CAN Profile App:Variant - Pre Compile being used !!!
CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN0!!!
CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN1!!!
CAN Profile App:Will Transmit 10000 Messages, 2 times
CAN Profile App: 2744 bytes used for stack
CAN Profile App:CAN Test Failed!!!
Q1: What other actions should I do if I want to run the can profiling application operate in Tx Only and polling mode?
Test 4. operate in TX Only and interrupt mode : Run Failed
step1: According to the MCUSW: CAN Profiling Application shows, update related codes to configure the can profiling application operate in Tx Only and interrupt mode.
admin:///media/sf_J721S2TDA4Share/Interrupt%20mode.PNG
step2: build
hduser@J721S2:~/ti-processor-sdk-rtos-j721s2-evm-08_06_01_03/mcusw/build$ sudo make can_profile_app BOARD=j721s2_evm SOC=j721s2 BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=freertos -sj
step3: use the CCS to load and run the can_profile_app_freertos_mcu1_0_release.xer5f on MCU_Cortex_R5_0.
Step4: Read the UART log, and we can find it stop after "CAN Profile App:Will Transmit 10000 Messages", according to the code, it seems stop at "SemaphoreP_pend(CanIf_TxConfirmationSemaphore,SemaphoreP_WAIT_FOREVER);"
CAN Profile App:Variant - Pre Compile being used !!!
CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN0!!!
CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN1!!!
CAN Profile App:Will Transmit 10000 Messages, 2 times
Q2: What other actions should I do if I want to run the can profiling application operate in Tx Only and interrupt mode?
Test 5. operate in External Loopback and interrupt mode : Run Failed
step1: According to the MCUSW: CAN Profiling Application shows, update related codes to configure the can profiling application operate in External Loopback and interrupt mode.
admin:///media/sf_J721S2TDA4Share/External%20Loopback.PNG
step2: build
hduser@J721S2:~/ti-processor-sdk-rtos-j721s2-evm-08_06_01_03/mcusw/build$ sudo make can_profile_app BOARD=j721s2_evm SOC=j721s2 BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=freertos -sj
step3: Loop these two header J31,J30 with jumper wire. MCU_MCAN0_H <- Jumper Wire ->MCU_MCAN1_H AND MCU_MCAN0_L <- Jumper Wire ->MCU_MCAN1_L
admin:///media/sf_J721S2TDA4Share/External%20Loopback%20wire.PNG
step4: use the CCS to load and run the can_profile_app_freertos_mcu1_0_release.xer5f on MCU_Cortex_R5_0.
Step5: Read the UART log, and we can find it stop after "CAN Profile App:Will Transmit & Receive (External-loopback) 10000 Message, 2 times", according to the code, it seems stop at "SemaphoreP_pend(CanIf_TxConfirmationSemaphore,SemaphoreP_WAIT_FOREVER);"
CAN Profile App:Variant - Pre Compile being used !!!
CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN0!!!
CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN1!!!
CAN Profile App:Will Transmit & Receive (External-loopback) 10000 Messages, 2 times
Q3: What other actions should I do if I want to run the can profiling application operate in External Loopback and interrupt mode?
Test 6. operate in External Loopback and polling mode : Run Failed
step1: According to the MCUSW: CAN Profiling Application shows, update related codes to configure the can profiling application operate in External Loopback and polling mode.
admin:///media/sf_J721S2TDA4Share/Polling%20mode.PNG
step2: build
hduser@J721S2:~/ti-processor-sdk-rtos-j721s2-evm-08_06_01_03/mcusw/build$ sudo make can_profile_app BOARD=j721s2_evm SOC=j721s2 BUILD_PROFILE=release CORE=mcu1_0 BUILD_OS_TYPE=freertos -sj
step3: Loop these two header J31,J30 with jumper wire. MCU_MCAN0_H <- Jumper Wire ->MCU_MCAN1_H AND MCU_MCAN0_L <- Jumper Wire ->MCU_MCAN1_L
admin:///media/sf_J721S2TDA4Share/External%20Loopback%20wire.PNG
step4: use the CCS to load and run the can_profile_app_freertos_mcu1_0_release.xer5f on MCU_Cortex_R5_0.
Step5: Read the UART log,and we can find it shows CAN Test Failed!!!.
CAN Profile App:Variant - Pre Compile being used !!!
CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN0!!!
CAN Profile App: Successfully Enabled CAN Transceiver MCU MCAN1!!!
CAN Profile App:Will Transmit & Receive (External-loopback) 10000 Messages, 2 times
CAN Profile App:NOTE : Operating in polling mode!
CAN Profile App:NOTE : Batch processing enabled!
CAN Profile App:Transmit & Receive (External-loopback) 10000 packets 2 times
CAN Profile App:Average of 500.03 usecs per packet
CAN Profile App:Average of 2000 packets in 1 second with CPU Load 0.000000%
CAN Profile App:Packets sent: 160000, Packets recv: 0 in total time: 80000003 us
CAN Profile App:Measured Load: Total CPU: 100.000000%, TSK: 0.000000%
CAN Profile App:CanApp_ProfileStatus = E_NOT_OK at line566.
CAN Profile App: 2744 bytes used for stack
CAN Profile App:CAN Test Failed!!!
Q4: What other actions should I do if I want to run the can profiling application operate in External Loopback and polling mode?
Best Regards,
Shuai Feng