Reset Timer module in Firmware

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello all,

   

As per the Timer data sheet module, "It can be reset or enabled by either hardware or firmware". I need to reset my timer module within the firmware. Please instruct me on how to proceed with. Using PSoC 5LP.

   

 

   

 

   

Thank you.
-Anuradha
 

0 Likes
7 Replies
Anonymous
Not applicable

Sorry ... !

   

This should be moved to PSoC5 Architecture Topics I guess.

   

-Anuradha

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You may issue a Timer_Stop() and a Timer_Enable();

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Dear Bob,

   

Thanks for the reply.
It works for me.

   

Thanks.
-Anuradha

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are always welcome!

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hello,

   

Again in little bit of trouble. When timer being implemented in UDB mode, any descrepency from this to reset it?
As per the data sheet, the description for void Timer_Stop(void) function is as follows.
"For fixed-function implementations this disables the Timer and powers it down. For UDB implementations the Timer is disabled only in software enable modes."

   

 

   

Any clarification on this is appreciated.

   

Thnaks.
-Anuradha
 

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Keep in mind the beauty of Creator and PSOC is you can generate a quick test project

   

and get an answer.

   

 

   

You can also set the properties and then look at generated Stop() in code to see what

   

effect it had.

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The generated code for UDB description is

   

 

   

/*******************************************************************************
* Function Name: Timer_Stop
********************************************************************************
*
* Summary:
*  The stop function halts the timer, but does not change any modes or disable
*  interrupts.
*
* Parameters:
*  void
*
* Return:
*  void
*
* Side Effects: If the Enable mode is set to Hardware only then this function
*               has no effect on the operation of the timer.

   

 

   

So if you want timer to stop with a Timer_Stop() its enable properties have to be set to

   

Software only or Software and Hardware.

   

 

   

Regards, Dana.

0 Likes