DataSheet.es    


PDF AN944 Data sheet ( Hoja de datos )

Número de pieza AN944
Descripción Software Drivers
Fabricantes STmicroelectronics 
Logotipo STmicroelectronics Logotipo



Hay una vista previa y un enlace de descarga de AN944 (archivo pdf) en la parte inferior de esta página.


Total 30 Páginas

No Preview Available ! AN944 Hoja de datos, Descripción, Manual

www.DataSheet4U.com
AN944
APPLICATION NOTE
SOFTWARE DRIVERS for M29F100 FLASH MEMORY
CONTENTS
Introduction
The M29F100
Programming Model
Modifying code from
Am29F100
Generating
SGS-THOMSON Code
C Library Functions
Adapting the Software for
the Target System
Limitations of the code
Connection to Common
Microprocessors
Conclusion
Source Code
M29F100A.H
Header file for 16 bit C
Routines library
M29F100A.C
16 bit C Routines library
M29F100B.H
Header file for 8 bit C
Routines library
M29F100B.C
8 bit C Routines library
These files may be down-
loaded from www.st.com or
obtained from any Sales of-
fices on PC compatible floppy
disk.
INTRODUCTION
This application note provides library source code in C for the
M29F100 Flash memory. There are two different M29F100
parts, the M29F100B and M29F100T. In this application note
the term M29F100 can refer to either part.
The application note includes listings of the source code which
is also available in file form. The m29f100a files contain libraries
for accessing the M29F100 Flash memories in 16-bit bus mode,
whereas the m29f100b files contain the 8-bit drivers.
An overview of the programming model for the M29F100 is
given. The programming differences between the M29F100 and
AMD’s Am29F100 are described. Advice on how to modify
programs already written for AMD’s device to work with the ST
device is included.
The source code is written to be as platform independent as
possible and requires minimal changes by the user in order to
compile and run. The application note explains how the user
should modify the source code for their individual target hard-
ware. All of the source code is backed up by comments explain-
ing how it is used and why it has been written as it has.
Brief hardware connections to some common microprocessors
are provided at the end of the application note to help the
designer understand the bus requirements of the M29F100.
This application note does not replace the M29F100 Data
Sheet. It refers to the Data Sheet throughout and it is necessary
to have a copy in order to follow some of the explanations.
The software and accompanying documentation has been fully
tested on a target platform. It is small in size and can be applied
to any target hardware.
THE M29F100 PROGRAMMING MODEL
The M29F100 is a 128K x 8 or 64K x 16 Flash memory which
can be electrically erased and programmed through special
coded command sequences on most standard microprocessor
buses. The device is broken down into 5 blocks of varying sizes.
Each block can be erased individually, or the whole chip can be
erased at once, erasing all 1Mb.
September 1997
1/49

1 page




AN944 pdf
AN944 - APPLICATION NOTE
www.DataSheet4U.com
A similar condition will need to be put in any functions which read the manufacturer code to ensure that
the algorithms identify the device as an AMD part. No other changes to the algorithms will be necessary
due to the compatibility of ST and AMD devices.
Referring back to the modified version of the example function ‘device code’ above, it will be clear that
higher level functions cannot differentiate between the Am29F100T and the M29F100T from the return
value of ‘device_code’. For applications, such as flash programmers, which need to distinguish between
SGS-THOMSON and AMD parts, the original version of the ’device_code’ function must be retained.
In this case, higher level functions which rely on the return value of ‘device_code’ must be modified
to recognise the SGS-THOMSON parts.
GENERATING SGS-THOMSON CODE
Low-level functions (drivers) have been provided to simplify the process of developing application code in
C for the SGS-THOMSON M29F100 Flash memories. This enables users to concentrate on writing the
high level functions required for their particular applications. These high level funtions can access the Flash
memories by calling the low level drivers, hence keeping details of special command sequences away from
the users’ high level code: this will result in source code both simpler and easier to maintain.
Flash memories are typically used to store source code and data in embedded systems, especially when
field updates are likely to be required; a few example applications are personal data organisers, mobile
phones or PCMCIA cards.
When developing an application, the user is advised to proceed as follows:
– first write a simple program to test the low level drivers provided and verify that these operate as expected
on the user’s target hardware and software environments.
– then the user should write the high level code for his application, which will access the flash memories
by calling the low level drivers provided.
– finally test the complete application source code thoroughly.
C LIBRARY FUNCTIONS
The software library provided with this application note provides the user with source code for the following
functions:
FlashReadReset() is used to reset the device into the Read Array mode. Note that there should be no
need to call this function under normal operation as all of the other software library functions leave the
device in this mode.
FlashAutoSelect() is used to identify the Manufacturer Code, Device Code and the block protection
levels of the device.
FlashBlockErase() is used to erase one or more blocks in the device. Multiple blocks will be erased
simultaneously to reduce the overall erase time. This function checks that none of the blocks specified are
protected and does not erase any blocks if some of the specified blocks are protected.
FlashChipErase() is used to erase the entire chip. It will not erase any blocks if there is a protected
block on the chip.
The functions rely on the user writing short, simple functions to read and write to the flash in their particular
target hardware.
FlashRead() must be written to read a value from the flash.
FlashWrite() must be written to write a value to the flash.
5/49

5 Page





AN944 arduino
AN944 - APPLICATION NOTE
www.DataSheet4U.com
CONCLUSION
The M29F100 single voltage Flash memory is an ideal product for embedded and other computer systems,
able to be easily interfaced to the microprocessor and driven with simple software drivers written in the C
language.
Full product information can be found at www.st.com, queries may be sent by email to [email protected].
11/49

11 Page







PáginasTotal 30 Páginas
PDF Descargar[ Datasheet AN944.PDF ]




Hoja de datos destacado

Número de piezaDescripciónFabricantes
AN94078I2C Driver RoutinesPhilips
Philips
AN942Software DriversSTmicroelectronics
STmicroelectronics
AN943Software DriversSTmicroelectronics
STmicroelectronics
AN944Software DriversSTmicroelectronics
STmicroelectronics

Número de piezaDescripciónFabricantes
SLA6805M

High Voltage 3 phase Motor Driver IC.

Sanken
Sanken
SDC1742

12- and 14-Bit Hybrid Synchro / Resolver-to-Digital Converters.

Analog Devices
Analog Devices


DataSheet.es es una pagina web que funciona como un repositorio de manuales o hoja de datos de muchos de los productos más populares,
permitiéndote verlos en linea o descargarlos en PDF.


DataSheet.es    |   2020   |  Privacy Policy  |  Contacto  |  Buscar