mc9s08sg8 go to stop3 mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mc9s08sg8 go to stop3 mode

939 Views
liping_li
Contributor I

hello:

   I think in the Mc9s08sg8 HCS08 series chips into stop3 mode to achieve low power consumption, according to the data manual configuration, program without error, but through the equipment testing found that the chip does not enter the stop3 model (current ma around 9 when in the ordinary circumstances, the configuration register into stop3 is still around 9 ma, so the judge did not enter success), here is the manual register ,my code and the characteristics of the current image:

大家好:

   我想在HCS08系列芯片中的mc9s08sg8中进入stop3模式以实现低功耗,根据数据手册配置,程序没有报错,但是通过设备测试发现芯片并没有进入stop3模式(电流在普通情况下时9ma左右,配置寄存器进入stop3仍然是9ma左右,因此判断没有进入成功),下面是手册寄存器、电流特性、我的代码的图片:pastedImage_1.png

pastedImage_1.png

pastedImage_2.png

thanks!

3 Replies

785 Views
vicentegomez
NXP TechSupport
NXP TechSupport

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.

785 Views
liping_li
Contributor I

Thank you for your reply. In these days' attempts, I also found that as long as the clock was switched to 1kHz and the energy LP was enabled, the current could reach only 0.3ma, which was much lower than the 8ma in run mode.I will make some modifications and tests according to your code. Thanks again.

谢谢你的回复,在这几天尝试中,我也发现只要将时钟切换为1kHz,使能LP,电流能够达到仅0.3ma,相比run 模式的8ma降低了很多。我会参考你的代码做一些修改和测试,再次感谢。

pastedImage_1.png

0 Kudos

785 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Please let me know if you have more questions

Regards

Vicente

0 Kudos