Please check your hardware, the measurement was taken just with the device, without any other component
I have a sample code for the SH ( the commercial version of the SG) that set the stop3
#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
unsigned int temp;
void main(void) {
EnableInterrupts; /* enable interrupts */
/* include your code here */
PTBDD = PTBDD_PTBDD6_MASK |PTBDD_PTBDD7_MASK;
SRS = 0x55; //clears the COP
SPMSC1 = SPMSC1_LVDE_MASK | SPMSC1_LVDSE_MASK;
SOPT1 |=SOPT1_STOPE_MASK; // stop mode enable
SOPT2 = 0x00; //COP at 1-kHz
RTCSC = 0x1B; //B real time interrupt enable, preescaler to 10 ms
RTCMOD = 0xFF ; // mod = 84 ~ 1 seg
for(;;) {
PTBD_PTBD7 = ~PTBD_PTBD7;
_Stop;
//__RESET_WATCHDOG(); /* feeds the dog */
} /* loop forever */
/* please make sure that you never leave main */
}
/*******************************************************************************/
void interrupt VectorNumber_Vrtc rtc_ISR(void)
{
RTCSC_RTIF = 1; // Acknowledge rtc Interrupts
PTBD_PTBD6 = ~PTBD_PTBD6; // LED = ON/off
}
/******************************************************************************/
I hope this will help you.