AnsweredAssumed Answered

ADuC 7024 once I set the PLL,the arm can't stop,the uart can't transport the data

Question asked by potterwei on Apr 19, 2012
Latest reply on May 1, 2012 by AudeR

Hi all!

I am bothered with a weird question. the phenomenon is just as the description below.

At first i put the {PLLCON = 0x01 ;POWKEY1 = 0x01; POWCON = 0x01; POWKEY2 = 0xF4; } into my code(without  PLLKEY1=0xAA; PLLKEY2 = 0x55;), the uart can work seemingly properly under the baudrate 9600bps, but when POWCON =0x00; the baudrate 9600 cannot work properly then,mistakes are everywhere.

After that i find i miss the  (PLLKEY1=0xAA; PLLKEY2 = 0x55;), so i add them like this,

PLLKEY1 = 0xAA; PLLCON = 0x01; PLLKEY2 = 0x55;

POWKEY1 = 0x01; POWCON = 0x01; POWKEY2 = 0xF4;

then the problem happened: the uart do not transport any data. But as long as i delete (PLLKEY1 = 0xAA; PLLCON = 0x01; PLLKEY2 = 0x55; ) the uart can transport again. Then I find the code like this

  {t2val_old = T2VAL; T2LD = 5;  T2CON = 0x480;

while ((T2VAL == t2val_old) || (T2VAL >3))                     IRQEN = 0x10;

PLLKEY1 = 0xAA;  PLLCON = 0x01;  PLLKEY2 = 0x55;

POWKEY1 = 0x01;  POWCON = 0x27; POWKEY2 = 0xF4;

POWKEY1 = 0x01;  POWCON = POWCON &0x80; POWKEY2 = 0xF4; }

the arm enter a permanently locked. I have to use ARMWSD to unlock. the uart naturally cannot put out any data.

These are all the weird facts.

All I want is to use the uart to communicate through a normal configuration with PLLCON and POWCON(CD=0)

 

Thank you all!

Outcomes