RTEMS
5.1
|
Typedefs | |
typedef enum ALT_CLK_SAFE_DOMAIN_e | ALT_CLK_SAFE_DOMAIN_t |
Enumerations | |
enum | ALT_CLK_SAFE_DOMAIN_e { ALT_CLK_DOMAIN_NORMAL, ALT_CLK_DOMAIN_DEBUG } |
Functions | |
ALT_STATUS_CODE | alt_clk_safe_mode_clear (void) |
bool | alt_clk_is_in_safe_mode (ALT_CLK_SAFE_DOMAIN_t clk_domain) |
When safe mode is enabled, clocks in the HPS are directly generated from the osc1_clk clock. Safe mode is enabled by the assertion of a safe mode request from the reset manager or by a cold reset. Assertion of the safe mode request from the reset manager sets the safe mode bit in the clock manager control register. No other control register bits are affected by the safe mode request from the reset manager.
While in safe mode, clock manager register settings which control clock behavior are not changed. However, the output of the registers which control the clock manager state are forced to the safe mode values such that the following conditions occur:
A write by software is the only way to clear the safe mode bit. All registers and clocks need to be configured correctly and all software-managed clocks need to be gated off before clearing safe mode. Software can then gate clocks on as required.
On cold reset, all clocks are put in safe mode.
On warm reset, safe mode is optionally and independently applied to debug clocks and normal (i.e.non-debug) clocks based on clock manager register settings. The default response for warm reset is to put all clocks in safe mode.
The APIs in this group provide control of the Clock Manager safe mode warm reset response behavior.
typedef enum ALT_CLK_SAFE_DOMAIN_e ALT_CLK_SAFE_DOMAIN_t |
This type definition enumerates the safe mode clock domains under control of the Clock Manager.
This type definition enumerates the safe mode clock domains under control of the Clock Manager.
bool alt_clk_is_in_safe_mode | ( | ALT_CLK_SAFE_DOMAIN_t | clk_domain | ) |
Return whether the specified safe mode clock domain is in safe mode or not.
clk_domain | The safe mode clock domain to check whether in safe mode or not. |
TRUE | The safe mode clock domain is in safe mode. |
FALSE | The safe mode clock domain is not in safe mode. |
ALT_STATUS_CODE alt_clk_safe_mode_clear | ( | void | ) |
Clear the safe mode status of the Clock Manager following a reset.
NOTE: Safe mode should only be cleared once clocks have been correctly configured.
ALT_E_SUCCESS | The operation was succesful. |
ALT_E_ERROR | The operation failed. |