stm32fxx_STLclock.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /**
  2. ******************************************************************************
  3. * @file stm32fxx_STLclock.h
  4. * @author MCD Application Team
  5. * @version V2.2.0
  6. * @date 19-June-2017
  7. * @brief This file contains the prototype of test function for
  8. * clock circuitry and frequency at start-up.
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
  13. *
  14. * Redistribution and use in source and binary forms, with or without modification,
  15. * are permitted provided that the following conditions are met:
  16. * 1. Redistributions of source code must retain the above copyright notice,
  17. * this list of conditions and the following disclaimer.
  18. * 2. Redistributions in binary form must reproduce the above copyright notice,
  19. * this list of conditions and the following disclaimer in the documentation
  20. * and/or other materials provided with the distribution.
  21. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  22. * may be used to endorse or promote products derived from this software
  23. * without specific prior written permission.
  24. *
  25. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  26. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  27. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  28. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  29. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  30. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  31. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  32. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  33. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. *
  36. ******************************************************************************
  37. */
  38. /* Define to prevent recursive inclusion -------------------------------------*/
  39. #ifndef __STL_CLOCK_H
  40. #define __STL_CLOCK_H
  41. /* Includes ------------------------------------------------------------------*/
  42. /* Exported types ------------------------------------------------------------*/
  43. typedef enum {
  44. LSI_START_FAIL,
  45. HSE_START_FAIL,
  46. HSI_HSE_SWITCH_FAIL,
  47. TEST_ONGOING,
  48. EXT_SOURCE_FAIL,
  49. XCROSS_CONFIG_FAIL,
  50. HSE_HSI_SWITCH_FAIL,
  51. PLL_OFF_FAIL,
  52. CLASS_B_VAR_FAIL,
  53. CTRL_FLOW_ERROR,
  54. FREQ_OK
  55. } ClockStatus;
  56. /* Exported constants --------------------------------------------------------*/
  57. /* Exported macro ------------------------------------------------------------*/
  58. /* Exported functions ------------------------------------------------------- */
  59. ClockStatus STL_ClockStartUpTest(void);
  60. ClockStatus STL_MainClockTest(void);
  61. ErrorStatus STL_InitClock_Xcross_Measurement(void);
  62. #endif /* __STL_CLOCK_H */
  63. /******************* (C) COPYRIGHT STMicroelectronics *****END OF FILE****/