HOWTO Turn off DSP clock and Power

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   


Contents

Prerequisites


Extracting the Sample Projects

  1. Download the sample project file and extract it into a working directory.
  2. Unzip the DM644x_ARM_DSPCLKOFF_01.zip and DM644x_DSP_DSPCLKOFF_01.zip files to the working folder.
  3. You should now have two new folders, DM644x_ARM_DSPCLKOFF_01 and DM644x_DSP_DSPCLKOFF_01

Configuring CCS

This section covers setting up CCS and using the correct GEL file. If you already know how to use CCS and load a new GEL file please skip to the next section.

  1. After installing CCS you should have a desktop icon called Setup CCStudio v3.3. Double click this icon to open the CCS setup utility.
  2. In the middle window select Factory Boards and select the DM6446 configuration for your emulator. For example, if using the XDS510USB emulator, select the DM6446 XDS510USB EMULATOR configuration.
    CCS Setup.JPG
  3. Click the << Add button to add this configuration to your CCS setup.
  4. In the left pane highlight the “ARM9” device on Port16.
  5. Click the Modify Properties button on the bottom right
  6. Change the GEL file to the dm644x_arm.gel file located in the DM644x_ARM_DSPCLKOFF_01 directory that you unzipped earlier.
  7. Click OK
  8. Make sure you have your JTAG emulator connected to your PC.
  9. Click Save & Quit on the bottom left
  10. When prompted to Start Code Composer Studio on exit select Yes
  11. After CCS launches you should be at the CCStudio: Parallel Debug Manager Screen. See below picture
    CCS PDM.jpg
  12. Right click the ARM9 port under the DM6446_ICEPICK_XDS510USB configuration and select Open
  13. You have now configured CCS and are ready to begin building the ARM side project.

Building the ARM side Project

  1. In the CCS window select Project -> Open and select the DM644x_ARM_Base.pjt file from the DM644x_ARM_DSPCLKOFF_01 folder you extracted earlier. After opening the project you should see a screen like the following.
    CCS ARM PJT OPEN.jpg
  2. Select Project -> Build to compile the project. You may notice a warning like the following during the build. This can be safely ignored.
    [Linking...] "C:\CCStudio_v3.3\tms470\cgtools\bin\cl470" -@"Debug.lkf"
    <Linking>
    >> warning: load address of uninitialized section .sdrtext ignored
    Build Complete,
    0 Errors, 1 Warnings, 0 Remarks.
  3. The compiled executable is located in the Debug directory that was created during the build and is called DM644x.out
  4. You are now ready to run this project. Please proceed to the Running the ARM side Project section.

Running the ARM side Project

This section has all the common steps to run the ARM side Project. The subsections contain the steps for using the different functions provided by the sample project.

  1. Set jumper J4 to SRAM
  2. Set switch S3[1:10] to 1010111111 when 1 = on and 0 = off
  3. Power on the DM6446 and in the CCS window press ALT+C to connect to the board.
  4. In CCS run GEL -> XDS510USB -> for_download. You should see output like the following:
    Setting for download
    Finished setting
    1. Load the sample program by doing File -> Load Program and select the DM644x.out file in the Debug folder. The Debug folder is located in the DM644x_ARM_DSPCLKOFF_01 folder where the project was extracted.
  5. When the program has loaded you should see a screen similar to the one below:
    CCS ARM PJT RUN.jpg
  6. Open a terminal program to connect to the board. The terminal settings should be:
    Bits per Second: 115200
    Data Bits: 8
    Parity: None
    Stop Bits: 1
    Flow Control: None
    1. In the CCS Window press F5 to run the program. You should see output like the following appear in the terminal window.
    ARM PJT TERM OUTPUT.jpg
  7. In the terminal window press 0 to turn on the DSP and load the DSP side program. The DSP side program comes from the dspprog.h file in the Include directory and was derived from the DSP example application.
  8. Open the View Memory Window in CCS by doing View -> Memory. Type 0x01c4189c into the address field. This allows you to view the MDSTAT39 value. Bits 0-5 of this value indicate the power state of the DSP. For information on what these value mean please see the ARM subsystem user’s guide (SPRUE14a) section 7.7.15. For this example the values we will see are 0x00001F03 (DSP on) and 0x00000F02 (DSP off). The current value should be 0x00001F03 since the DSP was turned on when you pressed 0 in the terminal window.

Turning the DSP Clock OFF

Turning the DSP Clock ON

Turning the DSP Power OFF

Turning the DSP Power ON

Building the DSP side Project

The DSP side project is provided mainly as source code for the DSP program used in this example. The ARM project already has a build version of this code included in the Include directory of the arm project in the dspprog.h file. However, if you do need or want to rebuild the DSP side project the following steps will walk you through the process.

  1. From the CCStudio: Parallel Debug Manager windows right click on the C64PLUS port on the DM6446_ICEPICK_XDS510USB configuration and select Open.
  2. Open the DSP side project that was extracted earlier by doing Project -> Open and selecting the DM644x_DSP_Base.pjt file from the DM644x_DSP_DSPCLKOFF_01 folder. NOTE: you may get a message saying Cannot find file C:\CCStudio_v3.2\C6000\cgtools\lib\rts64plus.lib. If that occurs click Browse and select the rts64plus.lib file in the C:\CCStudio_v3.3\ C6000\cgtools\lib folder (This assumes you installed CCS in the default location of C:\CCStudio_v3.3, if not then adjust this path accordingly).
  3. Select Project -> Build Clean and select Yes when prompted.
  4. Select Project -> Build to rebuild the DSP project.

Important Code Sections

The important code section in the ARM example project is located in the Sources\dm644x_main.c file and is the switch statement in the main() function.

Credits

Leave a Comment

Comments

This is a very useful example. Is there any further code available along these lines? These files look to have been released by TI. This is the only example code I've seen that doesn't use the Linux drivers. More of this would be greatly appreciated. -JA

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox