AnsweredAssumed Answered

BF526 EZBRD cplb protection violation using bfrom_SysControl()

Question asked by G40 on May 14, 2012
Latest reply on May 17, 2012 by G40

Using the BF526 EZBRD the following code causes cplb_protection_violation(). What am I likely to be doing wrong?

 

{

          uint32_t flags = SYSCTRL_READ |

                                                  SYSCTRL_PLLCTL |

                                                  SYSCTRL_PLLDIV |

                                                  SYSCTRL_LOCKCNT;

 

          ADI_SYSCTRL_VALUES frequency;

          memset(&frequency,0,sizeof(frequency));

          // read current values

          bfrom_SysControl(flags,&frequency,0);

 

          flags |= SYSCTRL_WRITE;

 

          /* Set MSEL = 0-63 --> VCO = CLKIN*MSEL */

          frequency.uwPllCtl = SET_MSEL(21) ;

          /* Set SSEL = 1-15 --> SCLK = VCO/SSEL */

          /* CCLK = VCO / 1 */

          frequency.uwPllDiv = SET_SSEL(4) | CSEL_DIV1;

          frequency.uwPllLockCnt = 0x0200;

bfrom_SysControl(flags,&frequency,0);

  }

Outcomes