SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Functions
exception.c File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <types.h>
#include <mmu.h>
#include <timer.h>
#include <log.h>
Include dependency graph for exception.c:

Functions

void abort ()
 
static void show_regs (struct arm_regs_t *regs)
 
void __attribute__ ((weak))
 Pre-initialize system clocks.
 

Function Documentation

◆ __attribute__()

int __attribute__ ( (weak)  )

Pre-initialize system clocks.

Check if a character is available to read from the UART.

Read a character from the UART.

Initialize DRAM controller and memory.

Set CPU PLL frequency.

Get peripheral 1x clock rate.

Initialize USB clocks.

Deinitialize USB clocks.

Dump clock information.

Reset system clocks.

Get high-speed oscillator type.

This weak function performs preliminary clock initialization before the main clock initialization. Platform-specific implementations should override this function.

This weak function returns the type/frequency of the high-speed oscillator (HOSC). The default implementation returns 24 MHz.

Returns
High-speed oscillator frequency in MHz

This weak function resets system clocks to their default state. Platform-specific implementations should override this function.

This weak function dumps information about the current clock configuration for debugging purposes. Platform-specific implementations should override this function.

This weak function deinitializes clocks for USB controllers. Platform-specific implementations should override this function.

This weak function initializes clocks for USB controllers. Platform-specific implementations should override this function.

This weak function returns the frequency of the peripheral 1x clock. The default implementation returns 0.

Returns
Peripheral 1x clock frequency in Hz

This weak function configures the CPU PLL to the specified frequency. Platform-specific implementations should override this function.

Parameters
freqTarget frequency in Hz

This weak function initializes the DRAM controller and configures memory settings. Platform-specific implementations should override this function to perform SoC-specific DRAM initialization including timing configuration, voltage setup, and memory training.

Parameters
paraPointer to initialization parameters. The exact structure depends on the platform implementation.
Returns
0 on success, non-zero error code on failure. Default implementation returns 0.

This function reads a single character from the UART receive buffer. It waits until data is available before reading.

Parameters
[in]argPointer to the UART structure (cast to void* for compatibility)
Returns
The received character

This function checks the UART line status register to determine if there is data available in the receive buffer.

Parameters
[in]argPointer to the UART structure (cast to void* for compatibility)
Returns
Non-zero value if data is available, zero otherwise

◆ abort()

void abort ( )
extern

◆ show_regs()

static void show_regs ( struct arm_regs_t regs)
static