Other Parts Discussed in Thread: PROCESSOR-SDK-AM62A,
Tool/software:
Hi,
I am trying to test IPC on am62a, so I chose the vision_apps/apps/utilities/app_ipc shipped within PROCESSOR-SDK-J7XXX to do this.
I was building my rtos with the k3-am62a7-sk bsp against PROCESSOR-SDK-J7XXX and getting some binaries of the test applications.
then I was running the binary (app_arm_ipc) but getting the following errors:
APP: Init ... !!!
MEM: Init SHM ... !!!
MEM: Initialized SHM (fd=7) !!!
MEM: get SHM heap id (0) !!!
MEM: Init SHM ... Done !!!
IPC: Init ... !!!
IPC: ERROR: Unable to create TX channels for CPU [mcu1_0] !!!
IPC: ERROR: Unable to create TX channels for CPU [c7x_1] !!!
IPC: Init ... Done !!!
APP: ERROR: IPC init failed !!!
REMOTE_SERVICE: Init ... !!!
REMOTE_SERVICE: Init ... Done !!!
461.300612 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
461.305887 s: VX_ZONE_INIT:Enabled
461.306044 s: VX_ZONE_ERROR:Enabled
461.311157 s: VX_ZONE_WARNING:Enabled
461.317021 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-0
461.317573 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-1
461.327221 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-2
461.332543 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-3
461.342846 s: VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
461.348286 s: VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
APP IPC: ERROR: Send msg 1 to CPU [mcu1_0] failed !!!
APP IPC: ERROR: Send msg 1 to CPU [c7x_1] failed !!!
APP IPC: ERROR: Send msg 1 to CPU [mcu1_0] failed !!!
APP IPC: ERROR: Send msg 1 to CPU [c7x_1] failed !!!
APP IPC: ERROR: Send msg 1 to CPU [mcu1_0] failed !!!
APP IPC: ERROR: Send msg 1 to CPU [c7x_1] failed !!!
APP IPC: ERROR: Send msg 1 to CPU [mcu1_0] failed !!!
APP IPC: ERROR: Send msg 1 to CPU [c7x_1] failed !!!
APP IPC: Waiting for all messages to get echoed from remote core...
APP IPC: Waiting for all messages to get echoed ... Done.
APP IPC: Running remote service test ...
471.423271 s: REMOTE_SERVICE_TEST: Running test for CPU mcu1_0 !!!
REMOTE_SERVICE: TX: FAILED: mpu1_0 -> mcu1_0 (port 21) cmd = 0x00001234, prm_size = 4 bytes
471.423857 s: REMOTE_SERVICE_TEST: Test failed @ iteration 0 !!!
471.424328 s: REMOTE_SERVICE_TEST: Running test @ 0xa3000000 of 1024 bytes size for CPU mcu1_0 !!!
REMOTE_SERVICE: TX: FAILED: mpu1_0 -> mcu1_0 (port 21) cmd = 0x00005678, prm_size = 8 bytes
471.433340 s: REMOTE_SERVICE_TEST: Test failed @ iteration 0 !!!
471.443803 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU mcu1_0 !!!
REMOTE_SERVICE: TX: FAILED: mpu1_0 -> mcu1_0 (port 21) cmd = 0x00000002, prm_size = 4 bytes
471.459628 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU mcu1_0 ... DONE !!!
471.464971 s: REMOTE_SERVICE_TEST: ERROR: Timer test !!!
471.475493 s: REMOTE_SERVICE_TEST: Running test for CPU c7x_1 !!!
REMOTE_SERVICE: TX: FAILED: mpu1_0 -> c7x_1 (port 21) cmd = 0x00001234, prm_size = 4 bytes
471.486083 s: REMOTE_SERVICE_TEST: Test failed @ iteration 0 !!!
471.491538 s: REMOTE_SERVICE_TEST: Running test @ 0xa3000000 of 1024 bytes size for CPU c7x_1 !!!
REMOTE_SERVICE: TX: FAILED: mpu1_0 -> c7x_1 (port 21) cmd = 0x00005678, prm_size = 8 bytes
471.507305 s: REMOTE_SERVICE_TEST: Test failed @ iteration 0 !!!
471.517783 s: REMOTE_SERVICE_TEST: Running test for timer of 10000 msecs for CPU c7x_1 !!!
REMOTE_SERVICE: TX: FAILED: mpu1_0 -> c7x_1 (port 21) cmd = 0x00000002, prm_size = 4 bytes
471.528433 s: REMOTE_SERVICE_TEST: Timer test of 10000 msecs for CPU c7x_1 ... DONE !!!
471.538949 s: REMOTE_SERVICE_TEST: ERROR: Timer test !!!
APP IPC: Running remote service test ... Done.
471.549602 s: VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Initialization Done for HOST !!!
471.673185 s: VX_ZONE_INIT:[tivxDeInitLocal:204] De-Initialization Done !!!
APP: Deinit ... !!!
REMOTE_SERVICE: Deinit ... !!!
REMOTE_SERVICE: Deinit ... Done !!!
IPC: Deinit ... !!!
IPC: DeInit ... Done !!!
MEM: Deinit SHM ... !!!
MEM: Alloc's: 2 alloc's of 2048 bytes
MEM: Free's : 2 free's of 2048 bytes
MEM: Open's : 0 allocs of 0 bytes
MEM: Deinit SHM ... Done !!!
APP: Deinit ... Done !!!
APP IPC: Done !!!
I did some investigations on the initial failures for creating TX channels and found the testing code is trying to open the following devices:
/rpmsg_ctrl-1-13
/rpmsg_ctrl-2-13
while I see in my rtos with device show command, the same are not showed but having entries in other identifiers:
drv refs name
2 [ 3] /dev/video0
6 [ 3] /devm
19 [ 3] /dma_heap/edgeai_shared-memories
3 [ 3] /eeprom/0
13 [ 3] /fifos
17 [ 3] /host.host
8 [ 3] /mmc0a
9 [ 3] /mmc0b
0 [ 5] /null
12 [ 3] /romfs
15 [ 3] /rpmsg_ctrl-3-14
18 [ 3] /rpmsg_ctrl-4-13
8 [ 3] /sd1a
9 [ 3] /sd1b
8 [ 3] /sd1c
5 [ 3] /shm
1 [ 5] /ttyS0
1 [ 3] /ttyUSB0
4 [ 3] /vxbus
value = 2 = 0x2
I then turned on the debug for the rpmsg component and got this:
this may explain how the port numbers are created.
arget Name: vxTarget
rpmsg_create_ept:ns
rpmsg_create_ept:ns->53
rpmsg_register_device: Added one Rpmsg @ 0x245e140
rpmsg_ns_cb: NS message: flag:0, ti.ipc4.ping-pong, addr:13
rpmsg_ns_cb: NS message: flag:0, rpmsg_chrdev, addr:14
rpmsg_create_ept:ns
rpmsg_create_ept:ns->53
rpmsg_register_device: Added one Rpmsg @ 0x245e280
rpmsg_ns_cb: NS message: flag:0, rpmsg_chrdev, addr:13
I understand the first number is for remote processor id and the second number is for remote port, the dts shows the processor id for r5 core and c7x core are 3 and 4 respectively:
r5f@79000000 {
compatible = "ti,am62-r5f";
reg = <0x79000000 0x00008000 0x79020000 0x00008000>;
reg-names = "atcm" "btcm";
ti,sci = <0x00000005>;
ti,sci-dev-id = <0x00000009>;
ti,sci-proc-ids = <0x00000003 0x000000ff>;
dsp@7e000000 {
compatible = "ti,am62a-c7xv-dsp";
reg = <0x00000000 0x7e000000 0x00000000 0x00100000>;
reg-names = "l2sram";
ti,sci = <0x00000005>;
ti,sci-dev-id = <0x000000d0>;
ti,sci-proc-ids = <0x00000004 0x000000ff>;
resets = <0x00000007 0x000000d0 0x00000001>;
So the confusing part is why the testing code is trying invalid processor ids?
Please help!
Thank you very much!
Regards,
Hailong