STLstartup.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. ******************************************************************************
  3. * @file STLstartup.h
  4. * @author MCD Application Team
  5. * @version V1.0.0
  6. * @date May-2012
  7. * @brief This file contains the prototype of the FailSafe routines
  8. * and the very first elf-test function to be executed after
  9. * the reset.
  10. ******************************************************************************
  11. * @copyright
  12. *
  13. * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
  14. *
  15. * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  16. * You may not use this file except in compliance with the License.
  17. * You may obtain a copy of the License at:
  18. *
  19. * http://www.st.com/software_license_agreement_liberty_v2
  20. *
  21. * Unless required by applicable law or agreed to in writing, software
  22. * distributed under the License is distributed on an "AS IS" BASIS,
  23. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24. * See the License for the specific language governing permissions and
  25. * limitations under the License.
  26. */
  27. /* Define to prevent recursive inclusion -------------------------------------*/
  28. #ifndef __SELF_TEST_START_UP_H
  29. #define __SELF_TEST_START_UP_H
  30. /* Includes ------------------------------------------------------------------*/
  31. #include "gd32f30x_libopt.h"
  32. /* Private defines -----------------------------------------------------------*/
  33. #define RCC_PINRSTF 0x04000000uL
  34. #define RCC_PORRSTF 0x08000000uL
  35. #define RCC_SFTRSTF 0x10000000uL
  36. #define RCC_IWDGRSTF 0x20000000uL
  37. #define RCC_WWDGRSTF 0x40000000uL
  38. #define RCC_LPWRRSTF 0x80000000uL
  39. /* Private macros ------------------------------------------------------------*/
  40. #define RCC_flag_set(a) ((fl_sts & (a)) == (a))
  41. #define RCC_flag_reset(a) ((fl_sts & (a)) == 0u)
  42. /* Exported types ------------------------------------------------------------*/
  43. /* Exported constants --------------------------------------------------------*/
  44. /* Exported macro ------------------------------------------------------------*/
  45. /* Exported functions ------------------------------------------------------- */
  46. void STL_StartUp(void);
  47. void FailSafe(void);
  48. void FailSafeCPU(void);
  49. void STL_WDGSelfTest(void);
  50. #endif /* __SELF_TEST_START_UP_H */
  51. /******************* (C) COPYRIGHT STMicroelectronics *****END OF FILE****/