system_saml11e16a.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /**
  2. * \file
  3. *
  4. * \brief System configuration file for ATSAML11E16A
  5. *
  6. * Copyright (c) 2018 Microchip Technology Inc.
  7. *
  8. * \license_start
  9. *
  10. * \page License
  11. *
  12. * SPDX-License-Identifier: Apache-2.0
  13. *
  14. * Licensed under the Apache License, Version 2.0 (the "License");
  15. * you may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License at
  17. *
  18. * http://www.apache.org/licenses/LICENSE-2.0
  19. *
  20. * Unless required by applicable law or agreed to in writing, software
  21. * distributed under the License is distributed on an "AS IS" BASIS,
  22. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23. * See the License for the specific language governing permissions and
  24. * limitations under the License.
  25. *
  26. * \license_stop
  27. *
  28. */
  29. #include "saml11e16a.h"
  30. /** \cond 0 */
  31. /* *INDENT-OFF* */
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. /* *INDENT-ON* */
  36. /** \endcond */
  37. /**
  38. * Initial system clock frequency. The System RC Oscillator (RCSYS) provides
  39. * the source for the main clock at chip startup.
  40. */
  41. #define __SYSTEM_CLOCK (4000000)
  42. uint32_t SystemCoreClock = __SYSTEM_CLOCK; /*!< System Clock Frequency (Core Clock)*/
  43. /**
  44. * Initialize the system
  45. *
  46. * \brief Setup the microcontroller system.
  47. * Initialize the System and update the SystemCoreClock variable.
  48. */
  49. void SystemInit(void)
  50. {
  51. // Keep the default device state after reset
  52. SystemCoreClock = __SYSTEM_CLOCK;
  53. return;
  54. }
  55. /**
  56. * Update SystemCoreClock variable
  57. *
  58. * \brief Updates the SystemCoreClock with current core Clock
  59. * retrieved from cpu registers.
  60. */
  61. void SystemCoreClockUpdate(void)
  62. {
  63. // Not implemented
  64. SystemCoreClock = __SYSTEM_CLOCK;
  65. return;
  66. }
  67. /** \cond 0 */
  68. /* *INDENT-OFF* */
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72. /* *INDENT-ON* */
  73. /** \endcond */