English
Language : 

SH7760 Datasheet, PDF (1164/1345 Pages) Renesas Technology Corp – SuperHTM RISC engine
31.7.3 Examples of Stopping and Restarting the User Break Controller
The following are example programs:
; Transition to user break controller stopped state
; (1) Initialize BBRA and BBRB to 0.
mov
#0, R0
mov.l #BBRA, R1
mov.w R0, @R1
mov.l #BBRB, R1
mov.w R0, @R1
; (2) Initialize BRCR to 0.
mov.l #BRCR, R1
mov.w R0, @R1
; (3) Dummy read BRCR.
mov.w @R1, R0
; (4) Read STBCR2, then set bit MSTP5 in the read data to 1 and write
it back
mov.l #STBCR2, R1
mov.b @R1, R0
or
#H’1, R0
mov.b R0, @R1
; (5) Twice dummy read STBCR2.
mov.b @R1, R0
mov.b @R1, R0
; Canceling user break controller stopped state
; (6) Read STBCR2, then clear bit MSTP5 in the read data to 0 and write
it back
mov.l #STBCR2, R1
mov.b @R1, R0
and
#H'FE, R0
mov.b R0, @R1
; (7) Twice dummy read STBCR2.
mov.b @R1, R0
mov.b @R1, R0
Rev. 1.0, 02/03, page 1114 of 1294