Part Number Hot Search : 
VEC2307 VEC2307 16LT1 HT7750 ISPLSI HCT08 APTGT TLP3203
Product Description
Full Text Search
 

To Download C5XX Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 Microcontrollers ApNote
APXXXX01.EXE available
AP0821 o
additional file
C5XX / 80C5XX In-System FLASH Programming
The following approach describes the proceeding for in-system reprogramming of an external (5V-only) FLASH code memory by using the internal ROM code. Due to the Havard Architecture, an additional external logic (PLD) is used for a software switching mechanism between code and data memory.
K. Scheibert / Siemens HL MC AT
Semiconductor Group
08.96, Rel. 01
C5XX / 80C5XX In-System FLASH Programming
1 2 3
Memory Organization ............................................................................................. 4 Hardware Description............................................................................................. 5 Functional Description of the ROM Software Routine ........................................ 7
AP0821 ApNote - Revision History Actual Revision : Rel.01 Previous Revison: Rel. none Page of Page of Subjects changes since last release) actual Rel. prev. Rel.
Semiconductor Group
2 of 7
AP0821 08.96
C5XX / 80C5XX In-System FLASH Programming
In-System FLASH Programming with hardware implemented bank switching capability The following information concerns all microcontrollers of the C5XX / SAB 80C5XX family which use an internal ROM mask in combination with an external code FLASH memory. The external FLASH memory can be used as reprogrammable code memory for the application software. This application focuses on SIEMENS 8-bit microcontroller derivatives with internal code memory (ROM) sizes of 8/16 Kbyte in maximum because of the overlapped code memory area of the FLASH memory of 8/16 Kbyte cannot be used: * * * * * * * * C501-1R C502-2R C504-2R C511(A)-R C513(A)-R/-2R C515-1R SAB 80C535 SAB 80C537
This application note describes the proceeding for the in-system reprogramming of application software by using special application hardware for memory bank switching and software programming service routines in the internal mask programmable ROM for external FLASH memories (5V-only). Due to the Harvard Architecture (separate code memory and data memory areas) erasing and writing of the FLASH memory only can be done when mapping it in the corresponding data memory area. This will be achieved by using a port pin as a software switch which distinguishes between Normal Mode and Programming Mode in combination with a PLD (Programmable Logic Device).
Semiconductor Group
3 of 7
AP0821 08.96
C5XX / 80C5XX In-System FLASH Programming
1 Memory Organization
In Normal Mode, the 8/16 Kbyte of the application SW are located in the maskprogrammable internal ROM and cannot be modified in-system. Therefore the bank switching mechanism, erasing/programming/verifying software service routines for the external FLASH memory and user specific routines (which mustnt be modified in the application) are located in the internal ROM. Interrupt service routines can be located in the external FLASH memory by programming corresponding LJMP instructions to interrupt vector addresses in the ROM location. The hardware implemented code roll over mechanism in the C5XX/80C5XX derivatives when using internal ROM by EA# = 1 do switch on external bus accesses to the FLASH memory above the ROM boundary of 8/16 Kbyte. The PSEN# signal and the address and data information at P0/P2 will then be enabled automatically. External accesses to the RAM located in data memory via MOVX instructions are possible in Normal Mode up to 64 Kbyte.
Normal Mode
Code Memory
FFFFH ident_bytes
Programming Mode
Code Memory
FFFFH
Data Memory
FFFFH
Data Memory
FFFFH ident_bytes
ext. FLASH AREA ext. RAM AREA 64 KByte
not used
ext. FLASH AREA
4000H 3FFFH 2000H 1FFFH 0000H
16 KByte int. ROM AREA 8 KByte 0000H
4000H 3FFFH 2000H 1FFFH 0000H
16 KByte int. ROM AREA 8 KByte
4000H 3FFFH not used 2000H 1FFFH not used 0000H
Figure 1: Memory Organization for Normal Mode and Programming Mode.
Semiconductor Group
4 of 7
AP0821 08.96
C5XX / 80C5XX In-System FLASH Programming
2 Hardware Description
In Figure 2 below, the circuit diagram of the bank switching architecture can be found:
Vcc
EA#
ALE
P0
x573
A0-7
A0-7
C5XX 80C5XX
FLASH Memory
D0-7
RAM Memory
D0-7
P2
P3.6 WR# P3.7 RD# PX.X PSEN# PM#
A8-15 WR# RD# OE#
A8-15 OE# RD# WR#
PLD
RDF# WRF# OER#
Figure 2: Circuit Diagram with Bank Switching Mechanism In Table 1 below, the signals used for the bank switching mechanism can be found:
Port Pin PSEN# PX.X P3.7 P3.6 PLD.X PLD.X PLD.X Signal Name PSEN# PM# RD# WR# RDF# WRF# OER# Comment Program Store ENable signal is activated only at external bus accesses in the code memory area above 8/16 Kbyte Programming Mode signal is used for switching between Normal Mode and Programming Mode ReaD signal is activated for external data memory read accesses in connection with MOVX instructions WRite signal is activated for external data memory write accesses in connection with MOVX instructions ReaD Flash signal is connected to the RD# input of the FLASH memory WRite Flash signal is connected to the WR# input of the FLASH memory Output Enable RAM signal is connected to the OE# input of the RAM
Semiconductor Group
5 of 7
AP0821 08.96
C5XX / 80C5XX In-System FLASH Programming
The PLD combines the output signals WR#, RD#, PSEN# and PM# to the output signals RDF#, WRF# and OER#. The signal PM# is used as a software switch for the bank switching algorithm. After power-on reset, this pin outputs 1and selects Normal Mode for program execution. In this mode the WRF# output of the PLD is disabled and PSEN# is wired to RDF# through the PLD. WR# and RD# are directly connected to the RAM and are used for accesses to the data memory area. With setting PM# = 0, the bank switching mechanism switches over to Programming Mode. In this mode the external RAM memory is disabled via OER# = 1 and the WR# and RD# input signals of the FLASH memory are wired to the corresponding WR# and RD# output signals from the microcontroller through the PLD. In this configuration it is possible to have external data accesses to the FLASH memory via MOVX instructions fetched from the internal code memory area (ROM). In this mode PSEN# remains at 1 because of internal code access in combination with EA# = 1. It is not permitted to execute code in the Programming Mode above the internal ROM size boundary of 8/16 Kbyte because of the inevitable activation of the PSEN# output. The following equations for the PLD can also be found in Figure 3 below: * RDF# = PSEN# AND ( PM# OR RD# ) * WRF# = PM# OR WR# * OER# = NOT PM#
PLD
PSEN# PM# RD# RDF#
&
WR#
WRF#
1
OER#
Figure 3: PLD - Logical Equations
Semiconductor Group 6 of 7 AP0821 08.96
C5XX / 80C5XX In-System FLASH Programming
3 Functional Description of the ROM Software Routines
After power-on reset, the system automatically starts up with EA# = 1 in Normal Mode at address 0000H in the internal code memory area (ROM). After the execution of the user specified initialization routines some ident_bytes (see Figure 1) in the upper FLASH memory location can be read out by using MOVC instructions. This ident_bytes are used as identifieres for a preprogrammed FLASH memory and should contain a useful combination of some bytes which normaly cannot occur in an emty device. This software check by the customer software can also contain a calculation of a checksum for safty purposes. If this software detects the FLASH memory as preprogrammed, the application software starts up regulary. Otherwise the software will branch into the bank switching routine, PM# is set to 0 (selection of the Programming mode) and the communication with an external host via serial interface has to be established. Source code then can be transfered from the external host to the FLASH memory by using erase/program and verify service routines, which are FLASH derivative specific. After programming and verifying the new contents in the FLASH memory, PM# can be switched back to 1 = Normal Mode and the application software is able to start up now. Some customers may have the demand for reprogramming their application system e.g. for in-system software updates. In this case a special diagnostics mode has to be implemented in the internal ROM location, which can be detected e.g. by using a special diagnostics input pin. When starting up, the diagnostic input pin will be tested and software branches to the diagnostic routines, which allows the reprogramming of the external FLASH memory. The proposed solution represents an approach towards in-system programming using FLASH technology implemented on Siemens microcontrollers. As these devices can easily be programmed for several times, this structure leads to reduced system costs and a comfortable way of changing program code.
Semiconductor Group
7 of 7
AP0821 08.96


▲Up To Search▲   

 
Price & Availability of C5XX

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X