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.

Program Counter

Does anyone know the address of the Program counter for the DM6437? Is it accessible on the bus? I can't find a reference to it in the documentation. The only thing I have found reference to is the PCE1 register, but there is no address given in the Instruction Set Reference.

 

Thanks, 

~C

  • The PCE1 register is not memory mapped. So you will not have a define of it’s address.

    A way of accessing PCE1 directly it to include the file c6x.h. This file has PCE1 defined in there. This file is part of the Code Generation Tools. CGTools come with CCS (Code Composer Studio) or the latest version can be downloaded at Update Advisor. The default installation path for CGTools would be C:\Program Files\Code Generation Toolsxxxx. Inside this folder (or equivalent if you did not keep the default installation path) you can find the \include\c6x.h file. The other core registers that are not memory mapped (AMR, CSR, IFR, ISR, ICR, ISTP, IRP, NRP) are in this file too. You could do:

     

    #include <c6x.h>
    .
    .
    unsigned int temp;
    temp = PCE1;
    .
    .
    
  • Ok, not the answer I was hoping for... but it will have to do. 

    Evidently it is also read-only so... nevermind. 

     

    Thanks, 

    ~C

  • What are you trying to do with the PC?   I have force fed it values through code composer.  Go to view->registers->core registers and you can type an address into the PC field, hit enter, and your execution will jump to the typed in address.  You can also right click on a line of source code that you have loaded through code composer and select set PC to cursor.  

  • I was trying to do some automated testing with my emulator, but the function in their interface that set registers like the PC wasn't working (I never figured out what was wrong). I finally ended up just using the ccs 4's scripting facility to do what I want. I've solved the problem. 

     

    Thanks, 

    ~C