16.04.2014 Views

STM8S and STM8A microcontroller families

STM8S and STM8A microcontroller families

STM8S and STM8A microcontroller families

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.

Flash program memory <strong>and</strong> data EEPROM<br />

RM0016<br />

Figure 8.<br />

Flash memory <strong>and</strong> data EEPROM organization high density <strong>STM8S</strong> <strong>and</strong> <strong>STM8A</strong><br />

1 page = 512 bytes<br />

1 block = 128 bytes<br />

DATA EEPROM<br />

0x00 4000<br />

0x00 47FF<br />

0x00 487F<br />

DATA MEMORY<br />

(up to 2 Kbytes)<br />

OPTION BYTES (1 block)<br />

0x00 8000<br />

Interrupt vectors (128 bytes)<br />

Programmable size<br />

from 2 pages (1 Kbytes)<br />

up to 64 or 128 Kbytes<br />

(1 page steps)<br />

USER BOOT CODE (UBC)<br />

(permanently write protected)<br />

Flash program<br />

memory<br />

32 to 128 Kbytes of<br />

Flash Program<br />

Memory<br />

MAIN PROGRAM<br />

(write access possible for IAP<br />

<strong>and</strong> using MASS mechanism)<br />

0x02 7FFF<br />

ai15501b<br />

4.4.2 Memory access/ wait state configuration<br />

The Flash/ data EEPROM access time allows the device to run at up to 16 MHz without wait<br />

states.<br />

When using the high-speed external clock (HSE) at higher frequencies up to 24 MHz, one<br />

wait state is necessary. In this case the device option byte should be programmed to insert<br />

this wait state. Refer to the datasheet option byte section.<br />

4.4.3 User boot area (UBC)<br />

The user boot area (UBC) contains the reset <strong>and</strong> the interrupt vectors. It can be used to<br />

store the IAP <strong>and</strong> communication routines. The UBC area has a second level of protection<br />

to prevent unintentional erasing or modification during IAP programming. This means that it<br />

is always write protected <strong>and</strong> the write protection cannot be unlocked using the MASS keys.<br />

The size of the UBC area can be obtained by reading the UBC option byte.<br />

The size of the UBC area can be configured in ICP mode (using the SWIM interface)<br />

through the UBC option byte. The UBC option byte specifies the number of pages allocated<br />

for the UBC area starting from address 0x00 8000.<br />

40/449 Doc ID 14587 Rev 8<br />

www.BDTIC.com/ST

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

Saved successfully!

Ooh no, something went wrong!