AnsweredAssumed Answered

ADUC7024 chip dead and data missing

Question asked by crow2218 on Aug 10, 2012
Latest reply on Aug 10, 2012 by ADUzer

The masters, please help this newer in aduc world. I'll appreciate you if you would or could help me.

      When I'm using aduc7024, I met some problems which I tried to solve by different method for days but  with no replays. When I use a higher frequency than 20MHz which generated by the pll and the oscillor outside or inside, some data will be missing, seems the processor don't work for a while, and the higher frequency, the more missing data. 

      Another problem is that I wrote an incorrect data to the register by accident, the chip wouldn't work, and it wouldn't work again. worsely, I couldn't download the hex file to it through the serial bus, JTAG.

      Finally, I wrote only a piece of code only for the testing, and killed another chip.

     Now I paste the testing code below and give some notion in it, and hope you'll tolerate my terrible English.

      Hope somebody would help me, and I'll thanks you very much.

 

/********************testing code***************************
*FileName:test.c
*Version:\*Copyright:N
*CPU:ADUC7024_ARM7TDMI
*Author:crow2218
*Description: ONLY FOR TEST, watch the GP4's output through an oscillograph
to see if the chip will working normally
***********************************************************/

/**************error description****************************
When I make a project, I found some data losing. After all, I found
this is caused by the
high frequency setting. When I setting the frequency, I changed a
register shouldn't be changed
by accident and the chip dead, and after this, when I download by JTAG
the KEIL give the information:
        Could not stop ARM device!
        Please check the JTAG cable.
Press OK then show up the message,
        Error: Flash Download failed - Target DLL has been cancelled

While using the serial download, there's no response from the chip.

I've checked the JTAG wire and the power for times, they should be
with no problem.

I think this maybe caused by a wrong value gived to the register, but
the chip shouldn't be
dead by writing a value to a register. In order to prove this may
caused by I write wrong
number to the register, I killed another chip. As the project wouldn't
wait for me, so I can't kill
the third one for this moment.

If the processor haven't dead will miss data with a high frequency.

Is the processor dead?
What if the chip is dead??

Is it caused by write a wrong number to the register?
Is there some method to solve these problems?
***********************************************************/

//Now the main file started

#include <aduc7024.h>

//int t2valold;

/***********************************************************
Delay for a time
***********************************************************/
void Delay(int i)
{
        while(i!=0)
                i--;
}

/***********************************************************
Initialize the PLL
***********************************************************/
void PLLInit(void)
{
        //GP0CON&=0x0FFFFFFF;                     //P0.7
        //GP0CON|=0x10000000;

        T2LD=0x05;
        T2CON=0x480;
        //★★After writing a wrong value to T2CON by accident, the chip will
dead and wouldn't wake
        //up by different ways I could think out! (But I'm not sure if the
chip dead by this.)

        //while((T2VAL==t2valold)||(T2VAL>3));
        //★I wonder if there's something wrong as this is a copy from an example code
        //but don't know the t2valold is what's time's t2val, so I used the
Delay() function.
        Delay(100);

        IRQEN=0x10;
        PLLKEY1=0xAA;
        PLLCON=0x01;
        PLLKEY2=0x55;
        POWKEY1=0x01;
        POWCON=0x22;             //★the output will missing(GP4) if the frequency is
higher, and the higher, the more missing
        POWKEY2=0xF4;
}


/***********************************************************
main function, generate the PWM on GP4
***********************************************************/
int main(void)
{

        int i;

        PLLInit();
        FIQEN=0x00;                     //disable fiq
        GP4CON=0;                       //init GP4 for testing
        GP4DAT=0xFF000000;

        while(1)
        {
                if(i>100)
                        i=0;
                i++;
                //GP4DAT=0xFFFF0000;
                GP4SET=0x00FF0000;
                Delay(i+10);
                //GP4DAT=0xFF000000;
                GP4CLR=0x00FF0000;
                Delay(i+10);
        }
}

Outcomes