text: /*******************************************************************************
    System Initialization File
  
    File Name:
      initialization.c
  
    Summary:
      This file contains source code necessary to initialize the system.
  
    Description:
      This file contains source code necessary to initialize the system.  It
      implements the "SYS_Initialize" function, defines the configuration bits,
      and allocates any necessary global system resources,
   *******************************************************************************/
  
  // DOM-IGNORE-BEGIN
  /*******************************************************************************
  * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
  *
  * Subject to your compliance with these terms, you may use Microchip software
  * and any derivatives exclusively with Microchip products. It is your
  * responsibility to comply with third party license terms applicable to your
  * use of third party software (including open source software) that may
  * accompany Microchip software.
  *
  * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
  * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
  * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
  * PARTICULAR PURPOSE.
  *
  * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
  * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
  * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
  * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
  * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
  * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
  * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
   *******************************************************************************/
  // DOM-IGNORE-END
  
  // *****************************************************************************
  // *****************************************************************************
  // Section: Included Files
  // *****************************************************************************
  // *****************************************************************************
  #include "definitions.h"
  #include "device.h"
  
  
  
  // ****************************************************************************
  // ****************************************************************************
  // Section: Configuration Bits
  // ****************************************************************************
  // ****************************************************************************
  #pragma config BOD33_DIS = SET
  #pragma config BOD33USERLEVEL = 0x1c
  #pragma config BOD33_ACTION = RESET
  #pragma config BOD33_HYST = 0x2
  #pragma config NVMCTRL_BOOTPROT = 0
  #pragma config NVMCTRL_SEESBLK = 0x0
  #pragma config NVMCTRL_SEEPSZ = 0x0
  #pragma config RAMECC_ECCDIS = SET
  #pragma config WDT_ENABLE = CLEAR
  #pragma config WDT_ALWAYSON = CLEAR
  #pragma config WDT_PER = CYC8192
  #pragma config WDT_WINDOW = CYC8192
  #pragma config WDT_EWOFFSET = CYC8192
  #pragma config WDT_WEN = CLEAR
  #pragma config NVMCTRL_REGION_LOCKS = 0xffffffff
  
  
  
  
  // *****************************************************************************
  // *****************************************************************************
  // Section: Driver Initialization Data
  // *****************************************************************************
  // *****************************************************************************
  
  
  // *****************************************************************************
  // *****************************************************************************
  // Section: System Data
  // *****************************************************************************
  // *****************************************************************************
  
  // *****************************************************************************
  // *****************************************************************************
  // Section: Library/Stack Initialization Data
  // *****************************************************************************
  // *****************************************************************************
  
  
  // *****************************************************************************
  // *****************************************************************************
  // Section: System Initialization
  // *****************************************************************************
  // *****************************************************************************
  
  
  
  // *****************************************************************************
  // *****************************************************************************
  // Section: Local initialization functions
  // *****************************************************************************
  // *****************************************************************************
  
  
  
  /*******************************************************************************
    Function:
      void SYS_Initialize ( void *data )
  
    Summary:
      Initializes the board, services, drivers, application and other modules.
  
    Remarks:
   */
  
  void SYS_Initialize ( void* data )
  {
      NVMCTRL_Initialize( );
  
    
      PORT_Initialize();
  
      CLOCK_Initialize();
  
  
  
  
      SERCOM3_I2C_Initialize();
  
      SERCOM2_USART_Initialize();
  
      EVSYS_Initialize();
  
      DMAC_Initialize();
  
      EIC_Initialize();
  
      RTC_Initialize();
  
  
  
  
  
      NVIC_Initialize();
  
  }
  
  
  /*******************************************************************************
   End of File
  */
  