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.

PRD module

Other Parts Discussed in Thread: CCSTUDIO

Hello,

I am trying to activate PRD module for periodic function to pop up every 400ms.

I am trying to configure this from tcf GUI. This is the steps I made:

1. Added new  PRD0 object through PRD Manager.

2. defined my_func() in properties of PRD0. mode - continuous petiod/ticks is 400.

3. In CLK Manager Properties I used TIMER1, 32-bit chaned, Reset timer and TIMMODE is checked, Microseconds/count is 1000.

4. In PRD Properties I set "Use CLK Manager to drive PRD" option.

5. Enabled Timer Interrupt (HW15).  <-- do I have to?

6. in main file I post: SWI_post(&PRD_swi)   <-- do I have to?

But the software does not stops in my_func().

What do I miss?

Thank You

Arye

 

  • In step 2, be sure you use the assembly version of the label, so _my_func should be entered as the function name.

    Do not change the defaults in 3, 4, 5, and 6 until you get it working with the default settings. Start over so you get the defaults again.

    Do you get build errors?

  • Arye Lerner said:
    2. defined my_func() in properties of PRD0. mode - continuous petiod/ticks is 400.

    I am assuming you have done this as you did not mention receiving any build errors but make sure you define the function with a leading underscore inside the PRD object properties (_my_func).

    Arye Lerner said:
    5. Enabled Timer Interrupt (HW15).  <-- do I have to?
    No.

    Arye Lerner said:
    6. in main file I post: SWI_post(&PRD_swi)   <-- do I have to?
    No. The PRD swi is called from within BIOS without any user intervention required.

    Are you working on hardware or simulator? The simulator runs slower than the actual hardware as everything is essentially interpreted and could be why you do not see the PRD call my_func(). If you are using hardware I do not see any immediate reasons why this would fail.

  • Hi,

    I am using OMAPL137 EVM of spectrum digital.

    I compile without errors. I am using Hardware interrupt dispatcher, if it matters.

    Randy, You mentioned to use defaults - where can I get example of project with working PRD functions?

    Thank You

    Arye

  • Please see the project below as an example:

    C:\CCStudio_v3.3\bios_5_33_05\packages\ti\bios\examples\basic\bigtime\evmOMAPL137\bigtime.pjt

    it uses PRD.

  • Hi,

    Thank You guys and Mariana,

    It was disabled TIMER interrupt, that caused the problem.

    Regards

    Arye