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.

the problem of PSC0

Hi Experts,

     I am using EMIFA on OmapL137, somehow I can not power it up.  Below are my code:

    /*Enable Function for PSC0*/
void PSC0_lPSC_enable(Uint8 PD, Uint8 LPSC_num)
 {

 printf("\n PSC0 Enable on Domain %d, LPSC %d\n",PD,LPSC_num);
  *(Uint32*) (PSC0_MDCTL+4*LPSC_num) = (*(Uint32*) (PSC0_MDCTL+4*LPSC_num) & 0xFFFFFFE0) | 0x0003;
  PSC0_PTCMD = 0x1<<PD;
  while( (PSC0_PTSTAT & (0x1<<PD) ) !=0) ; /*Wait for power state transition to finish*/
  while( (*(Uint32*)(PSC0_MDSTAT+4 * LPSC_num) & 0x1F) !=0x3);
}

/*Enable Function for PSC1*/
void PSC1_lPSC_enable(Uint8 PD, Uint8 LPSC_num)
 {

  printf("\n PSC1 Enable on Domain %d, LPSC %d\n",PD,LPSC_num);
  *(Uint32*) (PSC1_MDCTL+4*LPSC_num) = (*(Uint32*) (PSC1_MDCTL+4*LPSC_num) & 0xFFFFFFE0) | 0x0003;
  PSC1_PTCMD = 0x1<<PD;
  while( (PSC1_PTSTAT & (0x1<<PD) ) !=0 ) ; /*Wait for power state transition to finish*/
  while( (*(Uint32*)(PSC1_MDSTAT+4 * LPSC_num) & 0x1F) !=0x3);
}

void initpsc( void)

{

     .......

    PSC0_lPSC_enable(0, 3);  // EMIFA

    .......

}

    but my code hangs at "while( (PSC0_PTSTAT & (0x1<<PD) ) !=0) ; ". 

    GOSTAT[0] never goes to 0, it is always 1.  As a result, I can not access any registers.

    Is there anything that I have missed ?  I didn't find much information in the manual.  

    Thanks a lot.