Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
162
Добавлен:
01.03.2016
Размер:
3.56 Mб
Скачать

Flash program memory and data EEPROM

RM0016

 

 

4.4Memory organization

4.4.1STM8S and STM8AF memory organization

STM8S and STM8AF EEPROM is organized in 32-bit words (4 bytes per word).

The memory organization differs according to the devices:

Low density STM8S and STM8AF devices

8 Kbytes of Flash program memory organized in 128 pages or blocks of 64 bytes each. The Flash program memory is divided into 2 areas, the user boot code area (UBC), which size can be configured by option byte, and the main program memory area. The Flash program memory is mapped in the upper part of the STM8S addressing space and includes the reset and interrupt vectors.

Up to 640 bytes of data EEPROM (DATA) organized in pages or blocks of 64 bytes each. One block (64 bytes) contains the option bytes of which 11 are used to configure the device hardware features. The options bytes can be programmed in user, IAP and ICP/SWIM modes.

Medium density STM8S devices

From 16 to 32 Kbytes of Flash program memory organized in up to 64 pages of 4 blocks of 128 bytes each. The Flash program memory is divided into 2 areas, the user boot code area (UBC), which size can be configured by option byte, and the main program memory area. The Flash program memory is mapped in the upper part of the STM8S addressing space and includes the reset and interrupt vectors.

Up to 1 Kbyte of data EEPROM (DATA) organized in up to 2 pages of 4 blocks of 128 bytes each. One block (128 bytes) contains the option bytes of which 13 are used to configure the device hardware features. The options bytes can be programmed in user, IAP and ICP/SWIM modes.

Medium density STM8AF devices

From 8 to 32 Kbytes of Flash program memory organized in up to 64 pages of 4 blocks of 128 bytes each. The Flash program memory is divided into 2 areas, the user boot code area (UBC), which size can be configured by option byte, and the main program memory area. The Flash program memory is mapped in the upper part of the STM8AF addressing space and includes the reset and interrupt vectors.

Up to 1 Kbyte of data EEPROM (DATA) organized in up to 2 pages of 4 blocks of 128 bytes each. One block (128 bytes) contains the option bytes of which 13 are used to configure the device hardware features. The options bytes can be programmed in user, IAP and ICP/SWIM modes.

High density STM8S devices

From 32 to 128 Kbytes of Flash program memory organized in up to 256 pages of 4 blocks of 128 bytes each. The Flash program memory is divided into 2 areas, the user boot code area (UBC), which size can be configured by option byte, and the main program memory area. The Flash program memory is mapped in the upper part of the STM8S addressing space and includes the reset and interrupt vectors.

Up to 2 Kbytes of data EEPROM (DATA) organized in up to 4 pages of 4 blocks of 128 bytes each. The size of the DATA area is fixed for a given microcontroller. One block (128 bytes) contains the option bytes of which 15 are used to configure the

36/454

Doc ID 14587 Rev 9

RM0016

Flash program memory and data EEPROM

 

 

device hardware features. The options bytes can be programmed in user, IAP and ICP/SWIM modes.

High density STM8AF devices

From 32 to 128 Kbytes of Flash program memory organized in up to 256 pages of 4 blocks of 128 bytes each. The Flash program memory is divided into 2 areas, the user boot code area (UBC), which size can be configured by option byte, and the main program memory area. The Flash program memory is mapped in the upper part of the STM8AF addressing space and includes the reset and interrupt vectors.

Up to 2 Kbytes of data EEPROM (DATA) organized in up to 4 pages of 4 blocks of 128 bytes each. The size of the DATA area is fixed for a given microcontroller. One block (128 bytes) contains the option bytes of which 15 are used to configure the device hardware features. The options bytes can be programmed in user, IAP and ICP/SWIM modes.

 

The page defines the granularity of the user boot code area as described in Section 4.4.3:

 

User boot area (UBC).

 

Figure 6, Figure 7, and Figure 8 show the Flash memory and data EEPROM organization

 

for STM8S and STM8AF devices. Refer to the STM8S and STM8AF programming manual

 

(PM0051) for more information.

Note:

The EEPROM access time allows the device to run up to 16 MHz. For clock frequencies

 

above 16 MHz, Flash/data EEPROM access must be configured for 1 wait state. This is

 

enabled by the device option byte (refer to the option bytes section of the STM8S and

 

STM8AF datasheets).

Doc ID 14587 Rev 9

37/454

Flash program memory and data EEPROM

RM0016

 

 

Figure 6. Flash memory and data EEPROM organization on low density STM8S and STM8AF

DATA EEPROM

Programmable size from 2 pages (1 Kbytes) up to 8 Kbytes

(1 page steps)

0x00 4000

0x00 427F

0x00 4800

0x00 483F

0x00 8000

0x00 9FFF

1 page = 1 block = 64 bytes

DATA MEMORY (up to 640 bytes)

OPTION BYTES (1 block)

Interrupt vectors (128 bytes)

USER BOOT CODE (UBC) (permanently write protected)

Flash program memory

MAIN PROGRAM (write access possible for IAP and using MASS mechanism)

8 Kbytes of

FLASH PROGRAM

MEMORY

ai15503

38/454

Doc ID 14587 Rev 9

RM0016

Flash program memory and data EEPROM

 

 

Figure 7. Flash memory and data EEPROM organization on medium density STM8S and STM8AF

00 4000h

DATA EEPROM

00 43FFh

00 4800h

00 487Fh

00 8000h

Programmable size from 2 pages (1 Kbyte) up to 32 Kbytes

(1 page steps)

1 page = 512 bytes

1 block = 128 bytes

DATA MEMORY (up to 1 Kbyte)

OPTION BYTES (1 block)

Interrupt vectors (128 bytes)

USER BOOT CODE (UBC) (permanently write protected)

Flash program memory

MAIN PROGRAM (write access possible for IAP and using MASS mechanism)

00 FFFFh

ai15502

1.The memory mapping is given for the STM8AF devices featuring 32 Kbytes of Flash program memory and 1 Kbytes of SRAM.

Doc ID 14587 Rev 9

39/454

Соседние файлы в папке Минимум документации STM8_1