This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62A7: Trying to run rpmsg_char_zerocopy example. DSP is crashing.

Part Number: AM62A7

Tool/software:

Hello,

We are trying to run the rpmsg_zero_copy example mentioned in the AM62A7 multicore section of the MCU_PLUS users guide for the AM62A7:

https://git.ti.com/cgit/rpmsg/rpmsg_char_zerocopy/

We are following the README.md's in the git area.  We've been able to do the hello world and echo tests without issue.

We have a customer interested in using the DSP for a particular application to offload some filtering / FFT to the C7x DSP in a separate application with common hardware that will potentially use the C7x for the intended AI features.

We are using the following command line:

 rpmsg_char_zerocopy -r 8 -s 10 -e "linux,cma"

We have updated the example.syscfg in the DSP application to add the cma reserved region:

mmu_armv812.$name = "CONFIG_SHARED";
mmu_armv812.vAddr = 0xC0000000;
mmu_armv812.pAddr = 0xC0000000;
mmu_armv812.size = 0x1000000;
mmu_armv812.attribute = "MAIR4";

linux gets here and stops

Created endpt device rpmsg-char-8-1317, fd = 4 port = 1025
Exchanging 1 messages with rpmsg device on rproc id 8 ...

dma-buf address: 0xc00f4000
Buffer @0xffff891f7000 (size 10240) filled with pattern 0xaaaa5555
Sending buffer data #0
Address: 0xc00f4000
Size: 10240
Pattern: 0xaaaa5555
Receiving buffer data #0:

when we dump the trace buffer, the DSP is crashed (and seems to be continuously looping on an error, so we miss the beginning).  But debugger shows it is crashing on the buffer_validate() in the Cache_inv() operation.

cat /sys/kernel/debug/remoteproc/remoteproc0/trace0
]
[c75ss0] 174.365843s : 0x000000000000000a [7] 0x0000000000000000 [7]
[c75ss0] 174.365361s :
[c75ss0] 174.365553s : Exception at 0x0000000000000000
[c75ss0] 174.365903s : TSR at time of exception: 0x0000000000000000
[c75ss0] 174.365342s : Page fault:
[c75ss0] 174.365545s : IERR=0x0000000000000001
[c75ss0] 174.365825s : IEAR=0x00000000c00f4000
[c75ss0] 174.365115s : IESR=0x00000000000300c5
[c75ss0] 174.365424s : Page fault exception:
[c75ss0] 174.365711s : uTLB Fault, cpu_se_N_rstatus[10:0]=0xc5
0x0000000000000000 [6]
[c75ss0] 174.365704s : 0x0000000000000000 [7] 0x0000000000000000 [7]
[c75ss0] 174.365218s :
[c75ss0] 174.365376s : SE1_2=0x0000000000000000 [0] SE1_3=0x021dcee084aa6e66 [0]
[c75ss0] 174.365882s : 0x0000000000000000 [1] 0xf7d5bfac76060c23 [1]
[c75ss0] 174.365412s : 0x0000000000000000 [2] 0x0e8880a01e30789d [2]
[c75ss0] 174.365943s : 0x0000000000000003 [3] 0x0000000000000808 [3]
[c75ss0] 174.365425s : 0x4d41bc6801f7043a [4] 0x1509a1111a904103 [4]
[c75ss0] 174.365957s : 0xd038226ce83bd4f6 [5] 0x89a919006ebacd26 [5]
[c75ss0] 174.365511s : 0x80283da21d502185 [6] 0x043844ec8c92c192 [6]
[c75ss0] 174.365063s : 0x0000000000000800 [7] 0x0000000000000010 [7]

Is there anything obvious we might be doing wrong?

Thanks,

Mike

  • I was able to get the example to run using the "edgeai_shared-memories block that is predefined in the device tree at address 0xA3000000.  It's not clear why 0xA3000000 is working by the linux,cma region at 0xC0000000 is not working.  Is there a limit to the addressable space that the DSP can reach?

    Would it be possible to get access to these documents?  I suspect they would answer my questions.

    C71x DSP Corepac Technical Reference Manual - SPRUIQ3

    C71x DSP CPU, Instruction Set, and Matrix Multiply Accelerator SPRUIP0

    Thanks,

    Mike

    root@mitysom-am62ax:~# ./rpmsg_char_zerocopy -r 8 -s 10 -e "carveout_edgeai_shared-memories"
    opening rpmsg-char-8-1309
    Created endpt device rpmsg-char-8-1309, fd = 4 port = 1025
    Exchanging 1 messages with rpmsg device on rproc id 8 ...

    dma-buf address: 0xa3000000
    Buffer @0xffff96126000 (size 10240) filled with pattern 0xaaaa5555
    Sending buffer data #0
    Address: 0xa3000000
    Size: 10240
    Pattern: 0xaaaa5555
    Receiving buffer data #0:
    Address: 0xa3000000
    Size: 10240
    Pattern: 0x5555aaaa
    Buffer @0xffff96126000 (size 10240) successfully validated with pattern 0x5555aaaa

    Completed 1 buffer updates successfully on rpmsg-char-8-1309

    TEST STATUS: PASSED

  • Hello Michael,

    Introductions and an FYI about academy pages

    I'm the guy currently maintaining the zerocopy example (and the author of the multicore academy).

    Glad to hear you were able to get things running with the dma-buf allocation. To be honest that is the way I usually test the zerocopy example, I do not think I have tried to use the CMA allocation for a while since we don't define an allocation by default on some of the other devices that use the example.

    Heads-up on the academy pages: there was a bug in the backend that got mad when we pushed the SDK 10.0 version of the academy last week. The website is trying to show the "latest" version, but it is only looking at the first digit instead of the full number. So it filters out the SDK 9.2 version, but then sees that 1 < 9, and tries to show the filtered out pages. We should fix it within the next couple of days, but until then you can use the "manage versions" tool to manually enable the SDK 9.2 version of the docs:

    Onto your question

    What version of Linux SDK and MCU+ SDK are you using?

    I am not sure whether we support general purpose development on the AM62Ax C7 at this point in time. I am reassigning your thread to a team member more familiar with the C7 to comment on existing C7 resources.

    Regards,

    Nick

  • Hi Nick,

    Thanks for your response.  I will reread some of the multicore stuff using the right version info to see if any major changes are there.

    We are using version 10.0.0.8 of the Linux SDK (ported to our SOM) and 10.00.00.14 MCU+ SDK.

    Totally understand that we might be trying to do stuff that is outside TI's planned support for using the C7 with AM62A.  The AI support is very impressive, but we have a couple of customers that are looking to add new features to designs using the L138 DSP and are prodding us to see if we could support some flavor of AM62 that would answer the mail for that.

    With regards,

    Mike

  • Hi Michael,

    Thanks for the interest in AM62A.

    Our offering at this time is focused on vision and EdgeAI and we currently don`t fully support use of C7x on AM62A as general purpose DSP. However, we would like to understand your near term needs to consider it in our future planning. Please, reach out to your local TI contact to discuss this further.

    Best regards,

    Qutaiba