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_Halt (uint32_t reason) |
This function halts the CPU but only the CPU which calls the function. More... | |
void | Cy_SysLib_AssertFailed (const char_t *file, uint32_t line) |
This function stores the ASSERT location of the file name (including path to file) and line number in a non-zero init area for debugging. 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 RES_CAUSE and RES_CAUSE2. | |
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 for, before it samples data coming back from ROM, SRAM, and Flash. 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... | |
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_Halt | ( | uint32_t | reason | ) |
This function halts the CPU but only the CPU which calls the function.
It doesn't affect other CPUs.
reason | The value to be used during debugging. |
void Cy_SysLib_AssertFailed | ( | const char_t * | file, |
uint32_t | line | ||
) |
This function stores the ASSERT location of the file name (including path to file) and line number in a non-zero init area for debugging.
Also it calls the Cy_SysLib_Halt() function to halt the processor.
file | The file name of the ASSERT location. |
line | The line number of the ASSERT location. |
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' 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 | 0x00001 (bit0) |
CY_SYSLIB_PROT_FAULT | 0x00008 (bit3) |
CY_SYSLIB_RESET_SOFT | 0x00010 (bit4) |
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 for, before it samples data coming back from ROM, SRAM, and Flash.
Call this function before increasing the ClkSys clock frequency. Call this function optionally after lowering the ClkSys clock frequency in order to improve the CPU performance.
clkHfMHz | The ClkSys 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_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(). |