23.04.2013 Views

TMPM330 - Keil

TMPM330 - Keil

TMPM330 - Keil

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Under development<br />

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

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

those of the previously issued command (i.e., all 1s). When the SIO0 is configured for<br />

I/O Interface mode, the RAM Transfer routine does not check for a receive error.<br />

Next, the RAM Transfer routine performs the checksum operation to ensure data<br />

integrity. Adding the series of the 5th to 16th bytes must result in 00H (with the carry<br />

dropped). If it is not 00H, one or more bytes of data has been corrupted. In case of a<br />

checksum error, the RAM Transfer routine sends back 11H to the controller and<br />

returns to the state in which it waits for a command (i.e., the 3rd byte) again.<br />

Finally, the RAM Transfer routine examines the result of the password check. The<br />

following two cases are treated as a password error. In these cases, the RAM Transfer<br />

routine sends back 11H (bit 0) to the controller and returns to the state in which it waits<br />

for a command (i.e., the 3rd byte) again.<br />

• Irrespective of the result of the password comparison, all the 12 bytes of a<br />

password in the flash memory are the same value other than FFH.<br />

Not the entire password bytes transmitted from the controller matched those<br />

contained in the flash memory.<br />

When all the above checks have been successful, the RAM Transfer routine returns a<br />

normal acknowledge response (10H) to the controller.<br />

8. The 19th to 22nd bytes, transmitted from the controller the target board, indicate the<br />

start address of the RAM region where subsequent data (e.g., a flash programming<br />

routine) should be stored. The 19th byte corresponds to bits 31–24 of the address and<br />

the 22nd byte corresponds to bits 7–0 of the address.<br />

9. The 23rd and 24th bytes, transmitted from the controller to the target board, indicate<br />

the number of bytes that will be transferred from the controller to be stored in the RAM.<br />

The 23rd byte corresponds to bits 15–8 of the number of bytes to be transferred, and<br />

the 24th byte corresponds to bits 7–0 of the number of bytes.<br />

10. The 25th byte is a checksum value for the 19th to 24th bytes. To calculate the<br />

checksum value, add all these bytes together, drop the carries and take the two’s<br />

complement of the total sum. Transmit this checksum value from the controller to the<br />

target board. The checksum calculation is described in details in a later section<br />

“Checksum Calculation”.<br />

11. The 26th byte, transmitted from the target board to the controller, is an acknowledge<br />

response to the 19th to 25th bytes of data. First, the RAM Transfer routine checks for a<br />

receive error in the 19th to 25th bytes. If there was a receive error, the RAM Transfer<br />

routine sends back 18H and returns to the command wait state (i.e., the 3rd byte)<br />

again. In this case, the upper four bits of the acknowledge response are the same as<br />

those of the previously issued command (i.e., all 1s). When the SIO0 is configured for<br />

I/O Interface mode, the RAM Transfer routine does not check for a receive error.<br />

Next, the RAM Transfer routine performs the checksum operation to ensure data<br />

integrity. Adding the series of the 19th to 25th bytes must result in 00H (with the carry<br />

dropped). If it is not 00H, one or more bytes of data has been corrupted. In case of a<br />

checksum error, the RAM Transfer routine sends back 11H to the controller and<br />

Flash Memory Operation

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

Saved successfully!

Ooh no, something went wrong!