esp_int_wdt.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License.
  13. #ifndef __ESP_INT_WDT_H
  14. #define __ESP_INT_WDT_H
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /** @addtogroup Watchdog_APIs
  19. * @{
  20. */
  21. /*
  22. This routine enables a watchdog to catch instances of processes disabling
  23. interrupts for too long, or code within interrupt handlers taking too long.
  24. It does this by setting up a watchdog which gets fed from the FreeRTOS
  25. task switch interrupt. When this watchdog times out, initially it will call
  26. a high-level interrupt routine that will panic FreeRTOS in order to allow
  27. for forensic examination of the state of the CPU. When this interrupt
  28. handler is not called and the watchdog times out a second time, it will
  29. reset the SoC.
  30. This uses the TIMERG1 WDT.
  31. */
  32. /**
  33. * @brief Initialize the interrupt watchdog. This is called in the init code if
  34. * the interrupt watchdog is enabled in menuconfig.
  35. *
  36. */
  37. void esp_int_wdt_init();
  38. /**
  39. * @}
  40. */
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif