SPRAAU8A March   2008  – August 2017 TMS320F2801 , TMS320F2801 , TMS320F2801-Q1 , TMS320F2801-Q1 , TMS320F28015 , TMS320F28015 , TMS320F28016 , TMS320F28016 , TMS320F28016-Q1 , TMS320F28016-Q1 , TMS320F2802 , TMS320F2802 , TMS320F2802-Q1 , TMS320F2802-Q1 , TMS320F28044 , TMS320F28044 , TMS320F2806 , TMS320F2806 , TMS320F2806-Q1 , TMS320F2806-Q1 , TMS320F28062 , TMS320F28062 , TMS320F28062-Q1 , TMS320F28062-Q1 , TMS320F28062F , TMS320F28062F , TMS320F28062F-Q1 , TMS320F28062F-Q1 , TMS320F28063 , TMS320F28063 , TMS320F28064 , TMS320F28064 , TMS320F28065 , TMS320F28065 , TMS320F28066 , TMS320F28066 , TMS320F28066-Q1 , TMS320F28066-Q1 , TMS320F28067 , TMS320F28067 , TMS320F28067-Q1 , TMS320F28067-Q1 , TMS320F28068F , TMS320F28068F , TMS320F28068M , TMS320F28068M , TMS320F28069 , TMS320F28069 , TMS320F28069-Q1 , TMS320F28069-Q1 , TMS320F28069F , TMS320F28069F , TMS320F28069F-Q1 , TMS320F28069F-Q1 , TMS320F28069M , TMS320F28069M , TMS320F28069M-Q1 , TMS320F28069M-Q1 , TMS320F2808 , TMS320F2808 , TMS320F2808-Q1 , TMS320F2808-Q1 , TMS320F2809 , TMS320F2809 , TMS320F2810 , TMS320F2810 , TMS320F2810-Q1 , TMS320F2810-Q1 , TMS320F2811 , TMS320F2811 , TMS320F2811-Q1 , TMS320F2811-Q1 , TMS320F2812 , TMS320F2812 , TMS320F2812-Q1 , TMS320F2812-Q1 , TMS320F28232 , TMS320F28232 , TMS320F28232-Q1 , TMS320F28232-Q1 , TMS320F28234 , TMS320F28234 , TMS320F28234-Q1 , TMS320F28234-Q1 , TMS320F28235 , TMS320F28235 , TMS320F28235-Q1 , TMS320F28235-Q1 , TMS320F28332 , TMS320F28332 , TMS320F28333 , TMS320F28333 , TMS320F28334 , TMS320F28334 , TMS320F28335 , TMS320F28335 , TMS320F28335-Q1 , TMS320F28335-Q1

 

  1.   Copying Compiler Sections From Flash to RAM on the TMS320F28xxx DSCs
    1.     Trademarks
    2. 1 Introduction
    3. 2 Compiler Sections
    4. 3 Software
      1. 3.1 Description
        1. 3.1.1 Code_start and wd_disable
        2. 3.1.2 Copy_sections
        3. 3.1.3 Memory Allocation – Linker Command Files
      2. 3.2 Testing Example
        1. 3.2.1 Code Composer Studio Environment
        2. 3.2.2 Standalone Operation
      3. 3.3 Application Integration
        1. 3.3.1 Example Integration
    5. 4 Benchmarks, Limitations, and Suggestions
      1. 4.1 Memory Usage
      2. 4.2 Benchmarks
      3. 4.3 Limitations
      4. 4.4 Suggestions
    6. 5 Conclusion
    7. 6 References
  2.   Revision History

Code_start and wd_disable

The code_start and wd_disable routines are provided in the DSP28xxx_CodeStartBranch.asm file. After power up, the code_start routine executes since it is allocated to the Flash boot address of 0x3F7FF6. For more information, see Running an Application from Internal Flash Memory on the TMS320F28xx DSP (SPRA958). This routine is shown below:

WD_DISABLE .set 1 ;set to 1 to disable WD, else set to 0 .ref copy_sections .global code_start *********************************************************************** * Function: codestart section * * Description: Branch to code starting point *********************************************************************** .sect "codestart" code_start: .if WD_DISABLE == 1 LB wd_disable ;Branch to watchdog disable code .else LB copy_sections ;Branch to copy_sections .endif

This function was modified from the original CodeStartBranch.asm file provided with the C/C++ Header Files and Peripheral Examples by only changing the second call to copy_sections instead of _c_int00. This call will only be made if the WD_DISABLE is 0. As shown above, the code sets WD_DISABLE to 1. This causes a branch to the wd_disable routine. This routine is shown below:

*********************************************************************** * Function: wd_disable * * Description: Disables the watchdog timer *********************************************************************** .if WD_DISABLE == 1 .sect "wddisable" wd_disable: SETC OBJMODE ;Set OBJMODE for 28x object code EALLOW ;Enable EALLOW protected register access MOVZ DP, #7029h>>6 ;Set data page for WDCR register MOV @7029h, #0068h ;Set WDDIS bit in WDCR to disable WD EDIS ;Disable EALLOW protected register access LB copy_sections ;Branch to copy_sections .endif

This is required as the watchdog should be disabled during the copy_sections and c_int00 function execution, otherwise the watchdog could timeout before main( ) is entered. This function was also modified from the original CodeStartBranch.asm file provided with the C/C++ Header Files and Peripheral Examples. The only modification is a branch to copy_sections instead of the c_int00 routine.