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.

[FAQ] AM625: How to configure Timer in Interrupt mode

Part Number: AM625
Other Parts Discussed in Thread: SYSCONFIG

Lets have a look at the implementation of application using a TIMER module(DM TIMER) in Interupt mode of operation.

The application code can be used as it is or as a baseline for configuring the TIMER in Interrupt Mode of Operation in MCU+ SDK.

  • The code can be viewed here:

    /* Timer timeout callback function */
    
    
    volatile uint32_t loopCount = 0;
    
    void TimerCallback(void *args)
    {
        loopCount++;
    }
    
    void empty_main(void *args)
    {
        /* Open drivers to open the UART driver for console */
        Drivers_open();
        Board_driversOpen();
    
        TimerP_start(gTimerBaseAddr[CONFIG_TIMER0]);
    
        while(1){
            DebugP_log("Loop Count : %u !!\r\n", loopCount);
        }
    
        Board_driversClose();
        Drivers_close();
    }

    NOTE: CONFIG_TIMER0 is defined by the user in SysConfig tool itself as shown below. The API TimerCallback is also user-defined and can be mentioned in the SysConfig tool.

    Please refer the SysConfig snippet below: