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.

PSC Module!

Hi!

I found the following code in the EMV DA830 PSP 02.00.01 examples:

var pscPrms = new Psc.Params();
pscPrms.devId = 1;
Program.global.psc1 = Psc.create(pscPrms);

What is the meaning of devId? Sometimes it is assigned a value of 1 and sometimes zero depending on the peripheral device. Is it possible to use the same (psc1) variable to power up multiple devices like this:

Psc_ModuleClkCtrl(psc1, CSL_PSC_MCASP1, Psc_moduleClkCtrl_ENABLE, &eb);
Psc_ModuleClkCtrl(psc1, CSL_PSC_UART2,Psc_moduleClkCtrl_ENABLE, NULL);

??
What would be the purpose to create more than one psc instance?

Thanks!
Atmapuri

  • I'll ask the PSP team to answer this...

  • Atmapuri said:
    What is the meaning of devId?

    devId is the instance number (or device ID) on which the driver needs to be instantiated - driver instance is created.

    Atmapuri said:
    Sometimes it is assigned a value of 1 and sometimes zero depending on the peripheral device

    .

    On DA830 we have two instances of PSC - PSC0 and PSC1. Accordingly, if one wants to instantiate PSC0 the devId = 0, if PSC1 then devID = 1. To decide if PSC0 or PSC1 needs to be instantiated, one must refer to the  Power and Sleep Controller section of TRM. One can see a table of devices falling under each PSC instance. So, if  one is to use MCASP0/1/2 then PSC1 needs to be used, for UART0 then PSC0 needs to be used.

    Atmapuri said:

    Is it possible to use the same (psc1) variable to power up multiple devices like this:

    Psc_ModuleClkCtrl(psc1, CSL_PSC_MCASP1, Psc_moduleClkCtrl_ENABLE, &eb);
    Psc_ModuleClkCtrl(psc1, CSL_PSC_UART2,Psc_moduleClkCtrl_ENABLE, NULL);

    psc1 or psc0 is a  one time instantiation of the device as in the application cfg file.

    Once they are created/instantiated, psc0 and psc1 contain the handles to the PSC driver for that instance. These handles can be used any number of time inside the application.

    For example in the case above, psc1 is (and must) be used for MCASP1 and UART2.

    Hope this explains as needed.

  • Dear Sriram,

    Thank you very much!
    Atmapuri