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.

CCS/AM5728: TI RTOS SDK 5.x: Resources management between drivers (MCASP, CPSW, ..etc)?

Part Number: AM5728

Tool/software: Code Composer Studio

Team,

Trying to use both the CPSW and the McASP on one of the C66x CPU:

There are 2 separate projects (McASP and CPSW) that works well. When we try to merge it in one single application then the McASP does not work.

Can you please clarify how the ressource management (IRQ, EDMA,..etc) is being done between the drivers?
Are there some special care to take when woking with the McASP driver, EDMA LLD and the NDK SW for CPSW?

Thanks in advance,

A.

  • The driver example doesn't have resource management. It is up to the user to take care of it.

    EDMA LLD has a resource manager so if your application allocates EDMA resources like EDMA channel and params via the EDMA resource manger APIs, it will take care of resource sharing.

    For interrupt, user has to manage that and make sure the interrupt number doesn't overlap between the drivers.

    Regards,
    Stanley

  • Hi Stanley,

    [EDITED] Here are the examples and SDK used:
        -processor_sdk_rtos_am57xx_5_01_00_11 for the C66x:
                Basic examples are: MCASP_Audio_evmAM572x_c66ExampleProject
                EMAC_BasicExample_evmAM572x_c66xExampleProject
        -RT Linux SDK 06.00.00.07 (linux-rt-4.19.38+gitAUTOINC+1224cd679e-g1224cd679e) for the ARM side

    When the 2 projects (ie McASP and CPSW) are loaded separately by the ARM then they work without issues.
    However when the code is merge into one single project and loaded then the McASP portion does not work.
    Also when trying to "unbind" the C6000 binary code from Linux gives the below error:

    /sys/bus/platform/drivers/omap-rproc# echo 40800000.dsp > unbind

    [  396.958801] omap-iommu 40d02000.mmu: iommu fault: da 0x952aa080 flags 0x0

    [  396.965631] remoteproc remoteproc0: crash detected in 40800000.dsp: type mmufault

    [  396.973164] omap-iommu 40d02000.mmu: 40d02000.mmu: errs:0x00000002 da:0x952aa080 pgd:0x7f37bd8b *pgd:px00000000

    [  396.993004] remoteproc remoteproc0: stopped remote processor 40800000.dsp

    [  397.000189] remoteproc remoteproc0: releasing 40800000.dsp

       This error doesn't happen if we run the projects separately.


    -Does this error provides any information on where the problem could be?

    BR.

    A.

  • So, what didn't work for McASP in the single project? not getting interrupt?

  • Hi Stanley,

    That's the question:
         - What need to be adapted when merging the 2 projects?
         -Do you have some tips to debug further?
         -Are there any C66x side demos in the SDK that do use the McASP and CPSW simuteneously?

    Thanks in advance!

    A.

  • One issue other has encountered before was some common module, the interrupt controller, being initialized twice after merging 2 projects.

    For examples, both projects reset interrupt controller at the beginning and you have to remove the duplicate one after merging the projects.

  • Hi Stanley,

    You have been correct. Issue was that the IRQ were initialized twice.

    Thanks for your help!

    A.