
Uploading Programs – Mode 6
The dspstak 21262sx uses a 2Mbit SPI serial flash memory device to bootload the ADSP-21262.
Assuming that the boot mode selection is set for SPI Master Boot (see Configuration Jumpers), the
ADSP-21262 will boot from the SPI flash memory after reset is deasserted.
This boot capability is very useful in the ADSP-21262 except that there is no native support in the
DSP to program the flash memory. The dspstak 21262sx (actually all dspstak DSP Engines) has a
resident boot loader and flash writer program that addresses this problem.
The dspstak 21262sx automatically boots a proprietary Danville program called boot262 that is
located in the lowest block of the flash memory. The boot262 program in turn, boots your program
uses the rest of the flash memory. You don’t have to worry about reserving memory for boot262. In
the process of loading your program, the boot262 program that resides in internal RAM is
overwritten.
If the dspstak 21262sx is connected to an ASCII terminal via either RS-232 or USB and it is
operating in Mode 6, you have a five second window to interrupt the boot process before the
application program is automatically loaded. When you interrupt the boot process, the dspstak
enters Command Mode. Command Mode lets you upload programs to the flash memory. If the
dspstak 21262sx is operating in Modes 0 through Mode 3, your program will boot immediately as if
the boot262 program didn’t exist. It is still there and it loads your program, but it does so silently.
You write your DSP applications as normal and create a *.ldr file (Boot Type = SPI Slave, Format =
Binary, Width = 8). You don’t really need to worry about where your program is stored in the flash
memory, but we are going to tell you anyway. Your program starts at the beginning of the second
block of the flash with an offset of 80H. The 80H space is used to store the name of your program,
checksums, etc. When you upload a new program, all the memory in the flash is block erased with
the exception of the first block where the boot262 program resides. It is possible to write the flash
memory in the space above your application and the boot262 program after the application
program has been uploaded, but you must be very careful that the boot262 program is never
overwritten or erased. The only way to rewrite boot262 is with an in-circuit emulator.
It is very hard to damage the contents of the flash by accident, but it is possible. If you never write
directly to the flash, you are unlikely to ever see a problem. Danville supplies sample code that
manages the SPI bus where the flash memory resides. This code makes it even more difficult to
write to the flash inadvertently.
Command mode is available via either the USB port or the RS-232 port. A USB device driver is
included that emulates a COM port for Windows 2000 or Windows XP operating systems.
Bootloader communications automatically switch between the RS-232 port and the USB port. If
the USB port is active (enumerated), the USB port is used; otherwise, the RS232 port will be active.
dspstak™ 21262sx User Manual
Page 18