==========================================================================
                   FLASH Programming Demo for MB91F467D 
==========================================================================
                   Fujitsu Microelectronics Europe GmbH                       
                 http://emea.fujitsu.com/microelectronics 
                                                            
 The following  software  is for  demonstration  purposes only.  It is not
 fully  tested, nor validated  in order  to fullfill  its task  under  all
 circumstances.  Therefore,  this software or  any part of it must only be
 used in an evaluation laboratory environment.                        
 This software is subject to the rules of our standard DISCLAIMER, that is
 delivered with our  SW-tools on the Fujitsu Microcontrollers CD 
 (V3.4 or higher "\START.HTM") or on our Internet Pages:
 http://www.fme.gsdc.de/gsdc.htm
 http://emea.fujitsu.com/microelectronics 
==========================================================================
               
History
Date      Ver   Author  Softune   Description
25.06.06  1.0   RSchum  V60L05R05 First Version

06.07.06  1.1   RSchum  V60L05R05 Preparation of Read/Write Mode included

                                  Save Disable and Restore Global Inter-
                                  rupt Flag included

                                  Sector Erase Suspend/Resume Included
                                  
                                  Reload Timer Interrupt included to show
                                  how to handle Interrupts while erasing
                                  FLASH sectors.

10.07.06  1.2   RSchum  V60L05R05 Error in FLASH_WriteHalfWord corrected

12.07.06  1.3   RSchum  V60L05R05 Sector Blank Check Function added

06.12.06  1.4   RSchum  V60L06    - Few bugs in demo fixed
                                  
                                  - Xalign option added (needed for Speed
                                    optimization)
                                    
                                  - ST RP,@-R15 and LD @R15+,RP added to
                                    assembly routines (needed for size
                                    optimization) 
                                                                 
==========================================================================

This is simple demo showing how to use the FLASH programming Auto
Algorithms.

Target of this demo is to show application of the following aspects of
FLASH memory erase/write:

1) Preparation of FLASH Read/Write Mode (via BootROM routine)
2) Sector Erase
3) Sector Erase Suspend/Resume
4) Write Word/Halfword to FLASH memory addresses

Remarks:

A) Reload Timer 0 is setup to demonstrate handling of Interrupt Requests
   via polling and subsequent Sector Erase Suspend, Restore Global 
   Interrupt Flag, Handling of IRQ and Sector Erase Resume.
   
B) Handling of RAMCODE is added to Start91460.asm because FLASH prog.
   routines have to be run from RAM since no code fetching is possible
   while write/erase of FLASH memory.

Connect MCU UART4 to Terminal Program (19200Baud 8N1). After Power On
a welcome message is output on UART4. The Action of Reload Timer 0 is
to increase a counter displayed on LED D1..D8 of SK-91F467D-208PFV each
0.010s.
The FLASH memory Sector content at Addresses 0x80000 up to 0x80010 is
shown.
After this the Sectors 0x80000, 0x90000, 0xA0000 will be erased by Sector
Erase commands (these Sector Erase Commands are repeatedly interrupted by
Reload Timer 0 Interrupts which are handled form FLASH memory (Sector 
Erase Suspend/Resume).
When the Sectors are earsed a few data are programmed to some given 
addresses in the sector 0x80000. 
Finalythe FLASH memory content at addresses 0x80000 up to 0x80010 is shown
again to confirm the programmed values.
