Functions | |
void | Cy_SysLib_Delay (uint32_t milliseconds) |
The function delays by the specified number of milliseconds. More... | |
void | Cy_SysLib_DelayUs (uint16_t microseconds) |
The function delays by the specified number of microseconds. More... | |
void | Cy_SysLib_DelayCycles (uint32_t cycles) |
Delays for the specified number of cycles. More... | |
void | Cy_SysLib_ClearFlashCacheAndBuffer (void) |
This function invalidates the flash cache and buffer. More... | |
uint32_t | Cy_SysLib_GetResetReason (void) |
The function returns the cause for the latest reset(s) that occurred in the system. More... | |
void | Cy_SysLib_ClearResetReason (void) |
This function clears the values of the RES_CAUSE register. | |
void | Cy_SysLib_FaultHandler (uint32_t const *faultStackAddr) |
This function stores the ARM Cortex registers into a non-zero init area for debugging. More... | |
void | Cy_SysLib_ProcessingFault (void) |
This function determines how to process the current fault state. More... | |
void | Cy_SysLib_SetWaitStates (uint32_t clkHfMHz) |
Sets the number of clock cycles the cache will wait before it samples data coming back from Flash. More... | |
uint32_t | Cy_SysLib_GetBootStatus (void) |
Returns the boot status. More... | |
uint32_t | Cy_SysLib_GetBootResult (cy_en_syslib_boot_result_t bootResultSet) |
Returns the results from the Boot Process for the provided cy_en_syslib_boot_result_t. More... | |
uint32_t | Cy_SysLib_EnterCriticalSection (void) |
Cy_SysLib_EnterCriticalSection disables interrupts and returns a value indicating whether the interrupts were previously enabled. More... | |
void | Cy_SysLib_ExitCriticalSection (uint32_t savedIntrStatus) |
Re-enables the interrupts if they were enabled before Cy_SysLib_EnterCriticalSection() was called. More... | |
uint64_t | Cy_SysLib_GetUniqueId (void) |
This function returns the silicon unique ID. More... | |
void Cy_SysLib_Delay | ( | uint32_t | milliseconds | ) |
The function delays by the specified number of milliseconds.
By default, the number of cycles to delay is calculated based on the SystemCoreClock.
milliseconds | The number of milliseconds to delay. |
void Cy_SysLib_DelayUs | ( | uint16_t | microseconds | ) |
The function delays by the specified number of microseconds.
By default, the number of cycles to delay is calculated based on the SystemCoreClock.
microseconds | The number of microseconds to delay. |
void Cy_SysLib_DelayCycles | ( | uint32_t | cycles | ) |
Delays for the specified number of cycles.
The function is implemented in the assembler for each supported compiler.
cycles | The number of cycles to delay. |
void Cy_SysLib_ClearFlashCacheAndBuffer | ( | void | ) |
This function invalidates the flash cache and buffer.
It ensures the valid data is read from flash instead of using outdated data from the cache. The caches' Least Recently Used (LRU) structure is also reset to their default state.
uint32_t Cy_SysLib_GetResetReason | ( | void | ) |
The function returns the cause for the latest reset(s) that occurred in the system.
The reset causes are taken by reading RES_CAUSE register.
Name | Value |
---|---|
CY_SYSLIB_RESET_HWWDT | 0x00000001UL (bit0) |
CY_SYSLIB_PROT_FAULT | 0x00000008UL (bit3) |
CY_SYSLIB_RESET_SOFT | 0x00000010UL (bit4) |
Name | Value |
---|---|
CY_SYSLIB_RESET_ACT_FAULT | 0x00000002UL (bit1) |
CY_SYSLIB_RESET_CRWDT | 0x00000200UL (bit9) |
CY_SYSLIB_RESET_XRES | 0x00010000UL (bit16) |
CY_SYSLIB_RESET_BODVDDD | 0x00020000UL (bit17) |
CY_SYSLIB_RESET_BODVCCD | 0x00080000UL (bit19) |
CY_SYSLIB_RESET_OVDVDDD | 0x00100000UL (bit20) |
CY_SYSLIB_RESET_OVDVCCD | 0x00400000UL (bit22) |
CY_SYSLIB_RESET_BODHVSS | 0x01000000UL (bit24) |
CY_SYSLIB_RESET_PORVDDD | 0x40000000UL (bit30) |
void Cy_SysLib_FaultHandler | ( | uint32_t const * | faultStackAddr | ) |
This function stores the ARM Cortex registers into a non-zero init area for debugging.
This function calls Cy_SysLib_ProcessingFault() after storing all information.
faultStackAddr | The address of the stack pointer, indicates the lowest address in the fault stack frame to be stored. |
void Cy_SysLib_ProcessingFault | ( | void | ) |
This function determines how to process the current fault state.
By default in case of exception the system will stay in the infinite loop of this function.
void Cy_SysLib_SetWaitStates | ( | uint32_t | clkHfMHz | ) |
Sets the number of clock cycles the cache will wait before it samples data coming back from Flash.
This function must be called before increasing the SYSCLK clock frequency. It can optionally be called after lowering SYSCLK clock frequency in order to improve the CPU performance.
clkHfMHz | The SYSCLK clock frequency in MHz. Specifying a frequency above the supported maximum will set the wait states as for the maximum frequency. |
uint32_t Cy_SysLib_GetBootStatus | ( | void | ) |
Returns the boot status.
The Boot process uses CPUSS_SYSARG register to signal success/failure of Boot.
uint32_t Cy_SysLib_GetBootResult | ( | cy_en_syslib_boot_result_t | bootResultSet | ) |
Returns the results from the Boot Process for the provided cy_en_syslib_boot_result_t.
bootResultSet | Instance of Boot Result data register cy_en_syslib_boot_result_t. This register contains details of any results from the Boot Process. Register Content only valid if there is an error indication from the boot process Cy_SysLib_GetBootStatus. |
uint32_t Cy_SysLib_EnterCriticalSection | ( | void | ) |
Cy_SysLib_EnterCriticalSection disables interrupts and returns a value indicating whether the interrupts were previously enabled.
void Cy_SysLib_ExitCriticalSection | ( | uint32_t | savedIntrStatus | ) |
Re-enables the interrupts if they were enabled before Cy_SysLib_EnterCriticalSection() was called.
The argument should be the value returned from Cy_SysLib_EnterCriticalSection().
savedIntrStatus | Puts the saved interrupts status returned by the Cy_SysLib_EnterCriticalSection(). |
uint64_t Cy_SysLib_GetUniqueId | ( | void | ) |
This function returns the silicon unique ID.
The ID includes Die lot[3]#, Die Wafer#, Die X, Die Y, Die Sort# and Die Minor.