This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F2812 flash registers

Other Parts Discussed in Thread: TMS320F2812

I am attempting to port an application from RAM to flash for
a TMS320F2812, using CCSv4 and want to understand the
programming of the flash registers better than on my last
pass. Document SPRA958K provides a function to initialize
these registers on page 13:
>
> /********************************************************************
> * NOTE: The InitFlash() function shown here is just an example of an
> * initialization for the flash control registers. Consult the device
> * datasheet for production wait state values and any other relevant
> * information. Wait-states shown here are specific to current F280x
> * devices operating at 100 MHz.
> * NOTE: This function assumes use of the Peripheral Header File
> * structures (see References [23-29]).
> ********************************************************************/
>
> #pragma CODE_SECTION(InitFlash, "secureRamFuncs")
> void InitFlash(void)
> {
>   asm(" EALLOW");                             // Enable EALLOW protected register access
>   FlashRegs.FPWR.bit.PWR = 3;                 // Flash set to active mode
>   FlashRegs.FSTATUS.bit.V3STAT = 1;           // Clear the 3VSTAT bit
>   FlashRegs.FSTDBYWAIT.bit.STDBYWAIT = 0x01FF; // Sleep to standby cycles
>   FlashRegs.FACTIVEWAIT.bit.ACTIVEWAIT = 0x01FF; // Standby to active cycles
>   FlashRegs.FBANKWAIT.bit.RANDWAIT = 3;       // F280x Random access wait states
>   FlashRegs.FBANKWAIT.bit.PAGEWAIT = 3;       // F280x Paged access wait states
>   FlashRegs.FOTPWAIT.bit.OTPWAIT = 5;         // F280x OTP wait states
>   FlashRegs.FOPT.bit.ENPIPE = 1;              // Enable the flash pipeline
>   asm(" EDIS");                               // Disable EALLOW protected register access
>
>   /*** Force a complete pipeline flush to ensure that the write to the last register
>   configured occurs before returning. Safest thing is to wait 8 full cycles. ***/
>
>   asm(" RPT #6 || NOP"); // Takes 8 cycles to execute
> } //end of InitFlash()
>
Note that the comment which precedes the function completely
disclaims its functionality on the F2812. 

The register block "FlashRegs" is defined in header
DSP281x_SysCtrl.h, but it tells me nothing about what those
bits do. I can find no mention of these registers in any
reference guide or other support document available on the
TI web site.

Assuming I find a performance problem with my flash and want
to optimize the wait states for the F2812, where to I get
the info necessary to do so?