CC23x0R5DriverLibrary
|
Functions | |
void | CPUDelay (uint32_t count) |
Provide a small non-zero delay using a simple loop counter. More... | |
The CPU API provides a set of functions performing very low-level control of the system CPU. All functions in this API are written in assembler in order to either access special registers or avoid any compiler optimizations. Each function exists in several compiler specific versions: One version for each supported compiler.
void CPUDelay | ( | uint32_t | count | ) |
Provide a small non-zero delay using a simple loop counter.
This function provides means for generating a constant length delay. It is written in assembly to keep the delay consistent across tool chains, avoiding the need to tune the delay based on the tool chain in use.
Notice that interrupts can affect the delay if not manually disabled in advance.
The delay depends on where code resides and the path for code fetching:
Calculate delay count based on the wanted delay in microseconds (us):
Example: 250 us delay with code in flash and with cache and prefetch enabled:
count | is the number of delay loop iterations to perform. Number must be greater than zero. |
Referenced by I2CControllerCommand(), and TempDiodeGetTemp().