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.

RTOS: Vision SDK- IPU1 Timers reconfiguration

Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hello all,

We are using Dra7xx Processor & VSDk 3.04 version.

We are planing to  use different timers for IPU1 instead of timer 3 in vision sdk .

File:/links_fw/src/rtos/bios_app_common/tda2xx/ipu1_0/Ipu1_0_a15_linux.cfg

/* allocate timer 3 for Clock and 11 DMTimestamp to IPU1 */

Suppose i need to configure for timer 12. 

var timerParams = new Timer.Params();
timerParams.period = 1000;
timerParams.twer.ovf_wup_ena = 1;
timerParams.tiocpCfg.emufree = 1;
timerParams.tiocpCfg.idlemode = 1;
timerParams.tsicr.posted = 0;
Timer.intFreqs[11].hi = 0;
Timer.intFreqs[11].lo = 20000000;
Timer.checkFrequency = false;
Timer.create(2, '&mainIPU1_C0TimerTick', timerParams);

Can  I proceed with the above configuration ?  What does the first parameter in Timer.create  shows ?

Regards,

Gokul

  • Hello all,

    We are getting below error if we modify the timers.

    make -s -j
    # Invoking configuro...
    configuring MAIN_APP_ipu1_0.xem4 from package/cfg/MAIN_APP_ipu1_0_pem4.cfg ...
    Loading Ipu1_0.cfg for tda2xx-evm
    # !!! Current build platform is [tda2xx-evm] !!!
    # !!! Including CPU #0 [ HOST ] in build !!!
    # !!! Including CPU #1 [ IPU1-0 ] in build !!!
    # !!! Host Proc ID is [1] !!!
    error: ti.sysbios.timers.dmtimer.Timer: "/data/home/gnagarajan/test/display/vsdk_3dot4/ti_components/os_tools/bios_6_46_04_53/packages/ti/sysbios/timers/dmtimer/Timer.xs", line 2200: ti.sysbios.timers.dmtimer.Timer.Instance#0 : Timer device unavailable.
    js: "/data/home/gnagarajan/test/display/vsdk_3dot4/ti_components/os_tools/linux/xdctools_3_32_01_22_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!
    gmake: *** [package/cfg/MAIN_APP_ipu1_0_pem4.xdl] Error 1
    Warning: directory "/packages" on package path does not exist
    js: "/data/home/gnagarajan/test/display/vsdk_3dot4/ti_components/os_tools/linux/xdctools_3_32_01_22_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    make[6]: *** [xdc_configuro] Error 1
    make[5]: *** [apps_ipu1_0] Error 2
    make[4]: *** [apps] Error 2
    make[3]: *** [apps] Error 2
    make[2]: *** [apps_exe] Error 2
    make[1]: *** [apps] Error 2
    make: *** [vision_sdk] Error 2

    Regards,
    Gokul
  • Gokul

    you need to take care a few things here if you want to use timer 12 instead of timer 3 for IPU1-0

    1. Make sure timer 12 is not used by any other resource/IP/cores

    2. Also make sure you does the PRCM from uboot to enable/power-on timer 12

    I noticed some issues in your cfg file configuration as well 

    1. set the mask correctly, we need 2 timers for each cores, for IPU1-0

    timer 11 for DM timstamp

    timer 12 for clock

    then mask should be 0x0C00, set as below

    TimerSupport.availMask = 0x0C00;

    2. You are passing wrong timer ID while "Timer.create. You should use as below

    Timer.create(11, '&mainIPU1_C0TimerTick', timerParams);"

    regards, Shiju

  • Hi Shiju,

    We tried to use timer 16. We have changed as below.

    diff --git a/links_fw/src/rtos/bios_app_common/tda2xx/ipu1_0/Ipu1_0_a15_linux.cfg b/links_fw/src/rtos/bios_app_common/tda2xx/ipu1_0/Ipu1_0_a15_linux.cfg

    index c84558d..a43bbc3 100644

    --- a/links_fw/src/rtos/bios_app_common/tda2xx/ipu1_0/Ipu1_0_a15_linux.cfg

    +++ b/links_fw/src/rtos/bios_app_common/tda2xx/ipu1_0/Ipu1_0_a15_linux.cfg

    @@ -73,7 +73,7 @@ Clock.tickSource = Clock.TickSource_USER;

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

    /* allocate timer 3 for Clock and 11 DMTimestamp to IPU1 */

    var TimerSupport = xdc.useModule('ti.sysbios.family.shared.vayu.TimerSupport');

    -TimerSupport.availMask = 0x0404;

    +TimerSupport.availMask = 0x8400;

    var timerParams = new Timer.Params();

    timerParams.period = 1000;

    @@ -81,10 +81,10 @@ timerParams.twer.ovf_wup_ena = 1;

    timerParams.tiocpCfg.emufree = 1;

    timerParams.tiocpCfg.idlemode = 1;

    timerParams.tsicr.posted = 0;

    -Timer.intFreqs[2].hi = 0;

    -Timer.intFreqs[2].lo = 20000000;

    +Timer.intFreqs[15].hi = 0;

    +Timer.intFreqs[15].lo = 20000000;

    Timer.checkFrequency = false;

    -Timer.create(2, '&mainIPU1_C0TimerTick', timerParams);

    +Timer.create(15, '&mainIPU1_C0TimerTick', timerParams);

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

    DMTimer.checkFrequency = false;

    But still We have problem  in build. Can you please support on this ?

    Loading Ipu1_0.cfg for tda2xx-evm
    # !!! Current build platform is [tda2xx-evm] !!!
    # !!! Including CPU #0 [ HOST ] in build !!!
    # !!! Including CPU #1 [ IPU1-0 ] in build !!!
    # !!! Host Proc ID is [1] !!!
    ### Generating System memory map header file ...
    ### Generating System memory map header file ... DONE !!!
    error: ti.sysbios.timers.dmtimer.Timer: "/data/home/gnagarajan/test/display/vsdk_3dot4/ti_components/os_tools/bios_6_46_04_53/packages/ti/sysbios/timers/dmtimer/Timer.xs", line 2366: ti.sysbios.timers.dmtimer.Timer intNum: Timer intNum is not valid. Please use DMTimer module's timerSettings config param to set the intNum for this timer.
    js: "/data/home/gnagarajan/test/display/vsdk_3dot4/ti_components/os_tools/linux/xdctools_3_32_01_22_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!
    gmake: *** [package/cfg/MAIN_APP_ipu1_0_pem4.xdl] Error 1
    Warning: directory "/packages" on package path does not exist
    js: "/data/home/gnagarajan/test/display/vsdk_3dot4/ti_components/os_tools/linux/xdctools_3_32_01_22_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.

    Regards,

    Gokul

  • Gokul
    I am not sure timer 16 is there for TDA2Ex SoC, please double check (TRM)
    BTW, why are you changing from DM Timer 12 to 16 again? I guess you were trying to change from Timer 2 to 12 last time?

    regards, Shiju
  • Shiju,

    We are using DRA7xx Processor.  I am not confident on using timer 12. (Considering clock source & other things ) . So I switched to timer 16. Can you please check my configuration. ?

    I am not able to build with timer16, Can anyone try from your end ?

    Regards,
    Gokul

  • Gokul

    I haven't used Timer 16 in VSDK.  This needs to be validated, will take some effort. 

    BTW, Does timer 12 worked for you?

    regards, Shiju

  • Shiju,

    I tried the required configuration for timer 12 . But i couldn't able to build.

    Is timer12 validated from VSDK ?

    Regards,
    Gokul
  • Gokul
    No, timer 12 also not used, I have used below ones for TDA2xx

    Timer ID PRCM from Functionality CPU where it used
    ======== ========== ============ ==================
    DM Timer-5 Linux MLO Bios Timer Tick DSP1 - 2
    DM Timer-6 Linux MLO Timestamp Provider DSP1 - 2
    DM Timer-13 Linux MLO Bios Timer Tick EVE1-4
    DM Timer-14 Linux MLO Timestamp Provider EVE1-4
    DM Timer-9 Linux MLO Bios Timer Tick IPU1 Sub System
    DM Timer-11 Linux MLO Timestamp Provider IPU1 Sub System
    DM Timer-9 Linux MLO Bios Timer Tick IPU2 Sub System
    DM Timer-11 Linux MLO Timestamp Provider IPU2 Sub System


    regards, Shiju
  • Hi Shiju,

    We are not using EVE1, DSP1-2 in our VSDK.

    it is mentioned, allocate timer 3 for Clock and 11 DMTimestamp to IPU1. (In the file links_fw/src/rtos/bios_app_common/tda2xx/ipu1_0/Ipu1_0_a15_linux.cfg.)

    Can I use timer5  in place of timer3 ? 

    Regards,

    Gokul

     

  • Hi Gokul
    If you are not enabling DSP in your build, then timer 5 can be used instead of 3 for IPU1

    regards, Shiju
  • Hi Shiju/Shravan,

    I  tried using timer5. We have build problem.Can you please try from your end & confirm ?

    diff --git a/links_fw/src/rtos/bios_app_common/tda2xx/ipu1_0/Ipu1_0_a15_linux.cfg b/links_fw/src/rtos/bios_app_common/tda2xx/ipu1_0/Ipu1_0_a15_linux.cfg

    index c84558d..cb4ea33 100644

    --- a/links_fw/src/rtos/bios_app_common/tda2xx/ipu1_0/Ipu1_0_a15_linux.cfg

    +++ b/links_fw/src/rtos/bios_app_common/tda2xx/ipu1_0/Ipu1_0_a15_linux.cfg

    @@ -73,7 +73,7 @@ Clock.tickSource = Clock.TickSource_USER;

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

    /* allocate timer 3 for Clock and 11 DMTimestamp to IPU1 */

    var TimerSupport = xdc.useModule('ti.sysbios.family.shared.vayu.TimerSupport');

    -TimerSupport.availMask = 0x0404;

    +TimerSupport.availMask = 0x0410;

    var timerParams = new Timer.Params();

    timerParams.period = 1000;

    @@ -81,10 +81,10 @@ timerParams.twer.ovf_wup_ena = 1;

    timerParams.tiocpCfg.emufree = 1;

    timerParams.tiocpCfg.idlemode = 1;

    timerParams.tsicr.posted = 0;

    -Timer.intFreqs[2].hi = 0;

    -Timer.intFreqs[2].lo = 20000000;

    +Timer.intFreqs[4].hi = 0;

    +Timer.intFreqs[4].lo = 20000000;

    Timer.checkFrequency = false;

    -Timer.create(2, '&mainIPU1_C0TimerTick', timerParams);

    +Timer.create(4, '&mainIPU1_C0TimerTick', timerParams);

    ===========================================================================================

    Build error

    =========

    ### Generating System memory map header file ... DONE !!!
    error: ti.sysbios.timers.dmtimer.Timer: "/data/home/gnagarajan/test/display/vsdk_3dot4/ti_components/os_tools/bios_6_46_04_53/packages/ti/sysbios/timers/dmtimer/Timer.xs", line 2366: ti.sysbios.timers.dmtimer.Timer intNum: Timer intNum is not valid. Please use DMTimer module's timerSettings config param to set the intNum for this timer.
    js: "/data/home/gnagarajan/test/display/vsdk_3dot4/ti_components/os_tools/linux/xdctools_3_32_01_22_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!
    gmake: *** [package/cfg/MAIN_APP_ipu1_0_pem4.xdl] Error 1
    Warning: directory "/packages" on package path does not exist
    js: "/data/home/gnagarajan/test/display/vsdk_3dot4/ti_components/os_tools/linux/xdctools_3_32_01_22_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    make[6]: *** [xdc_configuro] Error 1
    make[5]: *** [apps_ipu1_0] Error 2
    make[4]: *** [apps] Error 2
    make[3]: *** [apps] Error 2
    make[2]: *** [apps_exe] Error 2
    make[1]: *** [apps] Error 2
    make: *** [vision_sdk] Error 2

    Regards,

    Gokul

  • Gokul
    which all timers are you using now?

    regards, Shiju
  • Shiju,

    1. Timers 3 -is used for DSP,

    2. From kernel dts , I see below timers are used.

    timer3,timer4,timer9,timer11,timer7,timer8

    &ipu2 {
    status = "okay";
    memory-region = <&ipu2_cma_pool>;
    mboxes = <&mailbox6 &mbox_ipu2_ipc3x>;
    timers = <&timer3>;
    watchdog-timers = <&timer4>, <&timer9>;
    };

    &ipu1 {
    status = "okay";
    memory-region = <&ipu1_cma_pool>;
    mboxes = <&mailbox5 &mbox_ipu1_ipc3x>;
    timers = <&timer11>;
    watchdog-timers = <&timer7>, <&timer8>;
    };

    &ipu1 {
    status= "okay";
    /delete-property/ watchdog-timers;
    };




    Regards,
    Gokul
  • Gokul
    I want to know which timers you used for all the CPUs in your build
    I expect 2 timers per core
    Please refer the Cfg files under \vision_sdk\links_fw\src\rtos\bios_app_common\tda2xx (refer xxxx_a15_linux.cfg as this one is used for Linux build)
    I also request you to check that those timers are enabled in uboot/kernel and also make sure they do not conflict with watchdog-timers

    Can you please let me know, why do you want to modify the VSDK timer allocation logic?

    regards, Shiju
  • Hi Shiju,

    We find there is resource conflict between DSP & IPU1 which uses timer3. So we want to see different timer in IPU1 . Since we are not using DSP in VSDK, we are planning to use timer5.

    It is mentioned as "allocate timer 3 for Clock and 11 DMTimestamp to IPU1 " in file /links_fw/src/rtos/bios_app_common/tda2xx/ipu1_0/Ipu1_0_a15_linux.cfg

    My question is, why we are not able to build with timer5 ?

    Shall we have a discussion ?

    Regards,
    Gokul
  • Gokul
    yes, I think a discussion would be better to close this issue.
    Can you please set-up one for tomorrow 11AM

    regards, Shiju
  • Gokul

    Can you use DM timer 9 for IPU1-0 and this will free-up timer 3 for your DSP.

    You need to modify the timer allocation logic in DTS file as well, use timer 9 for IPU1-0 and then use some other timer for watchdog

    regards, Shiju

  • Shiju,

    Have you tried with this timer ? Are you able to build with this timer ?

    Regards,
    Gokul
  • Gokul

    Yes build went through, did not try running the UC.

    regards, Shiju