CMT2380F17
Rev0.1 | 298/347
www.cmostek.com
28 ISP and IAP
The flash memory of CMT2380F17 is partitioned into AP-memory, IAP-memory and ISP-memory.
AP-
memory is used to store user’s application program; IAP-memory is used to store the non-volatile
application data; and, ISP-memory is used to store the boot loader program for In-System Programming.
When MCU is running in ISP region, MCU could modify the AP and IAP memory for software upgraded. If
MCU is running in AP region, software could only modify the IAP memory for storage data updated.
。
28.1
CMT2380F17 Flash Memory Configuration
There are total 16K bytes of Flash Memory in CMT2380F17 and Figure 28
–1 shows the device flash
configuration of MG82F6D17. The ISP-memory can be configured as disabled or up to 7.5K bytes space by
hardware option setting with 0.5KB step. The flash size of IAP memory is located between the IAP low
boundary and IAP high boundary. The IAP low boundary is defined by the value of IAPLB register. The IAP
high boundary is associated with ISP start address which decides ISP memory size by hardware option. The
IAPLB register value is configured by hardware option or AP software programming. All of the AP, IAP and ISP
memory are shared the total 16K bytes flash memory.
0x2200 if ISP Size = 7.5KB
0x2400 if ISP Size = 7KB
………………………………
0x3000 if ISP Size = 4KB
………………………………
0x3C00 if ISP Size = 1KB
0x3E00 if ISP Size = 0.5KB
(1) ISP Start Address:
Note:
AP-memory
ISP-memory
IAP-memory
0x0000
0x3FFF
IAP High Boundary
ISP Start Address
IAP Low Boundary
Flash Memory
Total: 16KB
Application Code
IAP Data
ISP Code
IAPLB = 0x36 (default)
IAP start 0x3600
ISP start 0x3A00 (default)
(4) If ISP is disabled:
IAP High Boundary = 0x3FFF
IAP Low Boundary = 0x3FFF
–
IAP Size + 1
(3) If ISP is enabled:
IAP High Boundary = ISP Start Address
–
1
IAP Low Boundary = ISP Start Address
–
IAP Size
(2) IAP Size :
IAPLB = IAP Low Boundary (ROM High-Byte address)
IAP Start Address = {IAPLB, 00H}
IAP Size = ISP Start Address
–
IAP Start Address
Set LAPLB = Change IAP Size
Figure 28-1. CMT2380F17 Flash Flash Memory Configuration
Note:
In default, the MG82F6D17 that Megawin shipped had configured the flash memory for 1.5K ISP, 1K IAP and
Lock enabled. The 1.5K ISP region is inserted Megawin proprietary COMBO ISP code to perform
In-System-Programming through Megawin 1-Line ISP protocol and COM port ISP. The 1K IAP size can be
re-configured by software for application required.
28.2
CMT2380F17 Flash Access in ISP/IAP
There are 3 flash access modes are provided in CMT2380F17 for ISP and IAP application: page erase
mode, byte program mode and read mode. MCU software uses these three modes to update new data into
flash storage and get flash content. This section shows the flow chart and demo code for the various flash
modes.
Содержание CMT2380F17
Страница 27: ...CMT2380F17 Rev0 1 27 347 www cmostek com 1 25 Phase Noise...
Страница 111: ...CMT2380F17 Rev0 1 111 347 www cmostek com INT2IS 1 0 Selected Port Pin of nINT2 00 P4 4 01 P3 0 10 P1 1 11 P1 6...
Страница 131: ...CMT2380F17 Rev0 1 131 347 www cmostek com Figure 16 1 Timer 0 Mode 0 Structure Figure15 2 Timer 1 Mode 0 Structure...
Страница 161: ...CMT2380F17 Rev0 1 161 347 www cmostek com Figure 16 32 Split Timer 3 Mode 1 Structure AR with Ex INT...
Страница 177: ...CMT2380F17 Rev0 1 177 347 www cmostek com Figure 17 3 PCA Interrupt System...
Страница 239: ...CMT2380F17 Rev0 1 239 347 www cmostek com Figure 19 5 8 bit Timer Mode Configuration for S1BRG S1TME 1...
Страница 246: ...CMT2380F17 Rev0 1 246 347 www cmostek com SnMIPS S0MI S1MI 1 P3 3 P4 7...
Страница 289: ...CMT2380F17 Rev0 1 289 347 www cmostek com...