Shyam Adsul

Accessing external memory in MC9S12NE64

Discussion created by Shyam Adsul on Jan 3, 2007
Latest reply on Jan 4, 2007 by James Williams
Hi all,
I am working on MC9S12NE64 microcontroller.
I am using it in Normal Expanded Wide mode where in my external memory starts from 0x208000. 
Corresponding PPAGE register value is 20. EMK bit in mode register is set.
I am booting as Normal single chip mode and then putting my processor in  Normal Expanded Wide.

 
 
For this I added startup code as below:
************************************************************************
 LDD  #$0CE2
 STD  $0A
  
 LDAA #$01
 STAA $13
   
 LDAA #$00
 STAA $0E
 ************************************************************************
 
 
The way I am trying to write on external memory is as follow.
 ************************************************************************ 
unsigned int *far p=(unsigned int *far)(0x208000);

 

while(1)

{

*p=0x5555;

}

 ************************************************************************ 

   

I am expecting PPAGE value should reflect on XADD19 to XADD14. When I probed XADD19 pin on oscilloscope, I observed that it is continuously low, which is not correct. Instead I am getting activity on XADD18. 

Please let me know if I am missing anything.

 

 

Thanks and Regards,

Shyam  

Outcomes