AnsweredAssumed Answered

Register address is wrong.

Question asked by li cang on Nov 2, 2011
Latest reply on Nov 2, 2011 by CrasyCat

My CPU:9s12DP512.

 

void main(void)
{     
  MMCCTL1 =  1;                 
  /* DIRECT: DP15=0,DP14=0,DP13=0,DP12=0,DP11=0,DP10=0,DP9=0,DP8=0 */
  DIRECT = 0;                  
  /* IVBR: IVB_ADDR=255 */
  IVBR = 255;     
  
  ECLKCTL = 64;

 

  while(1);

}

 

 

some warning information here:

 

L1823: External object _MMCCTL1 in E:\TestXgate\Project_2_Data\Standard\ObjectCode\main.c.o created by default


L1823: External object _DIRECT in E:\TestXgate\Project_2_Data\Standard\ObjectCode\main.c.o created by default


L1823: External object _IVBR in E:\TestXgate\Project_2_Data\Standard\ObjectCode\main.c.o created by default


L1823: External object _ECLKCTL in E:\TestXgate\Project_2_Data\Standard\ObjectCode\main.c.o created by default

 

And then I debug it by BDM, find that :

MMCCTL1 address changed from 0x0013 t0 0x0000(Compiler setting).

DIRECT address is okay.

ECLKCTL address is wrong ,change to 0x03.

 

Why it is not right address.

Outcomes