AN1177 STMicroelectronics, AN1177 Datasheet - Page 2

no-image

AN1177

Manufacturer Part Number
AN1177
Description
P51XA-PSD8XX DESIGN GUIDE
Manufacturer
STMicroelectronics
Datasheet
AN1177 - APPLICATION NOTE
updates. PSD8XX devices are capable of both ISP and IAP. Keep in mind that IAP can only program the
memory sections of the PSD and not the configuration and programmable logic portions. With ISP, the
entire PSD can be erased or programmed.
The IAP Problem
Typically, a host computer downloads firmware into an embedded flash system through a communication
channel that is controlled by the MCU. This channel is usually a UART, but any communication channel
that the P51XA supports will do. The P51XA must execute the code that controls the IAP process from an
independent memory array that is not being erased or programmed. Otherwise, boot code and Flash
memory programming algorithms (IAP loader code) will be unavailable to the P51XA. It is absolutely nec-
essary to use an alternate memory array (an independent memory that is not being programmed) to store
the IAP loader code.
A system designer must choose the type of alternate memory to store IAP loader code (ROM, SRAM,
FLASH, or EEPROM); each type has advantages and disadvantages. This alternate memory may reside
external to the MCU or on-chip. A top-level view of an embedded IAP flash system with external memory
is shown in Figure 1.
Figure 1. Embedded Flash System Capable of IAP (5 devices)
Main Flash Memory
128 KBytes
Host
Computer
Alternate Memory
P51XA
for ISP Loader Code
CPLD
System SRAM
Communication
8 KBytes
Channel
System I/O
Embedded System
AI03326B
Another problem, which is specific to the P51XA architecture, is related to the separate “Program” and
“Data” address spaces. The P51XA cannot write to Program space, but that is where the Flash memory
resides that holds P51XA firmware. How can one program Flash memory in-system if the P51XA cannot
write to program space?
A Common Solution
Without a PSD device, implementing IAP with the P51XA can be difficult and time consuming. Philips’ ap-
plication note AN440 contains a RAM loader program (bootstrap loader). It shows how to load code into
an external RAM over a serial link after power-up and how to switch execution to that RAM to complete
the boot sequence. This can be a cumbersome and error prone exercise using re-locatable code in volatile
memory, which is difficult to debug, vulnerable to power outages, and not supported by all emulators. Ad-
ditionally, this method restricts the designer to using a UART to implement IAP.
To overcome the issue of Program versus Data space, a common practice is to combine the two address
spaces, which reduces the total address space of the P51XA by 50%.
A BETTER, INTEGRATED SOLUTION
Figure 2 shows a two-chip solution using an Flash PSD813F. This system has ample main Flash memory,
2/26

Related parts for AN1177