Accessing external memory in MC9S12NE64

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Accessing external memory in MC9S12NE64

997 Views
shyam_adsul
Contributor I
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  

Labels (1)
0 Kudos
1 Reply

245 Views
DrSeuss
Contributor I
This is normal. Please see page 16 of AN2287, on the freescale website.
Basically the PPAGE value is shifted on XAD lines to create a linear address for the memory.
0 Kudos