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/PROCESSOR-SDK-AM335X: DMTimer code

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: SYSBIOS, TMDXEVM3358, TMDSICE3359

Tool/software: TI-RTOS

hi.,

I need DMTimer code ,I searched in "ti-processor-sdk-rtos-am335x-evm-05.03.00.07-Windows-x86-Install" this SDK code. in this on example code is there for timers "timeSync_BasicExample_icev2AM335x_wSocLib_armExampleproject" in this how there using dmtimers I am not getting please any one can example me.

Regards

chandana

  • Hi chandana,

    Simple timeSync example demonstrating sync between Master and Slave. Refer to the below user guide for details:

    RTOS/AM3357: Ethernet/IP Timers - Processors forum - Processors - TI E2E support forums

    e2e.ti.com
    Part Number: AM3357 Other Parts Discussed in Thread: SYSBIOS , AMIC110 Tool/software: TI-RTOS I'm trying to add timers in the Ethernet/IP app v01.00.03.04 and I

    For DMTimer example in RTOS, you might also explore the Timer_test:

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_board.html#timer-test

    Regards,
    Pavel

  • Hi Pavel,

    thank you for your reply ,

    in that example  code ("timeSync_BasicExample_icev2AM335x_wSocLib_armExampleproject" ) TaskP_sleep() function is there that function is timer delay or what. i checked that function to blink LED  that function working as delay program in that there are using DMtimer2. but i am not getting currently in that function there using timer are not..please let me know

    Regards

    chandana

  • chandana,

    Yes, there is timer in TaskP_sleep() -> Task_sleep() function. But this is complex for DMTimer ramp-up. Task_sleep() is defined in below BIOS files:

    bios_6_75_02_00/packages/ti/sysbios/knl/Task.h
    bios_6_75_02_00/packages/ti/sysbios/knl/Task.c

    For RTOS DMTimer rump-up, you can use the diagnostic test (Timer_test) that I have provided pointer to or:

    pdk_am335x_1_0_14/packages/ti/starterware/examples/dmtimer/

    pdk_am335x_1_0_14/packages/ti/starterware/utils/dmtimer_utils.c

    pdk_am335x_1_0_14/packages/ti/osal/test/src/main_osal_test.c

    Regards,
    Pavel

  • Hi Pavel,

    thank you for your reply . i will check  

  • Hi pavel.,

    thank you for your reply. i will check through timer test.

     i have one doubt, in TaskP_sleep() function there are passing one argument as time , that argument  is based on seconds or miliseconds  

  • chandana K S said:
     i have one doubt, in TaskP_sleep() function there are passing one argument as time , that argument  is based on seconds or miliseconds  

    TaskP_sleep() time argument is based on OS ticks. For milliseconds, another function is used - TaskP_sleepInMsecs(). Refer to below files:

    pdk_am335x_1_0_14/packages/ti/osal/TaskP.h

    pdk_am335x_1_0_14/packages/ti/osal/src/tirtos/TaskP_tirtos.c

    Regards,
    Pavel

  • hi pavel,

    i am check through diagnostic test (Timer_test) in this i am getting error like undefined reference to `INTCInit', INTCConfigIntr and CopyVectorTable .

    i am not getting interrupt.c file in base of "ti/starterware/include/interrupt.h" this header file. please help me

    Regards

    chandana

  • Chandana,

    Are you trying to run the timer diagnostic test on TMDSICE3359 board? If yes, please note that this test can be run by default only on TMDXEVM3358 from the AM335x based TI boards.You will need to adjust it for TMDSICE3359 board.

    pdk_am335x_1_0_14/packages/ti/board/diag/makefile

    pdk_am335x_1_0_14/packages/ti/board/diag/timer/makefile

    pdk_am335x_1_0_14/packages/ti/board/diag/timer/build/evmAM335x/armv7/makefile

    Regards,
    Pavel

  • hi pavel,

    no., i am trying to run the timer diagnostic test on TMDXEVM3358  board.

    Regards

    chandana

  • Chandana,

    Can you provide me your steps? I want to review and try on my side.

    Regards,
    Pavel

  •  ya sure pavel.,

    In ti-processor-sdk-rtos-am335x-evm-05.03.00.07-Windows-x86-Install" this SDK code.

    path:  ti\pdk_am335x_1_0_14\packages\ti\board\diag\timer\src\timer_test.c 

    timer_test.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    /**
    * \file timer_test.c
    *
    * \brief Example application main file for 1 millisecond (1msec) timer test.
    *
    * Targeted Functionality: Demonstrating the 1msec clock tick
    * generation by timer module on Sitara platforms.
    *
    * Operation: Test configures the timer module to generate 1msec tick.
    * Interrupts are enabled and test waits till timer generates
    * 'TIMER_1MS_TICK_DURATION' number of interrupts. Test is considered
    * as PASS if wait for interrupt generation equals the number of msecs
    * defined by 'TIMER_1MS_TICK_DURATION'
    *
    * Supported SoCs: AM572x, AM571x, AM437x & AM335x
    *
    * Supported platforms: evmAM572x, idkAM571x, evmAM437x & evmAM335x
    *
    * Note: Timer configurations are SoC specific and test should run fine
    * on different HW platforms of a given SoC without any code changes.
    * New platform support can be added by adding build setup under
    * 'timer/build' folder.
    *
    */
    /*
    * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the
    * distribution.
    *
    * Neither the name of Texas Instruments Incorporated nor the names of
    * its contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    *
    */
    #include <ti/board/diag/timer/src/timer_test.h>
    //#include <timer_test.h>
    #if defined (SOC_AM572x) || defined (SOC_AM571x)
    extern CSL_ArmGicDistIntrf distrIntrf;
    extern CSL_ArmGicCpuIntrf gCpuIntrf;
    #endif
    CSL_ArmGicIntrParams_t gTimerIntrParams;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    i took timer_test code and i am trying but i am getting above errors and also gmake error.

  • hi pavel., 

    i am waiting for your reply..

    what is the issue..., what i want to do..please help me

    Regards

    chandana 

  • Chandana,

    Here are the steps required to run Timer diagnostic test on AM335x EVM board.

    1. Set your environment using pdksetupenv.bat (for Windows machine) or pdksetupenv.sh (for Linux machine).

    2. Compile the diagnostic applications

    cd <PDK>/packages/ti/board/diag
    make evmAM335x

    This will make the diagnostic applications for AM335x EVM. Output files will be located in: <PDK>/packages/ti/board/bin/evmAM335x/

    3. Then you should select which method to use: SD card, McSPI flash or CCS

    CCS method is easiest, thus you can try with it. You need to load and run below file:

    <PDK>/packages/ti/board/bin/evmAM335x/armv7/timer_diagExample_evmAM335x_armv7.out

    For details refer to the below user guide:

    Regards,
    Pavel

  • thank you pavel., i will check

    Regards,

    chandana