DSPRelated.com
Forums

Timer Initialisation Error

Started by arav...@gmail.com August 20, 2008
Hai,
I am trying to use a timer in my code.I would like to configure a timer(Timer0 or Timer1).I have configured a timer using the following functions.

TIMER_Config TimConfig = {
0x0089, /* tcr */
0x0000, /* prd */
0xFFFF /* prsc */
};

hTimer=TIMER_open(TIMER_DEV1,0);
TIMER_config(hTimer,&TimConfig);
But when i build the code i am getting the error

"C:/CCStudio_v3.1/C5500/csl/include/csl_timhal.h", line 544: fatal error: #error TIMER Hal Module Not Supported on Specified Target

what is the reason? Is it due to the wrong Initialization of the Timer?If it is wrong initialization pls give me the correct order for timer initialization.

Thanks and Regards
Aravind.C.R
Aravind-

> I am trying to use a timer in my code.I would like to configure a
> timer(Timer0 or Timer1).I have configured a timer using the following
> functions.
>
> TIMER_Config TimConfig = {
> 0x0089, /* tcr */
> 0x0000, /* prd */
> 0xFFFF /* prsc */
> };
>
> hTimer=TIMER_open(TIMER_DEV1,0);
> TIMER_config(hTimer,&TimConfig);
>
> But when i build the code i am getting the error
>
> "C:/CCStudio_v3.1/C5500/csl/include/csl_timhal.h", line 544: fatal error:
> #error TIMER Hal Module Not Supported on Specified Target
>
> what is the reason? Is it due to the wrong Initialization of the Timer?
> If it is wrong initialization pls give me the correct order for timer
> initialization.

You are forgetting some important information here, such as:

-what is your target? (which DSP)?

-are you building code for a real board (like
DSK board) or for simulation?

It's time-consuming and it's not fun to answer questions that require time just to
get info needed to give an answer. I suggest to always specify your DSP type and
some info about you're doing when you post a question.

-Jeff
Which processor are you trying to do this on?
-Sima

On Wed, Aug 20, 2008 at 1:25 PM, wrote:

> Hai,
> I am trying to use a timer in my code.I would like to configure a
> timer(Timer0 or Timer1).I have configured a timer using the following
> functions.
>
> TIMER_Config TimConfig = {
> 0x0089, /* tcr */
> 0x0000, /* prd */
> 0xFFFF /* prsc */
> };
>
> hTimer=TIMER_open(TIMER_DEV1,0);
> TIMER_config(hTimer,&TimConfig);
>
> But when i build the code i am getting the error
>
> "C:/CCStudio_v3.1/C5500/csl/include/csl_timhal.h", line 544: fatal error:
> #error TIMER Hal Module Not Supported on Specified Target
>
> what is the reason? Is it due to the wrong Initialization of the Timer?If
> it is wrong initialization pls give me the correct order for timer
> initialization.
>
> Thanks and Regards
> Aravind.C.R
>
>
Hai,
Sorry for the mistake.......My Processor is TMS320VC5502 DSP.
I am trying to use a timer in my code.I would like to configure a timer(Timer0 or Timer1).I have configured a timer using the following functions.
>
>TIMER_Config TimConfig = {
>0x0089, /* tcr */
>0x0000, /* prd */
>0xFFFF /* prsc */
>};
>
> hTimer=TIMER_open(TIMER_DEV1,0);
> TIMER_config(hTimer,&TimConfig);
>But when i build the code i am getting the error
>
>"C:/CCStudio_v3.1/C5500/csl/include/csl_timhal.h", line 544: fatal error: #error TIMER Hal Module Not Supported on Specified Target
>
>what is the reason? Is it due to the wrong Initialization of the Timer?If it is wrong initialization pls give me the correct order for timer initialization.
>
>Thanks and Regards
>Aravind.C.R
Aravind-

> Sorry for the mistake.......My Processor is TMS320VC5502 DSP.

Ok. Repeat -- what is the board type? Or are you using simulator?

There are differences in timer, GPIO, and other peripherals on various C55x devices.
In CCS Project | Build Options | Compiler "Target Version" field, what is set? Also
do you have CHIP_5502 defined? Look inside your csl_chiphal.h file. Do you see this
code:

#ifdef CHIP_5502
#undef CHIP_5502
#define CHIP_5502 1
#else
#define CHIP_5502 0
#endif

If you define CHIP_5502 in CCS (Preprocessor section of Build Options), then you
should get CHIP_5502 set to 1. Does that happen?

Also you can search the group archive for this subject (should be some posts in early
July):

c5510 output port

to see another discussion compilation differences between C55x devices (for GPIO, not
timer, but will give you some more clues).

-Jeff

> > I am trying to use a timer in my code.I would like to configure a
> > timer(Timer0 or Timer1).I have configured a timer using the
> > following functions.
> >
> >TIMER_Config TimConfig = {
> >0x0089, /* tcr */
> >0x0000, /* prd */
> >0xFFFF /* prsc */
> >};
> >
> > hTimer=TIMER_open(TIMER_DEV1,0);
> > TIMER_config(hTimer,&TimConfig);
> >But when i build the code i am getting the error
> >
> >"C:/CCStudio_v3.1/C5500/csl/include/csl_timhal.h", line 544: fatal
> > error: #error TIMER Hal Module Not Supported on Specified Target
> >
> > what is the reason? Is it due to the wrong Initialization of the
> > Timer?If it is wrong initialization pls give me the correct order
> > for timer initialization.
> >
> >Thanks and Regards
> >Aravind.C.R
Aravind-
> i am using a real board and not a simulator......i dint get u,
> what the Board Type....The Board that i am working is developed by Us.
>

The board can be a TI DSK board, a third-party board, or -- as in your case --
application-specific.

You don't have a TI 5502 DSK board? You might consider to get that, otherwise
debugging your board without a "known good" reference will be more difficult.

-Jeff

PS. Please post to the group.
> On Thu, Aug 21, 2008 at 7:22 PM, Jeff Brower wrote:
>
> Aravind-
> > Sorry for the mistake.......My Processor is TMS320VC5502 DSP.
> Ok. Repeat -- what is the board type? Or are you using simulator?
>
> There are differences in timer, GPIO, and other peripherals on various
> C55x devices.
> In CCS Project | Build Options | Compiler "Target Version" field, what is
> set? Also
> do you have CHIP_5502 defined? Look inside your csl_chiphal.h file. Do
> you see this
> code:
>
> #ifdef CHIP_5502
> #undef CHIP_5502
> #define CHIP_5502 1
> #else
> #define CHIP_5502 0
> #endif
>
> If you define CHIP_5502 in CCS (Preprocessor section of Build Options),
> then you
> should get CHIP_5502 set to 1. Does that happen?
>
> Also you can search the group archive for this subject (should be some
> posts in early
> July):
>
> c5510 output port
>
> to see another discussion compilation differences between C55x devices
> (for GPIO, not
> timer, but will give you some more clues).
>
> -Jeff
> > > I am trying to use a timer in my code.I would like to configure a
> > > timer(Timer0 or Timer1).I have configured a timer using the
> > > following functions.
> > >
> > >TIMER_Config TimConfig = {
> > >0x0089, /* tcr */
> > >0x0000, /* prd */
> > >0xFFFF /* prsc */
> > >};
> > >
> > > hTimer=TIMER_open(TIMER_DEV1,0);
> > > TIMER_config(hTimer,&TimConfig);
> > >But when i build the code i am getting the error
> > >
> > >"C:/CCStudio_v3.1/C5500/csl/include/csl_timhal.h", line 544: fatal
> > > error: #error TIMER Hal Module Not Supported on Specified Target
> > >
> > > what is the reason? Is it due to the wrong Initialization of the
> > > Timer?If it is wrong initialization pls give me the correct order
> > > for timer initialization.
> > >
> > >Thanks and Regards
> > >Aravind.C.R
> --
> Aravind
>
My processor is TMS320VC5502.I am using a real board not a simulator

On Wed, Aug 20, 2008 at 10:23 PM, Sima Baymani wrote:

> Which processor are you trying to do this on?
> -Sima
>
> On Wed, Aug 20, 2008 at 1:25 PM, wrote:
>
>> Hai,
>> I am trying to use a timer in my code.I would like to configure a
>> timer(Timer0 or Timer1).I have configured a timer using the following
>> functions.
>>
>> TIMER_Config TimConfig = {
>> 0x0089, /* tcr */
>> 0x0000, /* prd */
>> 0xFFFF /* prsc */
>> };
>>
>> hTimer=TIMER_open(TIMER_DEV1,0);
>> TIMER_config(hTimer,&TimConfig);
>>
>> But when i build the code i am getting the error
>>
>> "C:/CCStudio_v3.1/C5500/csl/include/csl_timhal.h", line 544: fatal error:
>> #error TIMER Hal Module Not Supported on Specified Target
>>
>> what is the reason? Is it due to the wrong Initialization of the Timer?If
>> it is wrong initialization pls give me the correct order for timer
>> initialization.
>>
>> Thanks and Regards
>> Aravind.C.R
>>
>

--
Aravind
Hi,

I used to work on a custom board with a c5501 using DSP/BIOS. I initialized
my timers simply by writing the timer registers during system initialization
(when main function is run, before any threads are executed). Below are
parts of my timer initialization:

----------------------------------

perPortRegSet(0x003A,0x8000); //timer signal selection register. Determine
what to do when WDT is zero

perPortRegSet(0x0000,0x2410); //Timer control reg 1 0x0040 one time

perPortRegSet(0x0001,0x2402); //Emulator man. 0x0001
perPortRegSet(0x0000,0x2403); //Clock speed. Fast peripheral

perPortRegSet(0x0000,0x2408); //CNT1
perPortRegSet(0x0000,0x2409); //CNT2
perPortRegSet(0x0000,0x240A); //CNT3
perPortRegSet(0x0000,0x240B); //CNT4
----------------------------------

perPortRegSet is an assembly function for writing I/O mapped peripheral
registers.

As usual, my way may be very unconventional but I got it to work.

Good luck, and don't forget to be very specific when you ask your questions!

-Sima

On Thu, Aug 21, 2008 at 4:13 PM, Aravind. C. R wrote:

> My processor is TMS320VC5502.I am using a real board not a simulator
>
> On Wed, Aug 20, 2008 at 10:23 PM, Sima Baymani wrote:
>
>> Which processor are you trying to do this on?
>> -Sima
>>
>> On Wed, Aug 20, 2008 at 1:25 PM, wrote:
>>
>>> Hai,
>>> I am trying to use a timer in my code.I would like to configure a
>>> timer(Timer0 or Timer1).I have configured a timer using the following
>>> functions.
>>>
>>> TIMER_Config TimConfig = {
>>> 0x0089, /* tcr */
>>> 0x0000, /* prd */
>>> 0xFFFF /* prsc */
>>> };
>>>
>>> hTimer=TIMER_open(TIMER_DEV1,0);
>>> TIMER_config(hTimer,&TimConfig);
>>>
>>> But when i build the code i am getting the error
>>>
>>> "C:/CCStudio_v3.1/C5500/csl/include/csl_timhal.h", line 544: fatal error:
>>> #error TIMER Hal Module Not Supported on Specified Target
>>>
>>> what is the reason? Is it due to the wrong Initialization of the Timer?If
>>> it is wrong initialization pls give me the correct order for timer
>>> initialization.
>>>
>>> Thanks and Regards
>>> Aravind.C.R
>>>
> --
> Aravind
>
>