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.

tms320c6455dsk PLL deafult configuration/working frequency

Other Parts Discussed in Thread: TMS320C6455

[EDIT] I found some new information and wrote a new post after this one with different conclusions, please consider both of them before providing a reply[/EDIT]

Hello everybody,


I'm working on a TMS20C6455 DSK board and I'm trying to learn how to configure its working frequencies.

I wrote this simple code in order to get the configuration of the PLL module right after the startup of the board:

[START CODE]

#include <stdio.h>
#include <csl_pllc.h>

void main(void)
{

  CSL_Status       status;
  CSL_PllcObj      pllcObj;
  CSL_PllcHandle   hPllc;
  //CSL_PllcHwSetup  hwSetup;
  CSL_PllcHwSetup  hwSetupRead;

  status = CSL_pllcInit(NULL);
  if(status != CSL_SOK)
  {

    printf("Errore nell'inizializzazione di PLL1");
    return;

  }

  hPllc = CSL_pllcOpen(&pllcObj, CSL_PLLC_1, NULL, &status);
  if((status != CSL_SOK) || (hPllc == NULL))
  {

    printf("Errore nell'apertura dell'istanza di PLL1");
    return;

  }

  status = CSL_pllcGetHwSetup(hPllc, &hwSetupRead);
  printf("La configurazione di default di PPL1 è:\n");
  printf("Maschera di abilitazione dei divisori: %x\n", hwSetupRead.divEnable);
  printf("Valore del predivisore: %x\n", hwSetupRead.preDiv);
  printf("Valore del divisore D4: %x\n", hwSetupRead.pllDiv4);
  printf("Valore del divisore D5: %x\n", hwSetupRead.pllDiv5);
  printf("Valore del moltiplicatore: %x\n", hwSetupRead.pllM);
  printf("Modalità di funzionamento: %x\n", hwSetupRead.pllMode);
 
}

[END CODE]

I assume that, when reading the setup of the PLL module, I get the content of the configuration registers, which I print to the output window in hex format.

The values are:

divEnable = d (it means PREDIV, D4 and D5 are enabled)

preDiv = 1 (it means it divides the CLKIN1 signal by 2)

pllDiv4 = 8 (should be a reserved value; if could mean the value needs to be defined?)

pllDiv5 = 4 (it means it divides by 5)

pllM = 18 (it means it multiplies by 25)

pllMode = 1 (it means the PLL is configured to work in PLL mode- PLL is not bypassed)

Again, I assume these are the values in the proper register fields, hence their interpretation according to the sprs276k documentation.

So, my questions are: Is the interpretation of these values correct? The code I wrote provides them in a correct shape? If so, why is D4 set with a reserved value?

Moreover, the board documentation states the default working frequency is 1000 MHz, but given the values I get and with a CLKIN1 signal at 50 MHz, it comes out:

[50/(PREDIV=2)]*(MULT=25)=625 MHz

Is there something I'm missing or that's quite an inconsistency?

Hope you can help me to clarify my doubts.

Regards,

Francesco Annese

  • Sorry for the back to back posts, but I thought it was better to write a new one rather than adding more lines to the preceding post.

    I had a look at the DSK6455.gel file and found a lot of information in it.

    More precisely:

    int PLLM_val =    20;
    int PREDIV_val =  1;
    int PLLDIV4_val = 8;
    int PLLDIV5_val = 4;

    if (Get_Board_Rev == 0)
            PLLM_val = 25; // Old Rev, 40MHz CLKIN x 25 = 1GHz
    if (Get_Board_Rev == 1)
            PLLM_val = 20; // Old Rev, 50MHz CLKIN x 20 = 1GHz
    if (Get_Board_Rev >= 2)
            PLLM_val = 24; // Old Rev, 50MHz CLKIN x 24 = 1.2GHz

    These are the values I get, in decimal format (24 in the last statement corresponds to hex 18 in the previous post), from the code I wrote.

    Given this knowledge, I came to different conclusions: the values I get (and also the value I should use to change the setup) are not the content of the register, but the content plus one, so that preDiv=1 means that the corresponding register field is set to 0 and the predivider will divide by 1; the same for the other dividers and similarly for the multiplier.

    About the DSP working frequency: with the new interpretation of the values, it is (50/1)*24=1200 MHz, still different from the default value of 1000 MHz as reported in the technical reference documentation of the dsk board.

    Could anyone please confirm this?

    Regards,

    Francesco Annese

  • Francesco,

    We actually have TMS320C6455-1200, that's 1.2GHz. Please see the product folder. http://focus.ti.com/docs/prod/folders/print/tms320c6455.html

    Please let me know if you have any other questions. or if I missed your previous questions.

    regards,

    Paul

  • About the frequency setting at startup: what I meant is that according to what is written on the TMS320C6455 DSK technical reference documentation that  came with the board the default frequency should be set at 1000 MHz (1200 MHz and other frequency values being available as well by proper setting of the divider and the multiplier) , but using the numbers I get using the function CSL_pllcGetHwSetup (the same numbers I found in the GEL file) the default frequency turns out being set to 1200MHz. Probably an inconsistency in the documentation, but I wanted a confirmation about that.

    Moreover, since I had trouble in the interpretation of the values collected, I'd be glad if you checked what I wrote in my previous post and tell if I got it right or I completely missed the point.

    Many thanks,

    Francesco Annese

  • Francesco,

    Vito Francesco Annese said:
    Is the interpretation of these values correct? The code I wrote provides them in a correct shape? If so, why is D4 set with a reserved value?

    I am not familiar with the CSL for this device. We need the implementation of CSL_pllcGetHwSetup to be sure. For now, without checking the implementation of that function, my guess is that the value you read back are the actual values of the multiply or divide, instead of the bit value.

    for example, 50 / prediv  * pllM = 50 / 1 * 0x18 = 1.2Ghz. make sense?

    plldiv4 =3 corresponds to a divide value of 8, which is not reserved.

  • I was able to find the source code for the CSL_pllcGetHwSetup in the .zip archive available here: http://focus.ti.com/docs/toolsw/folders/print/sprc234.html. I wasn't able to find it in my CCS installation folder because the installation included only .h files and the precompiled libraries.

    Here's an example of the code:

    if (CSL_FEXT (pllcRegs->PLLDIV4, PLLC_PLLDIV4_D4EN)) {
                    hwSetup->divEnable |= CSL_PLLC_DIVEN_PLLDIV4;
                    hwSetup->pllDiv4 = CSL_FEXT (pllcRegs->PLLDIV4, PLLC_PLLDIV4_RATIO) + 1;
    }

    The last line is the one that answers to my question: the value returned is the content of the register in decimal format plus one; that means that if I get back a value of 8 for the D4 divider, that corresponds to a value of 7 in the register, hence a division by 16 according to the tables in the sprs276k documentation. The same applies to the other values returned, depending on the meaning provided by the tables.

    Thanks for your guidance in finding the solution.

    Francesco Annese