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.

AM2432: Timer Callback without Interrupt

Part Number: AM2432


Tool/software:

Hi TI Experts,

Customer is working on AM2432 SDK9.2.

As we know normally the timer callback needs to function together with interrupt mode enabled. Customer is asking if they do not enable the interrupt mode, when the timeout happens will the timer still trigger the timer callback function or not?

If the answer is no, is there any other flag bit could tell us the timeout happens

We could not find a timer example in the SDK, could you also suggest an example of timer for customer to follow please?

Thanks,

Kevin

  • Hi Kevin,

    We could not find a timer example in the SDK, could you also suggest an example of timer for customer to follow please?

    This example does not exist at the moment.

    I can let another expert comment on this, he can also provide with a sample application for this.

    Regards,

    Vaibhav

  • Hi Vaibhav, Anil,

    Thank you.

    Let me make it more clear, there are actually two questions in this thread.

    1: An example of timer.

    2: Is timer callback function could be triggered without enabling interrupt mode, if not, do we have any other flag bit could tell us the timeout happens.

    Thanks,

    Kevin

  • Hi Vaibhav:

     Same timer example request should also be ported in the AM64x MCU+ SDK - sometime after v 11.0 please?

    Jim

  • Hello Kevin

    The user call back support is valid in the Interrupt mode. 

    If the user wants to go with the polling Model, user needs to check whether the timer is overflowing or not.

    The below example snippet works for your use case.

    The Timer example is already available in the MCU+SDK 10.1.

    Please look at the paths below.

    C:\ti\mcu_plus_sdk_am64x_10_01_00_32\examples\drivers\timer\timer_interrupt

    C:\ti\mcu_plus_sdk_am64x_10_01_00_32\examples\drivers\gp_timer

        uint32_t status =0 ;
    
        while(1)
        {
             status = TimerP_isOverflowed(gTimerBaseAddr[CONFIG_TIMER0] );
             if(status)
             {
                 TimerP_clearOverflowInt(gTimerBaseAddr[CONFIG_TIMER0] );
    
             }
    
    
        }

    Regards,

    Anil.