SPRUII0F May 2019 – June 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
Flash read or instruction fetch accesses can be classified either as a Flash access (access to an address location in Flash), or an OTP access (access to an address location in OTP).
When the CPU performs an access to a Flash memory address, data is returned after (RWAIT+1) SYSCLK/CMCLK cycles.
For a USER-OTP access, data is returned after 11 SYSCLK cycles.
For a USER-OTP access, data is returned after 11 SYSCLK cycles for CPU1, RWAIT+2 SYSCLK cycles for CPU2, and RWAIT+2 CMCLK cycles for CM.
RWAIT defines the number of random access wait states, and is configured using the RWAIT field in the FRDCNTL register. At reset, RWAIT defaults to a worst-case wait state count (15), and therefore must be initialized to the appropriate number of wait states to improve performance, based on the CPU clock frequency and the access time of the Flash. The Flash supports zero-wait accesses when RWAIT is set to zero, when the CPU clock frequency is low enough to accommodate the Flash access time.
For a given system clock frequency, configure RWAIT using the following formula:
For C28x Flash Bank: RWAIT = ceiling[(SYSCLK/FCLK)-1]
For CM Flash Bank: RWAIT = ceiling[(CMCLK/FCLK)-1]
where SYSCLK is the system operating frequency for CPU1 and CPU2, where CMCLK is the system operating frequency for CM, and FCLK is the clock frequency for Flash.
FCLK must be ≤ FCLKmax, the allowed maximum Flash clock frequency at RWAIT=0.
If RWAIT results in a fractional value when calculated using the above formula, round up RWAIT to the nearest integer.