EasyManua.ls Logo

Nuvoton NuMicro MS51PC0AE - Page 228

Default Icon
491 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MS51
Nov. 28, 2019 Page 228 of 491 Rev 1.00
MS51 32K SERIES TECHNICAL REFERENCE MANUAL
TA Timed Access
Register
SFR Address
Reset Value
TA
C7H, All page
0000_0000 b
7
6
5
4
3
2
1
0
TA[7:0]
W
Bit
Name
Description
7:0
TA[7:0]
Timed access
The timed access register controls the access to protected SFR. To access protected bits, user
should first write AAH to the TA and immediately followed by a write of 55H to TA. After these two
steps, a writing permission window is opened for 4 clock cycles during this period that user may
write to protected SFR.
In timed access method, the bits, which are protected, have a timed write enable window. A write is
successful only if this window is active, otherwise the write will be discarded. When the software writes
AAH to TA, a counter is started. This counter waits for 3 clock cycles looking for a write of 55H to TA.
If the second write of 55H occurs within 3 clock cycles of the first write of AAH, then the timed access
window is opened. It remains open for 4 clock cycles during which user may write to the protected bits.
After 4 clock cycles, this window automatically closes. Once the window closes, the procedure should
be repeated to write another protected bits. Not that the TA protected SFR are required timed access
for writing but reading is not protected. User may read TA protected SFR without giving AAH and 55H
to TA register. The suggestion code for opening the timed access window is shown below.
(CLR EA) ;if any interrupt is enabled, disable
temporally
MOV TA,#0AAH
MOV TA,#55H
(Instruction that writes a TA protected register)
(SETB EA) ;resume interrupts enabled
Any enabled interrupt should be disabled during this procedure to avoid delay between these three
writings. If there is no interrupt enabled, the CLR EA and SETB EA instructions can be left out.
Examples of timed assess are shown to illustrate correct or incorrect writing process.
Example 1,
MOV TA,#0AAH ;3 clock cycles
MOV TA,#55H ;3 clock cycles
ORL WDCON,#data ;4 clock cycles
Example 2,
MOV TA,#0AAH ;3 clock cycles
MOV TA,#55H ;3 clock cycles
NOP ;1 clock cycle
ANL BODCON0,#data ;4 clock cycles

Table of Contents

Related product manuals