English
Language : 

ST10F280_12 Datasheet, PDF (42/239 Pages) STMicroelectronics – 16-bit MCU with MAC unit, 512 Kbyte Flash memory and 18 Kbyte RAM
Internal Flash memory
ST10F280
Note:
5.5.2
Note:
for block addresses make sure that address bit A15 and A14 of the block address are
reflected in both LSBs of the selected DPPS.
For Command Instructions, address bit A14, A15, A16, A17 and A18 are don’t care. This
simplify a lot the application software, because it minimize the use of DPP registers when
using Command in the Command Interface.
Direct addressing is not allowed for Command sequence operations to the Flash. Only
Register-indirect addressing can be used for command, block or write-data accesses.
Basic Flash access control
When accessing the Flash all command write addresses have to be located within the active
Flash memory space. The active Flash memory space is that logical address range which is
covered by the Flash after mapping. When using data page pointer (DPP) for addressing the
Flash, make sure that address bit A15 and A14 of the command addresses are reflected in
both LSBs of the selected data page pointer (A15 DPPx.1 and A14 DPPx.0).
In case of the command write addresses, address bit A14, A15 and above are “don’t care”.
Thus, command writes can be performed by only using one DPP register. This allows to
have a simpler and more compact application software.
Another advantageous possibility is to use the extended segment instruction for addressing.
The direct addressing mode is not allowed for write access to the Flash address/command
register. Be aware that the C compiler may use this kind of addressing. For write accesses
to Flash module always the indirect addressing mode has to be selected.
The following basic instruction sequences show examples for different addressing
possibilities.
Principle example of address generation for Flash commands and registers:
When using data page pointer (DPP0 is this example)
MOV DPP0,#08h
;adjust data page pointers according to the
;addresses: DPP0 is used in this example, thus
;ADDRESS must have A14 and A15 bit set to ‘0’.
MOV Rwm,#ADDRESS
;ADDRESS could be a dedicated command sequence
;address 2AA8h, 1554h ... ) or the Flash write
;address
MOV Rwn,#DATA
;DATA could be a dedicated command sequence data
;(xxA0h,xx80h ... ) or data to be programmed
MOV [Rwm],Rwn
;indirect addressing
When using the extended segment instruction:
MOV Rwm,#ADDRESS
;ADDRESS could be a dedicated command sequence
;address (2AA8h, 1554h ... ) or the Flash write
;address
MOV Rwo,#DATA
;DATA could be a dedicated command sequence data
;(xxA0h,xx80h ... ) or data to be programmed
MOV Rwn,#SEGMENT
;the value of SEGMENT represents the segment
;number and could be 0, 1, 2, 3 or 4 (depending
;on sector mapping) for 256KByte Flash.
42/239
Doc ID 8673 Rev. 3