RTC WDT0 Not understanding

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

cross mob
Anonymous
Not applicable

Hi

   

 

   

Can anyone give me some advise on using the watch dog timers.

   

I have selected it as having an interrupt every 1 second.

   

But not exactly sure what to call, or how to write the interrupt.

   

I am sure there is a app note but I am having hard time finding it.

   

 

   

Thanks for your time

   

M S FOSTER

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

Have a look here.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob 

   

Not to sure how to implement this.

   

I am trying to Toggle a LED every second.

   

I am using the WDT to update the RTC.

   

Not sure if I am going about this the right way.

   

Thanks for your time 

   

M S FOSTER

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

Clock settings depend a bit on which PSoC4 you are using. Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Bob

   

Sorry about the mess in the code, I am really new to programing .

   

 

   

Thanks for your time.

   

M S FOSTER

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

Try to enable another WDT and drop a Global Signal component on your topdesign.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob 

   

Got it working.

   

Used the watch dog timer callback for timer 0.

   

Set it to periodic instead of watchdog.

   

0 being timer

   

SysTickIsrHandler being the ISR

   

CySysWdtSetInterruptCallback(0,SysTickIsrHandler);

   

 

   

Thanks for your support 

   

M S FOSTER

0 Likes
Anonymous
Not applicable

Hi Foster,

   

I am trying to implement something similar where I want to use a low freq timer to generate an interrupt every 10ms without resetting the device. Just to clarify, you are using the WDT to just generate an interrupt that toggles an LED, not a reset ?

   

Thanks,

   

Abha 

0 Likes
Anonymous
Not applicable

Hi Abha

   

Timer0 is set up to make a interrupt every 1 second. Set up as periodic timer.

   

Low Feq clock = 32.768kHz

   

Time needed 1 second

   

32768  clock cycles needed.

   

 

   

The problem when using the LFClock WCO is that you cant get exactly 10 ms 

   

Close you can get is 100.208 Hz.When set to 327.

   

You would be better off using a timer component 🙂

   

 

   

Thanks 

   

M S Foster

0 Likes
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

By the way...

   

I have actually something similar to your project at work. I did not choose a display yet, which one are you using? (link to datasheet??)

   

My untested(!!!) display driver attached. A tip: Put the resistors into the segment path, when the resistor is in the common path the digits will be lit differently bright, dependent on the number of segments on. Ie. a "one" would be brighter than an "eight",

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Bob

   

Using TDCY1060m.

   

My code is set up so that they all display at the same rate ~ 60 hz.

   

I put Resistors on cathodes. to limit part list.

   

Then just changed the delay between each led cycle in cycle.

   

Thanks for your time

   

M S FOSTER

0 Likes