SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Macros | Functions
sys-clk.c File Reference
#include <io.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <types.h>
#include <timer.h>
#include <log.h>
#include <sys-clk.h>
Include dependency graph for sys-clk.c:

Macros

#define CPU_UPDATE_OFFSET   (26)
 
#define CPU_LOCK_OFFSET   (28)
 
#define CPU_LOCK_ENABLE_OFFSET   (29)
 

Functions

void sunxi_clk_init (void)
 Initialize the global clocks.
 
void sunxi_clk_dump ()
 Dump all clock-related register values.
 

Macro Definition Documentation

◆ CPU_LOCK_ENABLE_OFFSET

#define CPU_LOCK_ENABLE_OFFSET   (29)

◆ CPU_LOCK_OFFSET

#define CPU_LOCK_OFFSET   (28)

◆ CPU_UPDATE_OFFSET

#define CPU_UPDATE_OFFSET   (26)

Function Documentation

◆ sunxi_clk_dump()

void sunxi_clk_dump ( void  )

Dump all clock-related register values.

This function prints out all clock-related register values for debugging and observation.

◆ sunxi_clk_init()

void sunxi_clk_init ( void  )

Initialize the global clocks.

This function initializes the global clocks, including PLLs and clock dividers.

Initialize the global clocks.

This function configures various clock sources for the CPU, AXI, APB, NSI, and MBUS based on the Sunxi platform's requirements. The function also prints debug messages to track the initialization process.

It performs the following tasks:

Note
This function should be called during the system initialization process to ensure the correct operation of the platform's clock system.
Warning
Ensure that all the clock configuration functions are correctly implemented and tested to avoid system instability.