/******************************************************************************
 * @file     system_spc1168.c
 * @brief    CMSIS Device System Source File for SPC1168 Device Series
 * @version  V4.0.3
 * @date     30-July-2026
 *
 * @note
 * Copyright (C) 2022 Spintrol Electronic Technology (Shanghai) Co., Ltd.. All rights reserved.
 *
 * @attention
 * THIS SOFTWARE JUST PROVIDES CUSTOMERS WITH CODING INFORMATION REGARDING 
 * THEIR PRODUCTS, WHICH AIMS AT SAVING TIME FOR THEM. SPINTROL SHALL NOT BE
 * LIABLE FOR THE USE OF THE SOFTWARE. SPINTROL DOES NOT GUARANTEE THE 
 * CORRECTNESS OF THIS SOFTWARE AND RESERVES THE RIGHT TO MODIFY THE SOFTWARE 
 * WITHOUT NOTIFICATION.
 *
 ******************************************************************************/

#include "spc1168.h"




/**
 *  @brief  System Information Data Variable
 */
SysInfoStruct SysInfo = {
    __RCO0_CLOCK,               /* u32SRCCLK[0] RCO0 clock frequency     */
    __RCO1_CLOCK,               /* u32SRCCLK[1] RCO1 clock frequency    */
    32000000U,                  /* u32SRCCLK[2] XO clock frequency        */
    0,                          /* u32SRCCLK[3] PLL clock frequency        */
    __RCO0_CLOCK,               /*!< HCLK(CPU Core) Frequency             */
    __RCO0_CLOCK,               /*!< PCLK Frequency                       */
    __RCO0_CLOCK,               /*!< SYSCLK0 Frequency                    */
    __RCO0_CLOCK,               /*!< SYSCLK1 Frequency                    */            
    __RCO0_CLOCK,               /*!< WDT0CLK Frequency                    */
    __RCO0_CLOCK,               /*!< WDT1CLK Frequency                    */
    0,                          /* i32SHOffset                             */
    0,                          /* i32SHGain                             */
};




/******************************************************************************
 * @brief      Initialize the system
 *
 * @param[in]  none
 *
 * @return     none
 *
 ******************************************************************************/
#if defined(__ICCARM__)
#pragma optimize=low
#endif
void SystemInit (void)
{
  #if (__FPU_USED == 1)
    SCB->CPACR |= ((3UL << 10*2) |                 /* set CP10 Full Access */
                   (3UL << 11*2)  );               /* set CP11 Full Access */
  #endif

#ifdef UNALIGNED_SUPPORT_DISABLE
  SCB->CCR |= SCB_CCR_UNALIGN_TRP_Msk;
#endif

}


/******************* Copyright (C) 2022 Spintrol Electronic Technology (Shanghai) Co., Ltd. ***** END OF FILE ****/
