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.

TDA4VM: Using UDMA Copy on MCU2_1

Part Number: TDA4VM

Hello,

We have been working with PSDK RTOS 06_02_00_21 so far.
And now we are working on migrating our code base to PSDK RTOS 07_00_00_11 (and in the future to 07_01_00_11).

There is system hanging observed only when our custom node is running on MCU2_1.
When our custom node is running on MCU2_0 - no hanging is observed. But we need it to be running on MCU2_1 for performance reasons.
The same node runs on another IPU with no hanging observed in PSDK RTOS 06_02_00_21.
In PSDK RTOS 07_00_00_11 the master IPU was changed from MCU2_1 to MCU2_0.

After some debugging we found out that the reason of the hanging was a UDMA copy call from the node running on MCU2_1.

The UDMA Copy is being initialized successfully based on the logs from sourcing vision_apps_init.sh
[MCU2_1]      3.928359 s: UDMA: Init ... !!!
[MCU2_1]      3.929261 s: UDMA: Init ... Done !!!

We are using the following function for udma copying:

appUdmaCopy1D(NULL, &prms);

And the hanging occurs at: vision_apps/utils/udma/src/app_udma.c, fn: appUdmaTransfer

SemaphoreP_pend(ch_obj->transfer_done_sem, SemaphoreP_WAIT_FOREVER);

The hanging is not observed when the node is running on MCU2_0. It was not observed in PSDK RTOS 06_02_00_21 as well.
Any suggestions or recommendations would be appreciated!

Best Regards,
Todor

  • Todor,

    The MCU2_1 on SDK 7.0 does not seem to have any UDMA channel allocated by RM config. How many channels are you planning to use?

    You can take a look at the channel config here, under MCU2_1

    <PSDKRA_INSTALL_PATH>/ti-processor-sdk-rtos-j721e-evm-07_01_00_11/pdk_jacinto_07_01_00_45/packages/ti/drv/udma/soc/j721e/udma_rmcfg.c 

    If you need some channels on MCU2_1 you will have to modify rm_cfg.c as mentioned in section 8.8.4 here,

    Please try and let us know.


    Regards,

    Shyam

  • Hello Shyam,

    We are planning to use one UDMA channel.
    After taking a look at both files we are not sure what exactly should be modified for our case.

    In udma_rmcfg.c file for MCU2_1 numBlkCopyCh is 1. There are no errors on UDMA init.

    Also - after generating sysfw.itb file from the PSDKLA - is it involved in any way in the PSDKRA build process or it is enough to copy it to the BOOT partition on the SD card.
    And finally - after generating the sysfw.itb file do we need to re-build the PSDKLA or the prebuilt PSDKLA image will be sufficient?

    Thank you for the support!

    Best Regards,
    Todor

  • Hello Shyam,

    Could you comment Todor's questions?

    BR

    Simo

  • Hi Todor,

    Let me try this today and get back to you soon. Sorry for the delay.


    Regards,
    Shyam

  • Hi Tordor,

    I was able to reproduce this issue on SDK 7.0 but the same seems to be running fine in SDK 7.1

    If you are migrated to 7.1 then you wont be seeing this issue. if you are wiling to stay on 7.0 then we will have to provide you a patch.

    Please let me know your preference.

    Regards,
    Shyam

  • Hi Tordor,

    If you are working with SDK 7.0, you will need to apply this patch (attached) to ti-processor-sdk-linux-automotive-j7-evm-07_00_00\k3-image-gen-2020.04a files and rebuild sysfw.itb as mentioned in the link here. Once built you can rename the generated sysfw-j721e-evm.itb to sysfw-psdkra.itb and sysfw.itb (both) and replace the one on <SD_CARD>/BOOT partition.