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.

Linux/AM5728: IPC examples crash on loading in DSP

Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Linux

I have been following the instructions to build and run the IPC examples for the AM5728 on the IDK board, but I am now having problems when trying to load the firmware for the ex02_messageq example onto the DSP1 of the SOC. I have linked the new server_dsp1.xe66 file to /lib/firmware/dra7-dsp1-fw.xe66, but when I go to load it with the unbind, bind sequence there is a crash in the DSP. See output below:

root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 40800000.dsp > unbind 
[  643.390844] omap_hwmod: mmu1_dsp1: _wait_target_disable failed
[  643.403893] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
[  643.409953] remoteproc remoteproc2: stopped remote processor 40800000.dsp
[  643.416969] remoteproc remoteproc2: releasing 40800000.dsp
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo    
41000000.dsp/ 55020000.ipu/ 58820000.ipu/ bind          module/       uevent        unbind
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 40800000.dsp > bind
[  673.678190] omap-rproc 40800000.dsp: assigned reserved memory node dsp1_cma@99000000
[  673.686099] remoteproc remoteproc2: 40800000.dsp is available
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# [  673.696869] remoteproc remoteproc2: powerinp
[  673.705949] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 4206180
[  673.720860] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
[  673.726760] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
[  673.732698] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
[  673.748086] virtio_rpmsg_bus virtio2: rpmsg host is online
[  673.753610] remoteproc remoteproc2: crash detected in 40800000.dsp: type watchdog
[  673.761192] remoteproc remoteproc2: registered virtio2 (type 7)
[  673.767143] remoteproc remoteproc2: remote processor 40800000.dsp is now up
[  673.774813] remoteproc remoteproc2: handling crash #1 in 40800000.dsp
[  673.781316] remoteproc remoteproc2: recovering 40800000.dsp
[  673.800912] omap_hwmod: mmu1_dsp1: _wait_target_disable failed
[  673.813972] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
[  673.819912] remoteproc remoteproc2: stopped remote processor 40800000.dsp
[  673.826738] remoteproc remoteproc2: powering up 40800000.dsp
[  673.837408] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 4206180
[  673.852300] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
[  673.858195] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
[  673.864134] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
[  673.882852] virtio_rpmsg_bus virtio2: rpmsg host is online
[  673.888407] remoteproc remoteproc2: crash detected in 40800000.dsp: type watchdog
[  673.896004] remoteproc remoteproc2: registered virtio2 (type 7)
[  673.901984] remoteproc remoteproc2: remote processor 40800000.dsp is now up
[  673.909516] virtio_rpmsg_bus virtio2: creating channel rpmsg-proto addr 0x3d

Then when I try to run the message_q example from the host by calling `./app_host DSP1`, I get the following output:

root@am57xx-evm:~/ex02_messageq/host/bin/debug# ./app_host DSP1
--> main:
--> Main_main:
--> App_create:
App_create: Failed opening MessageQ
<-- App_create:
<-- Main_main:
<-- main:

What could be going wrong?

  • Hello,

    Which version of Processor SDK are you using?
  • I am using ti-processor-sdk-linux-am57xx-evm-04.03.00.05
  • I will try to reproduce this on my end. In the meantime, can you try using the images provided by Rex in the following thread?

  • Using the binary files that Rex provided did make the IPC example run successfully. Below is my output:

    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 40800000.dsp > bind
    [  878.398350] omap-rproc 40800000.dsp: assigned reserved memory node dsp1_cma@99000000
    [  878.406255] remoteproc remoteproc2: 40800000.dsp is available
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# [  878.419325] remoteproc remoteproc2: powering up 40800000.dsp
    [  878.428560] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 4663976
    [  878.443402] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    [  878.449298] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
    [  878.455243] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
    [  878.469976] alloc_contig_range: [99600, 99700) PFNs busy
    [  878.481976] virtio_rpmsg_bus virtio2: rpmsg host is online
    [  878.487528] remoteproc remoteproc2: registered virtio2 (type 7)
    [  878.493529] remoteproc remoteproc2: remote processor 40800000.dsp is now up
    [  878.501217] virtio_rpmsg_bus virtio2: creating channel rpmsg-proto addr 0x3d
    [  878.508534] omap-rproc 40800000.dsp: received echo reply from 40800000.dsp

    root@am57xx-evm:~/ex02_ti_prebuilt# ./app_host DSP1
    --> main:
    [ 1157.500415] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
    [ 1157.506318] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
    [ 1157.512279] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
    --> Main_main:
    --> App_create:
    App_create: Host is ready
    <-- App_create:
    --> App_exec:
    App_exec: sending message 1
    App_exec: sending message 2
    App_exec: sending message 3
    App_exec: message received, sending message 4
    App_exec: message received, sending message 5
    App_exec: message received, sending message 6
    App_exec: message received, sending message 7
    App_exec: message received, sending message 8
    App_exec: message received, sending message 9
    App_exec: message received, sending message 10
    App_exec: message received, sending message 11
    App_exec: message received, sending message 12
    App_exec: message received, sending message 13
    App_exec: message received, sending message 14
    App_exec: message received, sending message 15
    App_exec: message received
    App_exec: message received
    App_exec: message received
    <-- App_exec: 0
    --> App_delete:
    <-- App_delete:
    <-- Main_main:
    <-- main:

    Is there a bug in the source code for the IPC examples for the current SDK version? If so, can you identify where it is and provide updated code?

  • We confirmed this is a bug in the release and will be fixed in v5.0.

    The root cause is that the timer is not properly configured. To fix this, make the following modifications to Dsp1.cfg:

    var Clock = xdc.useModule('ti.sysbios.knl.Clock');

    Clock.tickSource = Clock.TickSource_NULL;  <--Remove

    //Clock.tickSource = Clock.TickSource_USER; <--Uncomment

    /* Configure BIOS clock source as GPTimer5 */

    //Clock.timerId = 0;

     

    var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');

     

    /* Skip the Timer frequency verification check. Need to remove this later */

    Timer.checkFrequency = false;

     

    /* Match this to the SYS_CLK frequency sourcing the dmTimers.

    * Not needed once the SYS/BIOS family settings is updated. */

    Timer.intFreq.hi = 0;

    Timer.intFreq.lo = 19200000;

     

    //var timerParams = new Timer.Params(); <--Uncomment

    //timerParams.period = Clock.tickPeriod; <--Uncomment

    //timerParams.periodType = Timer.PeriodType_MICROSECS; <--Uncomment

    /* Switch off Software Reset to make the below settings effective */

    //timerParams.tiocpCfg.softreset = 0x0;  <--Uncomment

    /* Smart-idle wake-up-capable mode */

    //timerParams.tiocpCfg.idlemode = 0x3; <--Uncomment

    /* Wake-up generation for Overflow */

    //timerParams.twer.ovf_wup_ena = 0x1; <--Uncomment

    //Timer.create(Clock.timerId, Clock.doTick, timerParams); <--Uncomment

  • I tried editing the cfg file in this way, rebuilding, and rebinding the DSP device but I still see crash detected in the dmesg.
  • We also needed to configure the TimerId. The following cfg file should have all the fixes to get it working:

    Dsp1.cfg

  • Thanks, that fixed it. Could you point me in the direction where I could learn about how what the purpose of that file is so that I can understand why this fixes the issue?