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.

PROCESSOR-SDK-AM335X: Timer delay

Part Number: PROCESSOR-SDK-AM335X

Hi,

I am using SKAM335x processor board and TI RTOS on windows host PC.

I want to create a delay through timer. How can I do it? Please elaborate.

Thanks

Gaurav

  • Hi Gaurav,

    I don't know exactly what you mean. I assume you mean you want a delay in a Task using a Timer.

    One approach is to use the OSAL (Operating System Abstraction Layer) Timer API to create & configure the timer. You can pend on a semaphore in the Task in which you required the delay. In the timer ISR, post the semaphore. You can use the OSAL Semaphore to create & configure the timer.

    • OSAL documentation is located here: pdk_am335x_1_0_16\packages\ti\osal\docs\doxygen
    • The OSAL Timer API header file is located here: pdk_am335x_1_0_16\packages\ti\osal\TimerP.h.
    • The OSAL Semaphore API header file is located here: pdk_am335x_1_0_16\packages\ti\osal\SemaphoreP.h.

    You could also directly using Timer & Semaphore APIs provided by SYS/BIOS.

    • Documentation in bios_6_76_02_02/docs/cdoc/index.html
    • For Timer, open ti->sysbios->hal->Timer
    • For Semaphore, open ti->sysbios->knl->Semaphore.

    Regards,
    Frank