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.

evm5515 - dsp bios 5.33.6 - problem with PRD object

Other Parts Discussed in Thread: TMS320C5515

Hi,

I use DSP_BIOS in my project. And I have to use a period function
whose period is 4ms.
My DSP EVM is TMS320C5515. The CPU frequency is 100MHz.

I have the below configuration in the tcf file:

bios.PRD.create("PRD0");

bios.PRD.instance("PRD0").order = 2;

bios.PRD.instance("PRD0").mode = "one-shot";

bios.PWRM.ENABLE = 1;

bios.PWRM.ENABLE = 0;

bios.TSK.create("TSK0");

bios.TSK.instance("TSK0").order = 3;

bios.TSK.instance("TSK0").fxn = prog.extern("task0");

bios.GIO.ENABLEGIO = 0;

bios.PRD.create("PRD1");

bios.PRD.instance("PRD1").order = 1;

bios.PRD.instance("PRD1").mode = "one-shot";

bios.PRD.instance("PRD1").comment = "W_CTS timer";

bios.PRD.instance("PRD1").fxn = prog.extern("timer_f_wcts");

bios.PRD.instance("PRD1").period = 4000;

 

bios.CLK.MICROSECONDS = 1000.0000;

I defined timer_f_wcts() procedure in my code

I use the TIMER0 as high resolution timer. And set the Microseconds/Int field to
1000.0.

I implemented timer_f_wcts()procedure and I called PRD_Start(&PRD1) from my main

I set one breakpoint in timer_f_wcts() Run the program but the program doesn't stop in timer_f_wcts()

I tried the same with 2 ticks period

Any help will be highly appreciated!

  • You could try a couple of things:

    1.  You said you wanted a 4 ms period.  Can you change the PRD1 period to 4?  Currently 4000 would mean 4000 ms or 4 seconds

    bios.PRD.instance("PRD1").period = 4;

    2.  If that doesn't work, can you try change the mode from "one-shot" to "continuous"?

    3.  If that still doesn't work, its most likely that your timer is not ticking or is not initialized correctly.

    I would try to make sure the Timer is ticking correctly because this is used to driver the PRD.

    Judah