{"action":"opened","issue":{"url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/4970","repository_url":"https://api.github.com/repos/MarlinFirmware/Marlin","labels_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/4970/labels{/name}","comments_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/4970/comments","events_url":"https://api.github.com/repos/MarlinFirmware/Marlin/issues/4970/events","html_url":"https://github.com/MarlinFirmware/Marlin/issues/4970","id":181832457,"number":4970,"title":"Is the use of USE_WATCHDOG safe?","user":{"login":"Sebastianv650","id":10776877,"avatar_url":"https://avatars.githubusercontent.com/u/10776877?v=3","gravatar_id":"","url":"https://api.github.com/users/Sebastianv650","html_url":"https://github.com/Sebastianv650","followers_url":"https://api.github.com/users/Sebastianv650/followers","following_url":"https://api.github.com/users/Sebastianv650/following{/other_user}","gists_url":"https://api.github.com/users/Sebastianv650/gists{/gist_id}","starred_url":"https://api.github.com/users/Sebastianv650/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sebastianv650/subscriptions","organizations_url":"https://api.github.com/users/Sebastianv650/orgs","repos_url":"https://api.github.com/users/Sebastianv650/repos","events_url":"https://api.github.com/users/Sebastianv650/events{/privacy}","received_events_url":"https://api.github.com/users/Sebastianv650/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-08T15:40:22Z","updated_at":"2016-10-08T15:40:22Z","closed_at":null,"body":"Most likely I get the meaning of the following comments regarding the watchdog from Configuration_adv wrong:\r\n\r\n// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.\r\n// The \"WATCHDOG_RESET_MANUAL\" goes around this by not using the hardware reset.\r\n//  However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.\r\n\r\nFor me, this means the use of the watchdog is unsafe: If USE_WATCHDOG is enabled and WATCHDOG_RESET_MANUAL isn't, the ArduinoMega will hang forever (until a power cycle). If WATCHDOG_RESET_MANUAL is also enabled it will only work depending on the interrupt enabled/disabled state.\r\n\r\nI guess this feature is safe in some way, because it's enabled by default. Maybe someone understanding this feature could add some words, why it is good to have it enabled even when there is a power cycle necessary if the watchdog resets the board?"}}
{"actor":{"display_login":"Sebastianv650"}}