hi,I'am Interfacing HCS12(mc9s12kt256) Microcontrollers to the MFR4310 FlexRay Controller.But I do not know how to access external bus.
I have configured the MCU to normal expanded wide mode(PEAR=0xAC,EBICTL=0x00,MISC=0x0DMODE= 0xED),and I can see ECLK ,W/R,LBSTRB signal sent out.But I know all the signals above are generated by accessing internal memory.I have also consulted the AN3260 (Interfacing HCS12 Microcontrollers to the MFR4310 FlexRay Controller), the example makes me confused,especially the statement below
// Set up ports
PORTB = 0xFF; // Port B = 0xFF
DDRB = 0xFF; // Set port B as output
PTS = 0x00; // Port S = 0x00
DDRS = 0x04; // Set port PS2 as output
// Enable PULL UPS on PTE
PUCR_PUPEE = 1; // Pull ups enabled on bits 7, 4-0
PTH = 0x04; // ASC[2, 1, 0] = 100match 0x8000 on ADR bus
DDRH = 0x07; // make PortH an Output
PPAGE = PAGE0; // Pages $00 - $2F = External
// Pages $30 - $3F = Internal
I donot know why this example would have configure PORTB and DDRB first,in the expande mode ,aren;t they used as buses ?and I can not find any detail in my KT256 mannual about pages pointing to extermal address.How can I access the external bus ?