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.

AM3352: How to implement periodical timer interrupt function on AM3352 under SYS/BIOS

Part Number: AM3352
Other Parts Discussed in Thread: TMDXICE3359, AM3359

My customer is using CCS to debug the AM3352 via the XDS200.

Timer interrupt behavior does not work well.

When they created the SYS/BIOS Timer by Add on app.cfg and started debugging with the XDS200

it does not stop with the main function.

If you do not use the above and create it in their source code,

The Timer create function displays ADP_stopped exception 0x801*** in the Console and does not work.

In case the first argument of Timer_create  is Timer_any, they have above situation.

In case they increase the number, The return value will be NULL and will result in an error.

Is there anything that they should implement ?

How can they call a function periodically?

  • Hello Sakuma-san,

    These kind of issues happen most likely because the clocks for the timers are not enabled. The Clock Module registers need to be programed to enable the clocks for the timers. This can be done through either CCS GEL file or C source code:

    • Through CCS GEL file: attached AM3359 ICE GEL file is for your reference. Please pay attention to EnableTimers_32KHz(). You can also compare this file with <ccs installation folder>\ccs\ccs_base\emulation\boards\ice_am3359\gel\TMDXICE3359.gel and find the difference. You'll need to make similar changes to the GEL file you use.
    • Through C source code: please refer to AM335x PDK starterware, the following source files:
      1. pdk_am335x_1_0_17\packages\ti\starterware\soc\am335x\am335x_prcm.c. Please look for code "case CHIPDB_MOD_ID_DMTIMER".
      2. pdk_am335x_1_0_17\packages\ti\starterware\soc\am335x\am335x_control.c. Please look at function SOCCtrlTimerClkSrcSelect()
      3. You'll also need to use the PINMUX tool to add timers as documented here.


    I would recommend to start with CCS GEL file which is much simpler and verify the timer works fine. Source code changes can be implemented when the application moves to production stage.

    Hope this is helpful.