PCF85263A watchdog

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PCF85263A watchdog

377 Views
shin_g
Contributor I

I want to use the PCF85263A watchdog, but I don't know how to control the INTA pulse width.

 

0 Kudos
Reply
2 Replies

369 Views
giraffe508
Contributor IV

HI @shin_g 

The PCF85263A is a Real-Time Clock (RTC) and calendar with an integrated watchdog function. To control the INTA pulse width, you need to configure the watchdog settings in the PCF85263A's registers.


First, you need to enable the watchdog function by setting the appropriate bits in the Control_1 register (address 00h). To do this, you can use the following code snippet:


 uint8_t control_1 = 0; control_1 |= (1 << 3); // Enable watchdog // Write the updated control_1 value to the Control_1 register write_register(0x00, control_1); 

Next, you need to configure the watchdog timer's time base and pulse width by setting the appropriate bits in the Watchdog register (address 0Eh). The time base can be set to 1s, 1min, or 1h, and the pulse width can be set to 62.5ms, 125ms, 250ms, or 500ms. For example, to set the time base to 1s and the pulse width to 125ms, you can use the following code snippet:


 uint8_t watchdog = 0; watchdog |= (0 << 6); // Set time base to 1s watchdog |= (1 << 4); // Set pulse width to 125ms // Write the updated watchdog value to the Watchdog register write_register(0x0E, watchdog); 

Finally, you need to set the watchdog timer's value by writing to the Watchdog Timer Value register (address 0Fh). For example, to set the timer value to 10 seconds, you can use the following code snippet:


 uint8_t timer_value = 10; // Set timer value to 10 seconds write_register(0x0F, timer_value); 

For more information on configuring the PCF85263A watchdog, you can refer to the PCF85263A datasheet and the AN11734 application note.</

 
0 Kudos
Reply

122 Views
Manoj12
Contributor I

Hi sir,

 

I have studied this PCF85263A datasheet but didn't help please share the example code for this watch dog if you have it would be really helpful

 

Thank you,

Manu

0 Kudos
Reply