Urgent! Silicon Bug? DAC will not work when P0 is used as analogue at ADUC7061

Several weeks before, I found the ADC sample wrong data from channel 8, at that time , i deem that the analogue mux works incorrectly.

But after trying for several weeks, i found the truth is that the DAC will not work when P0.0~P0.3 are used as analogue input for ADC1.

It is simple to valid it.. Run codes as following, and observe by oscillometer. it seems like this:

When p0 is used as analogue, the output of DAC is not lineal. It seems that some parts are float in device internally.

My board can't be changed any more, is there anybody have solution to deal this bug?

Best regards!

I write code like this:

DACCON = 0x0010; //ref=1.2

DACDAT = 0x7000000;

while(1)

{

GP0KEY1 = 0x7; //Write to GP0KEY1
GP0CON1 = 0x0; //io mode
GP0KEY2 = 0x13;

DelayMs();

GP0KEY1 = 0x7; //
GP0CON1 = 0x1; //analog input mode
GP0KEY2 = 0x13;

DelayMs();

}

void DelayMs(void)
{
char i, j,k;
for (k=0; k<40; k++)
{
for (j=0; j<120; j++)
{
for (i=0; i<120; i++)
{
T2CLRI = 0x55;
}
}
}
}