载入中...

 
     
 
      placard
载入中...
      calendar
载入中...
      comment
载入中...
      newblog
载入中...
      newmessage
载入中...
      search

 

      login
载入中...
      link
      info
载入中...


 
 
载入中...
   
 
 
ARM中计算MPLL的方法
[ 2010-6-15 14:21:00 | By: cc810610186 ]
 

1. U32 mpll_val=0;

      mpll_val = (92<<12)|(1<<4)|(1);

      算得mpll_val的二进制:0101 1100 0000 0001 0001

       注意:(92<<12)中的92为十进制数,转换为二进制为0x5C。
2. ChangeMPllValue((mpll_val>>12)&0xff, (mpll_val>>4)&0x3f, mpll_val&3);

     代入1算得:ChangeMPllValue(0x5C,1,1);

3. 找到ChangeMPllValue子函数

      void ChangeMPllValue(int mdiv,int pdiv,int sdiv)
             {

                     rMPLLCON = (mdiv<<12) | (pdiv<<4) | sdiv;
              }

4. 调用子函数,得到rMPLLCON二进制为:0101 1100 0000 0001 0001

5. 根据S3C2440A官方datasheet:

     PLLCON          Bit                        Deion

        MDIV         [19:12]           Main divider control

        PDIV          [9:4]               Pre-divider control

         SDIV          [1;0]               Post divider control

      以及MPLL Control Register

            Mpll=(2*m*Fin)/(p*2s)

           m=(MDIV+8)   p=(PDIV+2)   s=SDIV

   因rMPLLCON二进制为:0101 1100 0000 0001 0001,所以

m=(MDIV+8)=([19:12]+8)=92+8=100

p=(PDIV+2)=([9:4]+2)=1+2=3

s=SDIV=[1:0]=1

   Mpll=(2*m*Fin)/(p*2s)=(2*100*12)/(3*2)=400M

 
 
  • 标签:mpll 计算 
  • 发表评论:
    载入中...