TSI Flash Features

Introduction

The TLSR8258F512 embeds a 4M-bit (512KBytes) Serial Flash inside, Its performance parameters are as follows:

  • Single Power supply, Full voltage range: 1.65 ~ 2.0v
  • Advanced security Features, 3x512-Byte Security Registers with OTP Lock
  • Low Power Consumption:
    • Maximum active current:6mA
    • Maximum power down current:2uA
  • Software write Protection, write protect all/portion of memory via software
  • Fast Program/Erase Speed:
    • Page Program time:1.6ms typical
    • Sector Erase time: 150ms typical
    • Block Erase time: 0.5/0.8s typical
    • Chip Erase time: 3s/6s typical
  • Minimum 100,000 Program/Erase cycles
  • Data Retention: 20-year data retention typical
  • Range of Temperature: -40° ~ +85°

The TLSR8258F512 accesses the flash using Fast Read(0BH). The timing diagram is as follows:

Timing Diagram of Fast Read(0BH)

Flash Storage Architecture

A legal program is usually divided into different segments. The allocation of these segments is defined in the boot.link file. The distribution of the different segments in the flash is shown in the figure below. Sometimes, we may make appropriate modifications to the boot.link file to meet some special needs.

Block Diagram of Distribution of Segments in the Flash

Flash Multi-Address Startup

In order to facilitate OTA upgrade, TLSR8258 supports multi-address startup function. The address that supports multi-address startup is : 0x000000,0x20000 and 0x40000. But there is a priority relationship between the three: 0x000000 > 0x20000 > 0x40000. In other words, if the code stored at address 0 can run normally, it can also run normally when it is stored at 0x20000 or 0x40000 address. However, the priority tells: when Code at address 0x000000 is valid, code at address 0x20000 or 0x40000 will NOT run.

Type of Internal Flash

Telink MCU usually embeds different flash based on customer's needs, which are listed as the following. If you want to call flash_lock() to lock flash, it is necessary to konw the lock value.

Type Description size lock value
GD GD25D05C/GD25LD05C 32k 000000H-007FFFH 0x0c
48k 000000H-00BFFFH 0x08
56k 000000H-00DFFFH 0x04
64k 000000H-00FFFFH 0x10
GD25D10BC/GD25LD10C 64k 000000H-00FFFFH 0x0c
96k 000000H-017FFFH 0x08
112k 000000H-01BFFFH 0x04
120k 000000H-01DFFFH 0x10
128k 000000H-01FFFFH 0x14
MD25D20 128k 000000H-01FFFFH 0x14
192k 000000H-02FFFFH 0x10
224k 000000H-037FFFH 0x0c
240k 000000H-03BFFFH 0x08
248k 000000H-03DFFFH 0x04
256k 000000H-03FFFFH 0x18
GD25LD40C/MD25D40D 256k 000000H-03FFFFH 0x18
384k 000000H-05FFFFH 0x14
448k 000000H-06FFFFH 0x10
480k 000000H-077FFFH 0x0c
496k 000000H-07BFFFH 0x08
504k 000000H-07DFFFH 0x04
512k 000000H-07FFFFH 0x1c
MD25D80D 768K 000000H-0BFFFFH 0x18
896K 000000H-0DFFFFH 0x14
960K 000000H-0EFFFFH 0x10
992K 000000H-0F7FFFH 0x0c
1008K 000000H-0FBFFFH 0x08
1016K 000000H-0FDFFFH 0x04
1024K 000000H-0FFFFFH 0x1c
XTX PN25F04C 64k 000000H-00FFFFH 0x24
64k 070000H-07FFFFH 0x04
128k 000000H-01FFFFH 0x28
128k 060000H-07FFFFH 0x08
256k 000000H-03FFFFH 0x2c
256k 040000H-07FFFFH 0x0c
384k 000000H-05FFFFH 0x30
384k 020000H-07FFFFH 0x10
448K 000000H-06FFFFH 0x34
448K 010000H-07FFFFH 0x14
PUYA P25Q40L/P25D40H 4k 000000H-000FFFH 0x0064
4k 07F000H-07FFFFH 0x0044
8k 000000H-001FFFH 0x0068
8k 07E000H-07FFFFH 0x0048
16k 000000H-003FFFH 0x006c
16k 07C000H-07FFFFH 0x004c
32k 000000H-007FFFH 0x0078
32k 078000H-07FFFFH 0x0058
64k 000000H-00FFFFH 0x0024
64k 070000H-07FFFFH 0x0004
128k 000000H-01FFFFH 0x0028
128k 060000H-07FFFFH 0x0008
256k 000000H-03FFFFH 0x002c
256k 040000H-07FFFFH 0x000c
384k 000000H-05FFFFH 0x4008
384k 020000H-07FFFFH 0x4028
448k 000000H-06FFFFH 0x4004
448k 010000H-07FFFFH 0x4024
480k 000000H-077FFFH 0x4058
480k 008000H-07FFFFH 0x4078
496k 000000H-07BFFFH 0x404c
496k 004000H-07FFFFH 0x406c
504k 000000H-07DFFFH 0x4048
504k 002000H-07FFFFH 0x4068
508k 000000H-07EFFFH 0x4044
508k 001000H-07FFFFH 0x4064
512k 000000H-07FFFFH 0x007c
P25Q06L 4k 000000H-000FFFH 0x0064
4k 00F000H-00FFFFH 0x0044
8k 000000H-001FFFH 0x0068
8k 00E000H-00FFFFH 0x0048
16k 000000H-003FFFH 0x006c
16k 00C000H-00FFFFH 0x004c
32k 000000H-007FFFH 0x0078
32k 008000H-00FFFFH 0x0058
48k 000000H-00BFFFH 0x404c
48k 004000H-00FFFFH 0x406c
56k 000000H-00DFFFH 0x4048
56k 002000H-00FFFFH 0x4068
60k 000000H-00EFFFH 0x4044
60k 001000H-00FFFFH 0x4064
64k 001000H-00FFFFH 0x007c

Flash APIs List

In order to facilitate users to quickly develop products according to their own needs, TSI provide the following related APIs and examples.

APIs list Description Example Update Date Status
flash_erase_page() erase a page(256Bytes) of flash(only 8359 support) refer to API-FLASH-CASE2 2019-1-10 Done
flash_erase_sector() erase a sector(4KBytes) of flash API-FLASH-CASE2 2019-1-10 Done
flash_erase_32kblock() erase a block(32KBytes) of flash refer to API-FLASH-CASE2 2019-1-10 Done
flash_erase_64kblock() erase a block(64KBytes) of flash refer to API-FLASH-CASE2 2019-1-10 Done
flash_erase_chip() erase the whole flash refer to API-FLASH-CASE2 2019-1-10 Done
flash_write_page() write flash (not greater than a page(256Bytes) per time) API-FLASH-CASE1 2019-1-10 Done
flash_read_page() read flash (not greater than a page(256Bytes) per time) API-FLASH-CASE1 2019-1-10 Done
flash_write_status() write the status of flash API-FLASH-CASE3 2019-1-10 Done
flash_read_status() read the status of flash API-FLASH-CASE3 2019-1-10 Done
flash_deep_powerdown() let flash enter sleep mode API-FLASH-CASE4 2019-1-10 Done
flash_release_deep_powerdown() wakeup flash from sleep mode API-FLASH-CASE4 2019-1-10 Done
flash_read_mid() read MAC ID of flash API-FLASH-CASE5 2019-1-10 Done
flash_read_uid() read Unique ID of flash API-FLASH-CASE5 2019-1-10 Done
flash_lock() lock the specified block of flash API-FLASH-CASE6 2019-1-10 Done
flash_unlock() unlock the whole flash API-FLASH-CASE7 2019-1-10 Done

TSI provides the following examples of this module to help users quickly understand and apply related modules.

Examples list Description Update Date Status
API-FLASH-CASE1 read and write a page 2019-1-10 Done
API-FLASH-CASE2 erase a sector(4K Bytes) 2019-1-10 Done
API-FLASH-CASE3 read or write the status of flash 2019-1-10 Done
API-FLASH-CASE4 let flash enter sleep mode and wake up flash from sleep mode 2019-1-10 Done
API-FLASH-CASE5 read MID and UID of flash 2019-1-10 Done
API-FLASH-CASE6 lock the specified block of flash 2019-1-10 Done
API-FLASH-CASE7 unlock the whole flash 2019-1-10 Done

History Record

Date Description Author
2019-1-10 initial release LJW