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 />

17.3 On-board Programming of Flash Memory (Rewrite/Erase)<br />

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

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

In on-board programming, the CPU is to execute software commands for rewriting or erasing the<br />

flash memory. The rewrite/erase control program should be prepared by the user beforehand.<br />

Because the flash memory content cannot be read while it is being written or erased, it is necessary<br />

to run the rewrite/erase program from the internal RAM or from an external memory device after<br />

shifting to the user boot mode.<br />

17.3.1 Flash Memory<br />

Except for some functions, writing and erasing flash memory data are in accordance with the<br />

standard JEDEC commands. In writing or erasing, use 32-bit data transfer command of the CPU to<br />

enter commands to the flash memory. Once the command is entered, the actual write or erase<br />

operation is automatically performed internally.<br />

Table 17-15 Flash Memory Functions<br />

Major functions Description<br />

Automatic page program Writes data automatically. (128word/1page)<br />

Automatic chip erase Erases the entire area of the flash memory automatically.<br />

Automatic block erase Erases a selected block automatically.<br />

Protect function By writing a 4-bit protection code, the write or erase function can be individually inhibited for<br />

each block.<br />

Note that addressing of operation commands is different from the case of standard commands due to the<br />

specific interface arrangements with the CPU. Also note that the flash memory is written in 32-bit blocks. So,<br />

32-bit (word) data transfer commands must be used in writing the flash memory.<br />

(1) Block configuration<br />

User boot Single boot<br />

mode<br />

mode<br />

0x0000_0000 0x3F80_0000 32 K bytes (BLOCK4)<br />

0x0000_8000 0x3F80_8000 32 K bytes (BLOCK5)<br />

0x0001_0000 0x3F81_0000<br />

0x0002_0000 0x3F82_0000<br />

64 K bytes (BLOCK3)<br />

128K bytes (BLOCK2)<br />

0x0004_0000 0x3F84_0000 128K bytes (BLOCK1)<br />

0x0006_0000 0x3F86_0000 128K bytes (BLOCK0)<br />

Fig. 17-9 Block Configuration of Flash Memory<br />

128 words<br />

| x 64<br />

128 words<br />

128 words<br />

| x 128<br />

128 words<br />

128 words<br />

| x 256<br />

128 words<br />

Flash Memory Operation

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

Saved successfully!

Ooh no, something went wrong!