The watchdog is just a counter, when it reaches maximum count it internally causes a system reset. The instruction to clear it sets it back to zero.
1. enable the watchdog
2. reset it in your program loop.
The idea is your program resets it while running so normally you would place it in a loop, possibly your main() loop or maybe before a routine you know will take a long time to complete. If you program crashes, the watchdog counter DOESN'T get cleared so it forces your program to restart.
You need to post the whole code for us to help with errors, without knowing what 'RR' and 'cycle' are it doesn't make any sense and without any comments it is difficult to see what it is supposed to do.
Brian.