2
2-14
32180 Group User’s Manual (Rev.1.0)
CPU
2.7 Supplementary Explanation for BSET, BCLR, LOCK and UNLOCK
Instruction Execution
The LOCK bit is set when executing the BSET or BCLR instruction, and is cleared when the BSET or BCLR
instruction finishes.
The LOCK instruction sets the LOCK bit, as well as performs an ordinary load operation. The UNLOCK instruction
is used to clear the LOCK bit.
The LOCK bit is located inside the CPU, and cannot directly be accessed for read or write by users. This bit
controls granting of bus control requested by devices other than the CPU.
• When LOCK bit = "0"
Control of the bus requested by devices other than the CPU is granted
• When LOCK bit = "1"
Control of the bus requested by devices other than the CPU is denied
In the 32180 group, control of the bus may be requested by devices other than the CPU in the following two cases:
• When DMA transfer is requested by the internal DMAC
• When HREQ# input is pulled low to request that the CPU be placed in a hold state
2.8 Precautions on CPU
• Usage Notes for 0 Division Instruction
Problem and Conditions
Inaccurate calculations for the instructions listed in (2) will result from execution of the 0 division instruction
under the conditions described in (1).
(1) If 0 division calculation is executed when the divisor = 0 for instructions DIV, DIVU, REM and REMU,
(2) the result will be inaccurate calculations for any of the following instructions that are executed immedi-
ately after 0 division:
ADDV, ADDX, ADD, ADDI, ADDV3, ADD3,
CMP, CMPU, CMPI, CMPUI,
SUBV, SUBX, SUB,
DIV, DIVU,
REM, REMU.
Countermeasure
Assuming that the 0 division occurrence itself is not expected by the system and therefore is the cause of
miscalculations, before executing division or remainder instructions, do a 0 check on the divisor to make sure 0
division does not occur.
2.7 Supplementary Explanation for BSET, BCLR, LOCK and UNLOCK Instruction Execution
Summary of Contents for M32R/ECU Series
Page 17: ...12 This page is blank for reasons of layout...
Page 712: ...CHAPTER 18 OSCILLATOR CIRCUIT 18 1 Oscillator Circuit 18 2 Clock Generator Circuit...
Page 794: ...CHAPTER 22 TYPICAL CHARACTERISTICS...
Page 796: ...APPENDIX 1 MECHANICAL SPECIFICAITONS Appendix 1 1 Dimensional Outline Drawing...
Page 798: ...APPENDIX 2 INSTRUCTION PROCESSING TIME Appendix 2 1 32180 Instruction Processing Time...
Page 802: ...APPENDIX 3 PROCESSING OF UNUSED PINS Appendix 3 1 Example Processing of Unused Pins...