/******************************************************************************
 * @file     system_spc1168.h
 * @brief    CMSIS Device System Header File for SPC1168 Device Series
 * @version  V4.0.0
 * @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.
 *
 ******************************************************************************/


#ifndef SYSTEM_ARMCM4_H
#define SYSTEM_ARMCM4_H

#ifdef __cplusplus
extern "C" {
#endif


#include "stdint.h"


/**
 *  @brief  System Information Structure Declaration
 */
typedef struct
{
    uint32_t u32SRCCLK[4];                    /* u32SRCCLK[0] RCO0 clock frequency */
                                              /* u32SRCCLK[1] RCO1 clock frequency */
                                              /* u32SRCCLK[2] XO clock frequency   */
                                              /* u32SRCCLK[3] PLL clock frequency  */
    uint32_t u32HCLK;                         /*!< HCLK(CPU Core) Frequency        */
    uint32_t u32PCLK;                         /*!< PCLK Frequency                  */
    uint32_t u32SYSCLK0;                      /*!< SYSCLK0 Frequency               */
    uint32_t u32SYSCLK1;                      /*!< SYSCLK1 Frequency               */
    uint32_t u32WDT0CLK;                      /*!< WDT0CLK Frequency               */
    uint32_t u32WDT1CLK;                      /*!< WDT1CLK Frequency               */
    int32_t  i32SHOffset;
    int32_t  i32SHGain;
} SysInfoStruct;




/**
 *  @brief  System information data
 */
extern SysInfoStruct SysInfo;




/******************************************************************************
 * @brief      Initialize the system
 *             Setup the microcontroller system
 *
 * @param[in]  none
 *
 * @return     none
 *
 ******************************************************************************/
extern void SystemInit(void);




/******************************************************************************
 * @brief      Updates the SystemCoreClock with current core Clock
 *             retrieved from cpu registers.
 *
 * @param[in]  none
 *
 * @return     none
 *
 ******************************************************************************/
extern void SystemCoreClockUpdate(void);


#ifdef __cplusplus
}
#endif

#endif /* SYSTEM_SPC1168_H */


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