
R01UH0336EJ0102 Rev.1.02
Page 341 of 1538
Jul 17, 2014
V850E2/PG4-L
Section 9 Safety Functions
9.7 Self-Diagnosis Method for a Compare Unit
Follow the procedure below to execute self-diagnosis of a comparison unit
during operations. The behavior is not guaranteed in case of departure from
the procedure described.
Procedure 1
1. After start-up, read the RESF register to check that a reset is not being
generated by the safety guardian (hereinafter called the SGA).
2. In the INTCFGB register, change INTCME (compare interrupt) from the
NMI level to the EI level.
3. In the SGAIRCFG0 register, mask the generation of the SGA reset
(SGARES) in response to a comparison unit error (SGATERRIN5).
4. Set the ICSGACMEDIAG register to enable interrupts.
5. Write 1 to the SGAPE1.SGAPE109 bit. The output signal corresponding to
the SGAPE109 bit is only connected to the INTC terminal of the master
CPU, so interrupts are only conveyed to the master CPU.
6. Enable a reset in response to the compare unit error (SGATERRIN5) by
the SGAIRCFG0 register in the interrupt routine of compare unit error.
7. SGA reset (SGARES) is generated (non-generation of the reset means a
malfunction of the comparison unit). At this point, the INTCFGB register is
initialized.
8. After the chip is restarted, read the RESF register to check that an SGA
reset (SGARES) is being generated.
9. Clear the flag set to indicate the comparison unit error (SGATERRIN5) in
the error source status register of the SGA.
Procedure 2
1. After start-up, read the RESF register to check that a reset is not being
generated by the SGA.
2. In the INTCFGB register, change INTCME (compare interrupt) from the
NMI level to the EI level.
3. In the SGAIRCFG0 register, enable the generation of the SGA reset
(SGARES) in response to a comparison unit error (SGATERRIN5).
4. Use the interrupt mask bit (ICSGACMEDIAG.MKSGACMEDIAG) to mask
the interrupt corresponding to the SGAPE109 bit in the SGAPE1 register.
5. Write 1 to the SGAPE1.SGAPE109 bit. The output signal corresponding to
the SGAPE109 bit is only connected to the INTC terminal of the master
CPU, so interrupts are only conveyed to the master CPU.
6. Transfer the value of the ICSGACMEDIAG register to the RAM. The values
read by the master CPU and the checker CPU will differ, and so will not
match.
An SGA reset (SGARES) is generated (non-generation of the reset means
a malfunction of the compare unit). At this point, the INTCFGB register is
initialized.
7. After the chip is restarted, read the RESF register to check that an SGA
reset (SGARES) is being generated.
8. Clear the flag set to indicate the comparison unit error (SGATERRIN5) in
the error source status register of the SGA.