SPRUI33H November 2015 – June 2024 TMS320F280040-Q1 , TMS320F280040C-Q1 , TMS320F280041 , TMS320F280041-Q1 , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280045 , TMS320F280048-Q1 , TMS320F280048C-Q1 , TMS320F280049 , TMS320F280049-Q1 , TMS320F280049C , TMS320F280049C-Q1
Once the Flash bank and pump are in the active power state, a read or fetch access can be classified as a Flash access (access to an address location in Flash) or an OTP access (access to an address location in OTP). Once the CPU throws an access to a Flash memory address, data is returned after RWAIT + 1 number of SYSCLK cycles. For a USER-OTP access, data is returned after 11 SYSCLK cycles.
RWAIT defines the number of random access wait-states and is configurable using the RWAIT bit-field in the FRDCNTL register. At reset, the RWAIT bit-field defaults to a worst-case wait-state count (15), and therefore needs to be initialized for the appropriate number of wait states to improve performance, based on the CPU clock rate and the access time of the Flash.
For a given system clock frequency, RWAIT has to be configured using the formula:
RWAIT = ceiling[(SYSCLK/FCLK) - 1] |
where:
SYSCLK is the system operating frequency
FCLK is the Flash clock frequency. FCLK can be ≤ FCLKmax, the allowed maximum Flash clock frequency at RWAIT = 0.
If RWAIT results in a fractional value when calculated using the above formula, RWAIT has to be rounded up to the nearest integer. See the TMS320F28004x Real-Time Microcontrollers Data Sheet for the RWAIT configuration details.