23.04.2013 Views

TMPM330 - Keil

TMPM330 - Keil

TMPM330 - Keil

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Under development<br />

1) RAM Transfer Command (See Table 17-6)<br />

<strong>TMPM330</strong> (rev 0.4)17-25<br />

<strong>TMPM330</strong><br />

1. The 1st byte specifies which one of the two serial operation modes is used. For a<br />

detailed description of how the serial operation mode is determined, see<br />

Determination of a Serial Operation Mode described later. If it is determined as UART<br />

mode, the boot program then checks if the SIO0 is programmable to the baud rate at<br />

which the 1st byte was transferred. During the first-byte interval, the RXE bit in the<br />

HSC0MOD register is cleared.<br />

• To communicate in UART mode<br />

Send, from the controller to the target board, 86H in UART data format at the<br />

desired baud rate. If the serial operation mode is determined as UART, then the<br />

boot program checks if the SIO0 can be programmed to the baud rate at which the<br />

first byte was transferred. If that baud rate is not possible, the boot program aborts,<br />

disabling any subsequent communications.<br />

• To communicate in I/O Interface mode<br />

Send, from the controller to the target board, 30H in I/O Interface data format at<br />

1/16 of the desired baud rate. Also send the 2nd byte at the same baud rate. Then<br />

send all subsequent bytes at a rate equal to the desired baud rate.<br />

In I/O Interface mode, the CPU sees the serial receive pin as if it were a general<br />

input port in monitoring its logic transitions. If the baud rate of the incoming data is<br />

high or the chip’s operating frequency is high, the CPU may not be able to keep up<br />

with the speed of logic transitions. To prevent such situations, the 1st and 2nd<br />

bytes must be transferred at 1/16 of the desired baud rate; then the boot program<br />

calculates 16 times that as the desired baud rate. When the serial operation mode<br />

is determined as I/O Interface mode, the SIO0 is configured for SCLK Input mode.<br />

Beginning with the third byte, the controller must ensure that its AC timing<br />

restrictions are satisfied at the selected baud rate. In the case of I/O Interface<br />

mode, the boot program does not check the receive error flag; thus there is no<br />

such thing as error acknowledge (bit 3, x8H).<br />

2. The 2nd byte, transmitted from the target board to the controller, is an acknowledge<br />

response to the 1st byte. The boot program echoes back the first byte: 86H for UART<br />

mode and 30H for I/O Interface mode.<br />

UART mode<br />

If the SIO0 can be programmed to the baud rate at which the 1st byte was transferred,<br />

the boot program programs the SC0BRCR and sends back 86H to the controller as an<br />

acknowledge. If the SIO0 is not programmable at that baud rate, the boot program<br />

simply aborts with no error indication. Following the 1st byte, the controller should allow<br />

for a time-out period of five seconds. If it does not receive 86H within the allowed<br />

time-out period, the controller should give up the communication. The boot program<br />

sets the RXE bit in the SC0MOD0 register to enable reception (1) before loading the<br />

SIO transmit buffer with 86H.<br />

• I/O Interface mode<br />

The boot program programs the SC0MOD0 and SC0CR registers to configure the<br />

SIO0 in I/O Interface mode (clocked by the rising edge of SCLK0), writes 30H to<br />

Flash Memory Operation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!