Hi All, I'm experiencing something I don't understand in the setup/definition of external bus address windows in a Infineon C167 processor using Keil 4.20C and the Start167.A66 file. The following memory map with 0xC00000 to 0xDFFFFF unasigned (defaults to CS0) works correctly in all address windows.
//This config causes reads/writes at 0x800000 to 0x80FFFF //to properly use Chip Select 0 (CS0). Note that the //window for Address2 is only 2MB verses 4MB //----------------------------------------------------- %DEFINE(ADDRESS1) (0400000H) %DEFINE(RANGE1) (4096K) %DEFINE(ADDRESS2) (0A00000H) %DEFINE(RANGE2) (2048K) %DEFINE(ADDRESS3) (0E00000H) %DEFINE(RANGE3) (1024K) %DEFINE(ADDRESS4) (0F00000H) %DEFINE(RANGE4) (1024K) /* 0xFFFFFF ---------+--------------+ | 8 Bit CS4| 0xF00000 | Devices | ---------+--------------+ 0xEFFFFF | 16 Bit CS3| 0xE00000 | Devices | ---------+--------------+ 0xDFFFFF | CS0| | | | | 0xC00000 | | ---------+--------------+ 0xBFFFFF | R CS2| | A | | M | 0xA00000 | (2) | ---------+--------------+ 0x9FFFFF | CS0| | Flash | | Programming | 0x800000 | Space | ---------+--------------+ 0x7FFFFF | CS1| | | | R | | A | | M | | (1) | | | 0x400000 | | ---------+--------------+ 0x3FFFFF | CS0| | C | | O | | F D | | L E | | A | | S | 0x000000 | H | ---------+--------------+ */
//This config causes reads/writes at 0x800000 to 0x9FFFFF //to use Chip Select 2 (CS2) instead of Chip Select 0 //----------------------------------------------------- %DEFINE(ADDRESS1) (0400000H) %DEFINE(RANGE1) (4096K) %DEFINE(ADDRESS2) (0A00000H) // %DEFINE(RANGE2) (4096K) //<-Only change right here %DEFINE(ADDRESS3) (0E00000H) %DEFINE(RANGE3) (1024K) %DEFINE(ADDRESS4) (0F00000H) %DEFINE(RANGE4) (1024K) /* 0xFFFFFF ---------+--------------+ | 8 Bit CS4| 0xF00000 | Devices | ---------+--------------+ 0xEFFFFF | 16 Bit CS3| 0xE00000 | Devices | ---------+--------------+ 0xDFFFFF | CS2| | R | | A | | M | | (2) | | | | | | | 0xA00000 | | ---------+--------------+ 0x9FFFFF | CS0| | Flash | | Programming | 0x800000 | Space | ---------+--------------+ 0x7FFFFF | CS1| | | | R | | A | | M | | (1) | | | 0x400000 | | ---------+--------------+ 0x3FFFFF | CS0| | C | | O | | F D | | L E | | A | | S | 0x000000 | H | ---------+--------------+ */
With address window size of 4096K the start address of the range can only be a multiple of 4096K. 0xA00000 is 10M, so probably in hardware it works just like 8M. Regards, - Mike