NANO103 BSP V3.01.004
The Board Support Package for Nano103 Series
Functions | Variables
system_Nano103.c File Reference

Nano103 system clock init code. More...

#include <stdint.h>
#include "Nano103.h"
Include dependency graph for system_Nano103.c:

Go to the source code of this file.

Functions

uint32_t SysGet_PLLClockFreq (void)
 Calculate current PLL clock frequency. More...
 
uint32_t SysGet_HCLKFreq (void)
 Get current HCLK clock frequency. More...
 
void SystemCoreClockUpdate (void)
 This function is used to update the variable SystemCoreClock and must be called whenever the core clock is changed. More...
 
void SystemInit (void)
 Support PA9 in 32-pin package and adjust LXT gain level. Should call with register protection disabled. More...
 

Variables

uint32_t SystemCoreClock = __HSI
 
uint32_t CyclesPerUs = (__HSI / 1000000)
 

Detailed Description

Nano103 system clock init code.

Version
V1.00
Revision
7
Date
16/04/29 6:58p
Note
SPDX-License-Identifier: Apache-2.0 Copyright (C) 2015~2018 Nuvoton Technology Corp. All rights reserved.

Definition in file system_Nano103.c.

Function Documentation

◆ SysGet_HCLKFreq()

uint32_t SysGet_HCLKFreq ( void  )

Get current HCLK clock frequency.

Parameters
None.
Returns
HCLK clock frequency. The clock UNIT is in Hz.

Definition at line 78 of file system_Nano103.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SystemCoreClockUpdate()

void SystemCoreClockUpdate ( void  )

This function is used to update the variable SystemCoreClock and must be called whenever the core clock is changed.

Updates the SystemCoreClock with current core Clock retrieved from CPU registers.

Parameters
None.
Return values
None.

Definition at line 134 of file system_Nano103.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SystemInit()

void SystemInit ( void  )

Support PA9 in 32-pin package and adjust LXT gain level. Should call with register protection disabled.

Initialize the system

Returns
none

Definition at line 148 of file system_Nano103.c.

Variable Documentation

◆ CyclesPerUs

uint32_t CyclesPerUs = (__HSI / 1000000)

Cycles per micro second

Definition at line 21 of file system_Nano103.c.

◆ SystemCoreClock

uint32_t SystemCoreClock = __HSI

System Clock Frequency (Core Clock)

Definition at line 20 of file system_Nano103.c.