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.

[TDA4 C7x UDMA] Meets an issue in UDMA usage.

Hello There,

I create a TIROTS project in C71x based on example"/psdk_rtos_auto_j7_06_01_00_15/pdk/packages/ti/drv/udma/examples/udma_memcpy_test" also linked bios, spi, i2c, CSL ,  udma. uart, osal(tirtos) libs in it.

and found i can push the UDMA TR to ring gTxRingMem, but can't get the reponse from gTxCompRingMem, it seems DMA is not enabled correctly. Could you please help me out?

Thanks a lot!

Best Regards,

Samuel

  • Hi All,

    Today I removed my won code, just test "/psdk_rtos_auto_j7_06_01_00_15/pdk/packages/ti/drv/udma/examples/udma_memcpy_test" in RTOS

    And found:

    1. Need remove "Udma_appC7xPreInit();" in main_tirtos.c. otherwise the program will not enter taskFxn();

    2. UART print is not work, as App_print("UDMA memcpy application started...\n"); will be blocked by UART_printf;

    3. Just remove this uart_printf. and code will block in following

    Is any one can help me solve this urgent issue.

    Thanks a lot!

    Best Regards,

    Samuel

  • Hi All,

    Today I removed my won code, just test "/psdk_rtos_auto_j7_06_01_00_15/pdk/packages/ti/drv/udma/examples/udma_memcpy_test" in RTOS

    And found:

    1. Need remove "Udma_appC7xPreInit();" in main_tirtos.c. otherwise the program will not enter taskFxn();

    2. UART print is not work, as App_print("UDMA memcpy application started...\n"); will be blocked by UART_printf;

    3. Just remove this uart_printf. and code will block in following

    Is any one can help me solve this urgent issue.

    Thanks a lot!

    Best Regards,

    Samuel

  • Hi,

    This is a known issue and it is fixed in latest code.
    Attached the patch file containing the fix.

    From 59cb0936c4019f1399fed8715149aacc2a04f21a Mon Sep 17 00:00:00 2001
    From: Prasad Konnur <prasadkonnur@ti.com>
    Date: Thu, 5 Dec 2019 15:23:51 +0530
    Subject: [PATCH] Bugfix - PRSDK-7531: udma memcpy testapp fails on c7x
    
    Signed-off-by: Prasad Konnur <prasadkonnur@ti.com>
    ---
     packages/ti/board/src/j721e_evm/board_init.c                | 3 +++
     packages/ti/drv/udma/examples/udma_apputils/udma_apputils.c | 3 ---
     packages/ti/drv/udma/soc/V1/udma_soc.c                      | 2 +-
     3 files changed, 4 insertions(+), 4 deletions(-)
     mode change 100644 => 100755 packages/ti/drv/udma/soc/V1/udma_soc.c
    
    diff --git a/packages/ti/board/src/j721e_evm/board_init.c b/packages/ti/board/src/j721e_evm/board_init.c
    index b5d4373..b47f8a8 100755
    --- a/packages/ti/board/src/j721e_evm/board_init.c
    +++ b/packages/ti/board/src/j721e_evm/board_init.c
    @@ -87,6 +87,9 @@ static Board_STATUS Board_sysInit(void)
         if(gBoardSysInitDone == 0)
         {
             Sciclient_configPrmsInit(&config);
    +    #if defined(BUILD_C7X_1)
    +        config.isSecureMode  = 1;
    +    #endif
             ret = Sciclient_init(&config);
     
             if(ret != 0)
    diff --git a/packages/ti/drv/udma/examples/udma_apputils/udma_apputils.c b/packages/ti/drv/udma/examples/udma_apputils/udma_apputils.c
    index 819df26..31ac39b 100755
    --- a/packages/ti/drv/udma/examples/udma_apputils/udma_apputils.c
    +++ b/packages/ti/drv/udma/examples/udma_apputils/udma_apputils.c
    @@ -254,9 +254,6 @@ void Udma_appC7xPreInit(void)
         cfgClec.extEvtNum         = 0;
         cfgClec.c7xEvtNum         = 14;
         CSL_clecConfigEvent(clecBaseAddr, i, &cfgClec);
    -
    -    /* Switch now */
    -    CSL_c7xSecSupv2NonSecSupv();
     #endif
     
         return;
    diff --git a/packages/ti/drv/udma/soc/V1/udma_soc.c b/packages/ti/drv/udma/soc/V1/udma_soc.c
    old mode 100644
    new mode 100755
    index 49fa73f..6eed48b
    --- a/packages/ti/drv/udma/soc/V1/udma_soc.c
    +++ b/packages/ti/drv/udma/soc/V1/udma_soc.c
    @@ -567,7 +567,7 @@ uint32_t Udma_isCacheCoherent(void)
     {
         uint32_t isCacheCoherent;
     
    -#if defined (BUILD_MPU1_0) || defined (BUILD_C7X_1)
    +#if defined (BUILD_MPU1_0)
         isCacheCoherent = TRUE;
     #else
         isCacheCoherent = FALSE;
    -- 
    1.9.1
    
    

    Regards,
    Prasad

  • Hi Prasad,

    Thanks for the reply. I will try this patch asap.

    Best Regards,

    Samuel

  • Hi Prasad,

    Thanks for this patch. i have validated on my side. C71x with RTOS works fine.

    Best Regards,

    Samuel

  • Thanks for confirmation. I am closing this thread.