Mitsubishi DS5000TK, DS907x SIP manual DS5000 Series, DS5001/DS5002 Series, Exiting the Loader, 131

Models: DS5000TK DS907x SIP

1 174
Download 174 pages 46.43 Kb
Page 131
Image 131

USER'S GUIDE

The indeterminate area contains various stacks and buffers used by the loader, and a given byte in this area may or may not be modified by the loader. As such the user should not rely on the bootstrap loader preserving any data in this area. In a like manner, because not all locations are used, the indeterminate area of scratch- pad RAM should not be used for storing security±sensi- tive data.

The methods of invoking the loader vary between the DS5000 series and DS5001/DS5002 series, and are described below.

DS5000 Series

The DS5000 is placed in its Program Load configuration by simultaneously applying a logic 1 to the RST pin and

forcing the PSEN line to a logic 0 level. Immediately fol- lowing this action, the DS5000 will look for a serial ASCII carriage return (0DH) character received at 57600, 19200, 9600, 2400, 1200, or 300 bps over the serial port or a Parallel Program Load pulse. For whichever type is first detected, the DS5000 will place itself in the associated Program Load mode. If an ASCII <CR> character is detected first, then the DS5000 will place it- self in the Serial Program Load mode and will ignore any Parallel Program Strobe pulses. Conversely, if a Paral- lel Program Strobe pulse is first detected, then the DS5000 will be placed in the Parallel Program Load mode and all incoming data on the serial port will be ig- nored. The selected program load mode will remain in effect until the next time power is removed from the de- vice or when the Program Load configuration (RST=1, PSEN=0) is removed.

In normal programming of the DS5000, problems with selection of the incorrect Program Load mode will not be encountered. When the DS5000 is placed in an 8751±compatible programming system, no serial data will be applied on the RXD pin for the serial port. As a result, there is almost no chance of random activity on this pin being interpreted as a <CR> character at a valid baud rate. Similarly, serial program loading will most often be performed in the end system. Consequently, there is again almost no chance of a valid Parallel Pro- gram Strobe pulse (with VPP voltage at 13V) being inter- preted as a signal to invoke the Parallel Program Load mode when the Serial Program Load mode is desired.

If the Program Load configuration is removed such that RST=0 and PSEN=1 with power still applied at VCC, the

device will undergo an internal hardware reset and will begin executing code from the reset vector at 0000h in Program Memory.

DS5001/DS5002 Series

The DS5001 and DS5002 microcontrollers use an iden- tical method to invoke the bootstrap loader. A falling edge on the PROG pin will invoke the loader with a single device pin. Note that the PROG pin must remain low for 48 oscillator clocks to be certain of recognition. Taking the PROG pin to a logic 1 will remove the loader and cause the DS5001 to perform a reset. Note also that the PROG pin must be high for as much as 48 clocks before the CPU is guaranteed to exit the loader. This constitutes the ªpseudo±edgeº detection of the program

pin. Note also that pulling RST=1 and PSEN=0 will also cause the loader to be invoked.

Once the loader mode stimulus has been detected, the DS5001 will begin looking for an ASCII carriage return (0Dh). It will look at the serial port and the RPC (8042) port. For serial reception, the loader will auto±baud at 57600, 19200, 9600, 2400, 1200 and 300 bps. For RPC mode, the 0Dh value must be written into the Data In buffer as described in the RPC section under Parallel I/O. When either of these conditions is detected, the loader will place itself in that loader mode. Activity on the other port will be ignored. This condition will remain until the loader is exited or power is cycled. When the loader stimulus is removed, the processor will perform a hardware reset and begin execution at location 0000h.

EXITING THE LOADER

The normal method of leaving the loader is to remove the stimulus that invoked it. In the DS5000 series, the RST pin, must be driven low or allowed to float and the PSEN signal should be allowed to float. The RST pin has an internal pull±down. The PSEN is an output and will drive itself. Note that both of these conditions must occur or the loader will not be exited. For the DS5001, there are several options. If the RST and PSEN option is used, the they must be removed as described above. If PROG is pulled low, it can either be returned high or the Exit ªEº command can be issued. Since the loader is edge activated, this will restart the user's code even while the PROG pin is low. If power were to cycle while the PROG pin were low, the loader would be invoked on power up. The flow of these conditions is shown in Figure 16±1.

050396 130/173

131

Page 131
Image 131
Mitsubishi DS5000TK, DS907x SIP manual DS5000 Series, DS5001/DS5002 Series, Exiting the Loader, 131