GaIA BIOS Library
Loading...
Searching...
No Matches
GaIA Reset functions

GaIA controller Reset functions. More...

Functions

void gwa_boot_handler (void)
 This function handles the reset exit, based on the requested conditions.
void gwa_start_stm32_bootloader (void)
 Resets the microcontroller, then jumps to the ROM bootloader at restart.
int32_t gwa_start_application (uint32_t code_base_address)
 Resets the microcontroller, then jumps to the main application, specifying the base address.
void gwa_soft_reset (void)
 Unconditionally resets the microcontroller.
uint8_t gwa_is_soft_reset (void)
 Checks if the reset was due to a soft reset or for hardware reasons.
uint16_t gwa_get_reset_cause (void)
 Gets the cause of last reset.

Detailed Description

GaIA controller Reset functions.

Function Documentation

◆ gwa_boot_handler()

void gwa_boot_handler ( void )

This function handles the reset exit, based on the requested conditions.

It must be called immediately after reset, as first line of main(), before any initialization is done.

◆ gwa_get_reset_cause()

uint16_t gwa_get_reset_cause ( void )

Gets the cause of last reset.

Returns
A bitfield indication of the reset cause as defined by GWA_LAST_RESET_CAUSE_xxx.

◆ gwa_is_soft_reset()

uint8_t gwa_is_soft_reset ( void )

Checks if the reset was due to a soft reset or for hardware reasons.

Returns
0 if the reset was not due to a soft reset.

◆ gwa_start_application()

int32_t gwa_start_application ( uint32_t code_base_address)

Resets the microcontroller, then jumps to the main application, specifying the base address.

Parameters
code_base_address- restart address: must be a multiple of 0x200 (i.e. last 9 bits == 0) The function should perform a reset and never return, but returns an error if the restart address is invalid
Returns
GWA_BOOT_INVALID_ADDRESS is returned when the restart address is invalid