⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 realtime.gel

📁 基于TMS320F2812 的精密温度控制程序代码
💻 GEL
字号:
/*********************************************************************
* File: realtime.gel                                                 *
* Description: Contains Code Composer Studio v2.12 GEL functions     *
*   that make it more convenient to RUN and HALT the DSP in realtime *
*   emulation mode.                                                  *
* DSP: TMS320F28xx family                                            *
* Author: David M. Alter                                             *
* History:                                                           *
*   11/05/02 - Original                                              *
* Notes:                                                             * 
*   1) To use this GEL file, start CCS, and load this file using the *
*      FILE->LOAD_GEL menu in CCS.  A new menu item called           *
*      "Realtime Emulation Control" will appear at the bottom of     *
*      the GEL menu in CCS, and the following four sub-functions     *
*      will be available:                                            *
*                                                                    *
*        i. Run_Realtime_with_Reset() - resets the DSP, then runs    *
*           the DSP with realtime debugging mode enabled.            *
*                                                                    *
*       ii. Run_Realtime_with_Restart() - restarts the DSP, then     *
*           runs the DSP with realtime debugging mode enabled.       *
*                                                                    *
*      iii. Full_Halt() - Halts the DSP from realtime debugging mode.*
*                                                                    *
*       iv. Full_Halt_with_Reset() - Halts the DSP from realtime     *
*           debugging mode and then resets the DSP.                  *
*                                                                    *
*   2) If the above functions do not appear on the GEL menu in CCS   *
*      after loading the GEL file, it is because there are too many  *
*      GEL menu items already there.  CCS has a limit on the number  *
*      of GEL menu items you can have.  To fix the problem, you must *
*      keep some of the other menu items from loading, probably by   *
*      not loading one of the other GEL files you have loaded.       *
*                                                                    *
*   3) It may be convenient to have CCS automatically load these     *
*      functions each time it is started.  The "Setup CCS" utility   *
*      specifies the GEL file to be loaded at runtime.  Typically,   *
*      this will be something like f2812.gel or f2810.gel, both of   *
*      which currently come with the CCS software.  To automatically *
*      have realtime.gel loaded, edit the GEL file specified in the  *
*      Setup CCS utility, and add the following to the Startup()     *
*      function contained therein:                                   *
*            GEL_LoadGel("..\\cc\\gel\\realtime.gel");               *
*      You may need to adjust the path name some.  Note the use of   *
*      double slashes since \ is a control character (in C), so \\   *
*      means a single slash ini the pathname.  If you are unable to  *
*      get this to work, you could resort to the brute-force         *
*      approach of cutting-and-pasting the contents on this file     *
*      into the GEL file specified in the Setup CCS utility.         *
*********************************************************************/

menuitem "Realtime Emulation Control";

hotmenu Run_Realtime_with_Reset()
{
    GEL_Reset();                /* Reset the DSP */
    ST1 = ST1 & 0xFFFD;         /* clear DBGM bit in ST1 */
    GEL_EnableRealtime();       /* Enable Realtime mode */
    GEL_Run();                  /* Run the DSP */
}
hotmenu Run_Realtime_with_Restart()
{
    GEL_Restart();              /* Reset the DSP */
    ST1 = ST1 & 0xFFFD;         /* clear DBGM bit in ST1 */
    GEL_EnableRealtime();       /* Enable Realtime mode */
    GEL_Run();                  /* Run the DSP */
}
hotmenu Full_Halt()
{
    GEL_Halt();                 /* Halt the DSP */
    GEL_DisableRealtime();      /* Disable Realtime mode */
}
hotmenu Full_Halt_with_Reset()
{
    GEL_Halt();                 /* Halt the DSP */
    GEL_DisableRealtime();      /* Disable Realtime mode */
    GEL_Reset();                /* Reset the DSP */
}

/*** end of file ***/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -