I'm designing a system with these main components:
I've a lot of information about hardware interface and registers but few about CodeWarrior Project settings.
A simple schematic was attached in order to illustrate what I'm trying to do.
The chosen memory can be easily controlled by uC signals but I don't know how to make my code address correctly using FAR key word.
Following uC datasheet, AN2708 and AN2992, I got these registers values:
EBICTL0 : 0x33
--------
||||||||
|||+++++- ASize: 10011 - External Address Bus Size (19 lines)
||+------ HBDE : 1 - High Data Byte Enabled
|+------- 0 : 0 - Always 0
+-------- ITHRS: 0 - Reduced Input Threshold disabled (Standard Level on all pins)EBICTL1 : 0x00
--------
||||||||
|||||+++- EXSTR0: 000 - External Access Stretch Option 0
||||+---- 0 : 0 - Always 0
|+++----- EXSTR1: 000 - External Access Stretch Option 1
+-------- 0 : 0 - Always 0MMCCTL0 : 0x0C
--------
||||||++- CS0 : 0x00 - Chip Select 0 Disabled
||||++--- CS1 : 0x11 - Chip Select 1 Enabled
||++----- CS2 : 0x00 - Chip Select 0 Disabled
++------- CS3 : 0x00 - Chip Select 0 DisabledMODE : 0xA0;
--------
|||+++++- 0 : 00000 - Sempre 0
+++------ MOD[C:A] : 101 - Normal Expanded Mode
Suppose I have a program segment that needs to be completely fitted inside 200000h–3FFFFFh.
I know I can use absolute address and set a variable at that address.
But how can I do it automatically for variables and code?
Today I have a project using EBI with HCS12DP512.
In this project, I set PRM file and everything was ok because my External Memory is only 16KB.
PPage was not necessary and my code was treated like an internal firmware.
However, in this new project, I need that every single access use the correct PPage.
Thanks.
Hello ,
- There is a External bus design demo and DOC :
S12XD, S12XE - External BUS design - Addendum To AN2708
- There is a FAR Keyword demo as Jennie support:
Hope it helps
Alice