English
Language : 

UPSD3422_06 Datasheet, PDF (21/293 Pages) STMicroelectronics – Turbo Plus Series Fast Turbo 8032 MCU with USB and Programmable Logic
uPSD34xx
Memory organization
4.2.1
4.2.2
Note:
4.2.3
Program memory
External program memory is addressed by the 8032 using its 16-bit Program Counter (PC)
and is accessed with the 8032 signal, PSEN. Program memory can be present at any
address in program space between 0x0000 and 0xFFFF.
After a power-up or reset, the 8032 begins program execution from location 0x0000 where
the reset vector is stored, causing a jump to an initialization routine in firmware. At address
0x0003, just following the reset vector are the interrupt service locations. Each interrupt is
assigned a fixed interrupt service location in program memory. An interrupt causes the 8032
to jump to that service location, where it commences execution of the service routine.
External Interrupt 0 (EXINT0), for example, is assigned to service location 0x0003. If
EXINT0 is going to be used, its service routine must begin at location 0x0003. Interrupt
service locations are spaced at 8-byte intervals: 0x0003 for EXINT0, 0x000B for Timer 0,
0x0013 for EXINT1, and so forth. If an interrupt service routine is short enough, it can reside
entirely within the 8-byte interval. Longer service routines can use a jump instruction to
somewhere else in program memory.
Data memory
External data is referred to as XDATA and is addressed by the 8032 using Indirect
Addressing via its 16-bit Data Pointer Register (DPTR) and is accessed by the 8032 signals,
RD and WR. XDATA can be present at any address in data space between 0x0000 and
0xFFFF.
The uPSD34xx has dual data pointers (source and destination) making XDATA transfers
much more efficient.
Memory placement
PSD Module architecture allows the placement of its external memories into different
combinations of program memory and data memory spaces. This means the main Flash,
the secondary Flash, and the SRAM can be viewed by the 8032 MCU in various
combinations of program memory or data memory as defined by PSDsoft Express.
As an example of this flexibility, for applications that require a great deal of Flash memory in
data space (large lookup tables or extended data recording), the larger main Flash memory
can be placed in data space and the smaller secondary Flash memory can be placed in
program space. The opposite can be realized for a different application if more Flash
memory is needed for code and less Flash memory for data.
By default, the SRAM and csiop memories on the PSD Module must always reside in data
memory space and they are treated by the 8032 as XDATA.
The main Flash and secondary Flash memories may reside in program space, data space,
or both. These memory placement choices specified by PSDsoft Express are programmed
into non-volatile sections of the uPSD34xx, and are active at power-up and after reset. It is
possible to override these initial settings during runtime for In-Application Programming
(IAP).
Standard 8032 MCU architecture cannot write to its own program memory space to prevent
accidental corruption of firmware. However, this becomes an obstacle in typical 8032
systems when a remote update to firmware in Flash memory is required using IAP. The PSD
module provides a solution for remote updates by allowing 8032 firmware to temporarily
“reclassify” Flash memory to reside in data space during a remote update, then returning
21/293