
Mini57
Apr. 06, 2017
Page 148 of 475
Rev.1.00
MINI5
7
S
E
RI
E
S
TECH
NIC
A
L R
E
F
E
RE
N
CE
MA
N
UA
L
Updating APROM by software in LDROM or updating LDROM by software in APROM can avoid a
system failure when update fails.
The ISP controller supports to read, erase and program embedded Flash memory. Several
control bits of ISP controller are write-protected, thus it is necessary to unlock before we can set
them. To unlock the protected register bits, software needs to write 0x59, 0x16 and 0x88
sequentially to REGWRPROT. If register is unlocked successfully, the value of REGWRPROT will
be 1. The unlock sequence must not be interrupted by other access; otherwise it may fail to
unlock.
After unlocking the protected register bits, user needs to set the FMC_ISPCTL control register to
decide to update LDROM, User Configuration, APROM and enable ISP controller.
Once the FMC_ISPCTL register is set properly, user can set FMC_ISPCMD for erase, read or
programming. Set ISPADR for target Flash memory based on Flash memory origination.
FMC_ISPDAT can be used to set the data to program or used to return the read data according to
FMC_ISPCMD.
Finally, set ISPGO bit of FMC_ISPTRG control register to perform the relative ISP register
function. The ISPGO bit is self-cleared when ISP register function has been done. To make sure
ISP register function has been finished before CPU goes ahead, ISP instruction is used right after
ISPGO setting.
Several error conditions are checked after ISP register function is completed. If an error condition
occurs, ISP register operation is not started and the ISP fail flag will be set instead. ISPFF flag
can only be cleared by software. The next ISP register control procedure can be started even
ISPFF bit is kept as 1. Therefore, it is recommended to check the ISPFF bit and clear it after each
ISP register operation if it is set to 1.
When the ISPGO bit is set, CPU will wait for ISP operation to finish during this period; the
peripheral still keeps working as usual. If any interrupt request occurs, CPU will not service it till
ISP operation is finished. When ISP operation is finished, the ISPBUSY bit will be cleared by
hardware automatically. User can check whether ISP operation is finished or not by the ISPBUSY
bit. User should add ISP instruction next to the instruction in which the ISPGO bit is set 1 to
ensure correct execution of the instructions following ISP operation.
Содержание Mini57 Series
Страница 376: ...Mini57 Apr 06 2017 Page 376 of 475 Rev 1 00 MINI57 SERIES TECHNICAL REFERENCE MANUAL 1 Receive buffer is full ...
Страница 472: ...Mini57 Apr 06 2017 Page 472 of 475 Rev 1 00 MINI57 SERIES TECHNICAL REFERENCE MANUAL 1 3 20 Pin TSSOP 4 4x6 5x0 9 mm ...
Страница 473: ...Mini57 Apr 06 2017 Page 473 of 475 Rev 1 00 MINI57 SERIES TECHNICAL REFERENCE MANUAL 9 1 33 pin QFN33 4x4x0 8 mm ...