Looks like it should work.... have you remembered to disable the watchdog timer and anything else that could cause an unscheduled reset?