Programming Considerations; Chip-Select Unit Code Example - Intel 386 User Manual

Embedded microprocessor
Table of Contents

Advertisement

Intel386™ EX EMBEDDED MICROPROCESSOR USER'S MANUAL

14.6 PROGRAMMING CONSIDERATIONS

When programming the CSU, consider the following:
When programming a chip-select channel, always program the Low Mask Register last.
This ensures that all other bits are properly programmed before the region is enabled. When
reprogramming the channel, always disable the channel before changing anything else.
A chip-select channel is enabled by setting bit 0 of its Chip-Select Low Mask register and
its output signal is connected to the package pin by setting or clearing the appropriate
PINCFG or P2CFG register bit. The PINCFG and P2CFG registers are shown in Figures
14-4 and 14-5.
The minimum address block for memory address-configured channels is 2 Kbytes and for
I/O address-configured channels is 2 bytes. The size of these address blocks can be
increased by powers of 2 Kbytes for memory addresses and by powers of 2 bytes for I/O
addresses.
A channel's address block of size n always starts on an n address boundary.

14.6.1 Chip-Select Unit Code Example

This following code example initializes the UCS and CS4 channels of the CSU. See Appendix C
for the included header files.
#include <conio.h>
#include "80386ex.h"
#include "EV386EX.h"
/*
Description:
Initialize Chip Select Unit for:
UCS:
Start address is 00H.
Region size is 512 Kbytes.
0 wait states.
Upper chip select is Enabled.
16 bit data bus size in memory space.
External bus ready is Disabled.
SMM region is accessible during SMI access and memory access.
CS4:
Start address is 080000H.
Region size is 512 Kbytes.
0 wait states.
Chip select 4 is Enabled.
16 bit data bus size in memory space.
External bus ready is Disabled.
SMM region is accessible during SMI access only.
Parameters:
None
14-22

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Intel386 exIntel386 extbIntel386 extc

Table of Contents