Part Number Hot Search : 
PNZ107 T1673IS 041RW AC7142CF 106X0 FD20049 MKP3382 BP11KE
Product Description
Full Text Search
 

To Download AN1160 Datasheet File

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


  Datasheet File OCR Text:
  1/7 october 1999 AN1160 application note connecting the tms320c31 microcontroller to m29 series flash memories contents n introduction n advantages of flash n flash bus architecture n tms320c31 bus architecture n timing requirements n conclusions introduction this application note describes the connection of an m29f016b flash memory to a tms320c31 digital signal pro- cessor. the application note can be used as a reference for other flash memory devices and other microcontrollers. the application note discusses the bus architectures of the flash and the tms320c31. the additional features of the flash, re- set/block temporary unprotect and ready/busy output are also discussed. the information in this application note is useful to hardware engineers who are about to design a new circuit using a flash memory. advantages of flash flash memories can be used to store both code and data for dsps in the tms320 family of dsps. the tms320c31 bus only recognizes 32-bit wide memory, all data types are 32-bits wide (including char ). however, the boot-loader can be config- ured to load the application code from the 8-bit wide flash into 32-bit wide sram on power-up. this allows the tms320c31 to boot from low cost, readily available memory and the m29f016b is ideally suited to this. unlike eprom, flash can be used to store data as well as code; the tms320c31 can erase old, unwanted data and re- place it. the application software can also be updated so that field upgrades of products can be performed without disassem- bling the product. it is usual to write separate boot and application programs so that the application program can be upgraded without changing the boot program. if the upgrade fails then the dsp will still boot and it will be possible to reattempt to upgrade the application. the boot code should be programmed into the flash before the flash is fitted to the circuit board, otherwise the dsp will need to be booted from its serial port or jtag emulator. often the block containing the boot program is protected so it cannot be- come corrupt. flash bus architecture take a look at the bus on the m29f016b, figure 1 shows the logic diagram. the memory has separate address and data buses. the control lines are chip enable (e ), output enable (g ) and write enable (w ). also, ready/busy output (r/b ) and reset/block temporary unprotect (rp ) are present.
AN1160 - application note 2/7 figure 1. m29f016b logic diagram the reset/block temporary unprotect pin (rp ) accepts three states: reset (v il ), not reset (v ih ) and block temporary unprotect (v id ). reset and not reset are the usual signals for a reset line. the third state, block temporary unprotect is used to temporarily unprotect blocks that have been specifically pro- tected in the memory. many applications do not protect any blocks and therefore connect the rp pin di- rectly to the system reset signal. figure 2 gives an example of how the connection between the systems reset pin and the m29f016bs rp pin can be made. the circuit makes use of a jumper to enable block temporary unprotect. many ap- plications will provide the 12v from an external source, in which case the jumper can be replaced by a connector. the advantage with the circuit, as it stands, is that the system reset will override block tem- porary unprotect and cause the flash to reset. only four additional components are required. before the jumper is inserted, and when reset is high, v ih , rp is connected to 5v through the 10k w resistor and the diode. the current required by rp is very low, in the order of 1 m a at 5v. the voltage drop in the resistor and the diode at these currents will keep rp very close to 5v. when the jumper is fitted the diode ceases to conduct and rp rises to 12v as the capacitor charges. the time-constant of a 10k w re- sistor and a 50pf capacitor is 500ns, satisfying the t phphh rise-time requirements of the m29f016b. dur- ing a reset, reset is low, v il , and the jfet is switched on, bringing rp close to ground. the current consumption during a reset rises due to the current through the 10k w resistor. ai02964 21 a0-a20 w dq0-dq7 v cc m29f016b e v ss 8 g rp rb
3/7 AN1160 - application note figure 2. reset/block temporary unprotect circuit although the use of a jumper may not be the most elegant solution, it is a practical one because it main- tains the security level offered by block protection. there is little point in having the block temporary un- protect pin under software control. the whole point of the block protection feature is to protect against software failure. allowing the block temporary unprotect feature to be under the control of software is nearly equivalent to not protecting the blocks in the first place. the ready/busy output (rb ) provides a simple mechanism for determining if the flash is busy or not. by connecting the ready/busy pin up to an interrupt line of the microcontroller it is possible to program the flash under interrupt control, freeing the dsp to perform other tasks while the flash is programming. oth- erwise the flash must be polled in order to find out if program or erase operations have completed. ready/ busy is an open drain output and, therefore, requires a pull-up resistor to bring the line up to v cc when the flash is ready. one situation that the software must be aware of is the error situation. when a program or erase error occurs ready/busy will remain low until the error is cleared. a timer, or polling algorithm, should be used to catch this situation and deal with it correctly. ai02937 10k w 50pf 5v 12v reset rp
AN1160 - application note 4/7 tms320c31 bus architecture the tms320c31 has a 32-bit data bus and 24-bit address bus. in order to reduce the complexity the bus only supports 32-bit accesses. for devices with smaller widths than 32-bits the unused bits have to be masked by the software after read operations. the strb signal indicates that a bus access is currently taking place, the rdy signal is used by external devices to indicate that they are ready and the r/w signal indicates if the access is a read or a write. the tms320c31 has an internal wait-state generator that can be used to extend the access times for slower devices on the bus. the end of a cycle can be determined by either the rdy input or the wait-state generator. bank-switching detection can also be employed to add in an additional wait-state when chang- ing from one type of memory to another; this extends the end of the access cycle so devices that take too long to tri-state their outputs do not cause bus contention with fast devices. the tms320c31 always in- serts an additional wait-state when writing compared to reading; this additional wait-state also helps the tri-state time of external devices. the connection between the tms320c31 and the m29f016b flash is shown in figure 3. the rdy signal has not been shown in the diagram as it is assumed that the internal wait-state generator will be used to generate the correct access times. figure 3. connection between the tms320c31 and the m29f016b ai02941 a0-a20 w dq0-dq7 m29f016b e g rp rb d0-d31 a0-a23 tms320c31 reset r/w v cc 10k w int3 reset/block temporary unprotection circuit reset chip select logic strb
5/7 AN1160 - application note timing requirements the read timings (from the flashs perspective) are shown using one wait-state in table 1 and figure 4; the write timings are shown in table 2 and figure 5. the tms320c31 always uses one additional wait- state for write cycles compared to read cycles. bank switching has been assumed for the tri-state times. table 1. principal read timing requirements figure 4. principal read timing waveforms m29f016b tms320c31 symbol 55 70 90 f clkin = 40mhz f clkin = 50mhz f clkin = 60mhz t avav 55 70 90 89 71 58 t av qv 55 70 90 75 61 49 t elqv 55 70 90 70 56 44 t glqv 30 30 35 111 90 74 t ehqz 18 20 20 89 80 66 t oh 000 0 0 0 ai02997 tavav tavqv telqv toh a0-a17 e dq0-dq15 g tglqv tehqz data out h1
AN1160 - application note 6/7 table 2. principal write timing requirements, write enable controlled figure 5. principal write timing waveforms it can be seen that the m29f016b-55 can be used with one wait-state for the 50mhz clock speed, the m29f016b-70 can be used for the 40mhz clock speed, but the faster, 60mhz clock cannot be satisfied by any of the parts. an additional wait-state will be required to work above 60mhz. conclusions the m29f016b, and other flash memory parts from stmicroelectronics, can be easily connected to the tms320c31 and other dsp with minimal glue logic. one or two wait-state solutions can be realized. the block temporary unprotect feature can be designed in easily and the software overhead for programming the flash can be reduced by connecting the ready/busy output pin to an interrupt line. m29f016b tms320c31 symbol 55 70 90 f clkin = 40mhz f clkin = 50mhz f clkin = 60mhz t avav 55 70 90 139 111 92 t wlwh 40 45 45 89 70 56 t dvwh 25 30 45 83 66 54 t whwl 20 20 20 44 35 28 t wlax 40 45 45 89 70 56 ai02996 tavav twlax a0-a17 e dq0-dq15 w twlwh tdvwh data out h1
7/7 AN1160 - application note if you have any questions or suggestion concerning the matters raised in this document please send them to the following electronic mail address: ask.memory@st.com (for general enquiries) please remember to include your name, company, location, telephone number and fax number. information furnished is believed to be accurate and reliable. however, stmicroelectronics assumes no responsibility for the co nsequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. no license is granted by implication or otherwise under any patent or patent rights of stmicroelectronics. specifications mentioned in this publicati on are subject to change without notice. this publication supersedes and replaces all information previously supplied. stmicroelectronics prod ucts are not authorized for use as critical components in life support devices or systems without express written approval of stmicroelectro nics. the st logo is registered trademark of stmicroelectronics a 1999 stmicroelectronics - all rights reserved all other names are the property of their respective owners. stmicroelectronics group of companies australia - brazil - china - finland - france - germany - hong kong - india - italy - japan - malaysia - malta - morocco - singapore - spain - sweden - switzerland - united kingdom - u.s.a. http://www.st.com


▲Up To Search▲   

 
Price & Availability of AN1160

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