The ST10 microcontrollers offer an addressable space of 16 Mbytes. The on-chip
peripherals, the on-chip RAM and Flash memory cover only a small fraction of this
addressable space leaving the remaining space to be used to interface external peripherals
and memories with the ST10.
This application note is divided into two parts. The first acts as a brief overview of features of
the ST10 external bus such as the EBC operating modes, port pins timing and maximum
addressable space.
The second part of the document describes how to connect external memory to the ST10.
In the sections contained in this part, the use of both demultiplexed and multiplexed buses is
considered, giving examples of word-wide and byte-wide memory.
This application note does not replace the ST10 user manuals or data sheets.
The ST10 External Bus Controller provides the user with a number of options:
●to enable the ST10 to be run entirely from external memory (code and/or data storage)
●to use combinations of on chip and external memories up to the 16 MBytes limit
●to access some internal resources (X-peripherals, XFlash, XRAM)
1.1 EBC operating modes
The ST10F27x offers the following operational modes:
●16-/18-/20-/24- bit addresses and 16-bit data demultiplexed
●16-/18-/20-/24- bit addresses and 16-bit data multiplexed
●16-/18-/20-/24- bit addresses and 8-bit data demultiplexed
●16-/18-/20-/24- bit addresses and 8-bit data multiplexed
The ST10 provides up to 5 CSx signals which can be programmed to operate in different
modes. Each CSx mode and characteristics are selected independently allowing the
possibility to interface the ST10 with different external resources.
CS0 operating mode is selected by hardware according to the fields BYTP0 and BYTP1
(P0L.6 and P0L.7).
CS1...CS4 operating modes are selected by software via the field BYTP in the
corresponding BUSCONx register.
For a detailed description of these modes, the ST10 EBC-related registers and their
configurations, refer to the ST10 user manuals.
1.2 EBC Port pins control
The ST10 external memory interface is implemented through 4 ports: P0, P1,P4 and P6 in
addition to some dedicated pins.
When the ST10 bootstrap mode is switched off, ST10 devices with embedded Flash give the
user the possibility to boot either from the internal Flash or from external memory. The boot
memory is selected according to the EA pin level during reset.
In order to start fetching code from the internal Flash, EA
reset. Otherwise, the ST10 starts executing the program code stored in the external
memory.
When booting from internal Flash, an access can be performed to an external resource if
required. This resource can be interfaced to the ST10 using any of the CSx chip selects and
the related configuration registers should be set according to its characteristics.
1.4 EBC timing
An external bus memory cycle specifies the time required to perform a read or write access
to an external resource.
It depends on the ST10 speed, the bus configuration (address and data on the same or
different busses) and the external resource characteristics.
The ST10 EBC allows the user to adapt the controller's external bus cycles to the external
memory characteristics. For example, the access time can be enlarged to allow access to
very slow memories.
The user can act on the following parameters to adapt the EBC cycle timing to the external
memory.
●Wait states: up to 15 wait states can be inserted to extend the memory access time. As
an example, a 40 MHz ST10 operating frequency gives a 25ns CPU cycle. If it is
necessary to access memory with an access time of 90ns = 25ns + 65ns, at least 3
wait states need to be inserted in the EBC cycle (25ns * 3 = 75ns).
●Ready functionality: If 15 wait states are not sufficient or in the case the external
memory access time is not constant, then the READY signal can be used to monitor
the end of the EBC cycle. In the example above, if the access time is greater than 25ns
+ 15x25ns = 400ns, then the READY signal can be used to force the ST10 to wait until
the data is available.
should have a high level during
4/14
AN2164EBC overview
●Tristate wait state: In the case the external memory needs time to switch off its bus, a
CPU cycle (tri-state) can be inserted after the RD command deactivation.
●ALE length signal can be lengthened by a half CPU cycle giving more time to latch the
address on the external bus.
The following parameters adapt the ST10 to the external memory without extending the
EBC cycle time
●Read/Write Delay: The Read/Write CS can be delayed by a half CPU cycle after the
falling edge of the ALE signal. This does not extend the EBC cycle.
●CS signal control: The user has the possibility to change the CS signal half CPU cycle
after the ALE rising edge or at with the ALE rising edge.
1.5 EBC maximum addressable space
The CSSELx (PH0.1 and P0H.2) field sampled at the end of a hardware reset controls the
active number of CSx signals.
The SALSELx (P0H.3 and P0H.4) field sampled at the end of a hardware reset selects the
number of address lines addressing an external location. It determines the size of the
maximum addressable space per chip select CSx. The following table gives the different
configurations.
Table 2.
P0H.3/P0H.4Maximum EBC addressable space per CSAddress lines used
ST10 EBC addressable space
0164 KbytesA0 .. A15 ( P1)
11256 KBytesA0 .. A17 ( P1 , P4.0 & P4.1)
001 MByte A0 .. A19 ( P1, P4.0 .. P4.3)
1016 MBytesA0 .. A23( P1 & P4)
Each CS1 … CS4 has its related ADDRSELx register to map the external memory within
the ST10 memory space. This register configures the size of the window allocated to the
external memory and its start address.
Note:The size specified in this register should not exceed the one specified by the SALSELx field.
For more details, please refer to the ST10 user manual.
CS0 can write to/read from any memory location outside the windows allocated to the
remaining CSx signals with respect to the maximum addressable space.
5/14
Loading...
+ 9 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.