NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

HOWTO Turn off DSP clock and Power

From Texas Instruments Wiki
Jump to: navigation, search


Prerequisites[edit]

  • CCS v 3.3
  • Latest CCS Driver Release downloaded from Specturm Digital support site and installed as per the instructions on the Spectrum Digital site.
  • DM644x board for testing
  • JTAG emulator for loading programs through CCS
  • A terminal program and serial connection to the board.


Extracting the Sample Projects[edit]

  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[edit]

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[edit]

  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[edit]

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[edit]

  • To turn the DSP clock off press 1 in the terminal window. In the CCS memory window right click and select Refresh Window. You should now see the value has changed to 0x00000F02.

Turning the DSP Clock ON[edit]

  • To turn the DSP on press 2 in the terminal window. In the CCS memory window rigth click and select Refresh Window. You should see the value has changed to 0x00001F03.

Turning the DSP Power OFF[edit]

  • To turn off power to the DSP press 6. In the CCS memory window rigth click and select Refresh Window. You should see the value has changed to 0x00000A00.

Turning the DSP Power ON[edit]

  • To turn on power to the DSP press 0. In the CCS memory window rigth click and select Refresh Window. You should see the value has changed to 0x00001F03

Building the DSP side Project[edit]

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[edit]

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.

  • Case 1 - shows how the DSP clock is turned off
  • Case 2 - shows how the DSP clock is turned on
  • Case 6 - shows how the DSP power is turned off. There is a section in case 6 that indicated where to place a call to an external power controller if you have one.
  • Case 0 - shows how the DSP power is turned on and the DSP program is loaded.

Credits[edit]

  • Kohtaro Hashimota: provided sample code used in this project for DSP clock and power control.
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article HOWTO Turn off DSP clock and Power here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article HOWTO Turn off DSP clock and Power here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article HOWTO Turn off DSP clock and Power here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article HOWTO Turn off DSP clock and Power here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article HOWTO Turn off DSP clock and Power here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article HOWTO Turn off DSP clock and Power here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article HOWTO Turn off DSP clock and Power here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article HOWTO Turn off DSP clock and Power here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article HOWTO Turn off DSP clock and Power here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity