 
ANALOG DEVICES
European DSP Applications
Munich, Germany
dsp.europe@analog.com



   Draft Application example using the ADSP-2181 in embedded systems

	

Abstract:

  This application example will show how easy the ADSP-218x family can be 
  connected via their BDMA port to a upto 4MByte large FLASH memory to
  build up a embedded system. The supplied service software will allow user
  software update via RS-232 download. For security and memory reasons, the
  service software will not be in DSP memory whilst the user code is running.



Hardware design:

  The ADSP-218x is connected in full memory mode to an AM29F004 4Mbit flash 
  memory through the BDMA port. The DSP is set-up for system booting from 
  the FLASH memory. A dedicated UART chip is not available, the protocol is
  implemented in software using PF3 as input and FL0 as output pin. As 
  level converter and ADM560 is used, which could easily replaced by a 
  ADM3232. To select between user code or system software a dip switch is 
  added to PMD7.

  

System software design:

  Upon booting it must be selected whether to boot the user code or the 
  system software by setting PMD7 accordingly. So after power-up either the 
  user code beginning from 0x0 in the EPROM or the service kernel from 
  0x70000 in the EPROM is loaded. Therefore the original boot loader
  created by the 21xx splitter tool is modified during software download.
  When the service software is run, a connection to an ASCII terminal at
  9600,N,8,1 is necessary. A user interface will pop up giving the user 
  further hints on using the software.
  All user inputs will be dispached by the command module for e.g. FLASH 
  maintenance, like erasing or memory info, receiving and programming data 
  to the user space of the FLASH eprom, using the implemented FLASH routines.
  During user program receive and download to the FLASH the system software 
  cares for the exchange of the first 96 words kernel loader, thus allowing
  future calls of the system software. The system software allows to specify 
  the desired download sector for the application. 
  
  ATTENTION: 
  
  If Sector 0 of the FLASH is unpopulated by a user program, please insure 
  that the modified boot code is written to the first 96 words of your FLASH
  eprom - otherwise the system software will be inaccessible after reset!
  


Setting up the system:

  For a factory set-up an ADDS-218x-EZ-ICE is necessary to download first 
  time the system software executable and start it up. Connect an RS-232 
  terminal to the evaluation board and run a terminal software capable of 
  ASCII uploads to the board. Upon the first dry-run, it is possible by the 
  command <HS> to upload the system software itself into the FLASH memory. 
  All necessary modifications for software restart will be done to the 
  system software Motorola S2 image file during download.
  Having downloaded the monitor program itself, unplug the emulator, set
  to system maintenance and start up the recently downloaded system monitor
  software.
  Now you have via RS-232 full control over you system, can erase the user
  accessible FLASH memory parts, collect sector information and download 
  your Motorola S2 image file of your application. To perpare your executable
  just run SPL21 yourexe yourS2 -loader -2181 -s2 .
  
  Having uploaded the user program, set PMD7 back to application mode and 
  run your application software until a new firmware or application software
  must be put into your FLASH eprom.
  


Supplied software:

  README.TXT : This file
  IMAGE      : precompiled monitor software
  BOOTCODE   : modified bootcode to recognize PMD7
  SOURCE     : Source Code itself



Remarks:

  This application note is tested on the 402/403 EVB and believed to be 
  reliable. However, no responsibilty is assumed by Analog Devices for its
  use, nor for any infringements of patents or other rights of third parties
  which may result from its use.
  The supplied documents are subject to change without notice.
