Marc Fonoll

MC9S08QE32CLC--Lpr MODE (FBELP) & STOP3 mode supply current

Discussion created by Marc Fonoll on May 4, 2009
Latest reply on Mar 18, 2010 by Kerry Mackenroth

Hi,

I'm working with MC9S08QE32CLC. The application it's battery powered and the power consumtion it's a critical point. So I'm trying to work in Low Power Run Mode (FBELP-external oscillator=32.678KHz) and STOP3 mode. The problem it's that I cannot achieve the supply current detailed on datasheet for these modes of operation. My supply current of uControler (out of BDM not active) is about 300uA increasing or decreasing in function of the temperature. I'm new in Freescale and it's possible I'm making some big mistake. Down there is part of the firmware used in assembler. On the board there is no other electronics, only 3Vcc power regulator. Many thanks in advance for your help! 

 

    LDA #%01100000          ; Watchdog disable, Stop Mode enabled, NO Background Pin, No Reset Pin
            STA SOPT1
            
            LDA #$00                  ; Pheriperal clocks disabled
            STA SCGC1
            STA SCGC2
                        
            LDA #%11111110                ; All ports outputs except PTA0 (input--Switch)
            STA PTADD
            LDA #$ff
            STA PTBDD
            STA PTCDD
            STA PTDDD
            LDA #$00
            STA PTAD
            STA PTBD
            STA PTCD
            STA PTDD
            
                       
            ; ICS mode----> FBE
            LDA #%00000100          ;External clock---->Oscillator (32.768KHz)
            STA ICSC2
            LDA #%10000000          ;External clock --->Bus clock
            STA ICSC1
OSCINITIAL0:                                            ;Wait for external oscillator initialization
            BRCLR ICSSC_OSCINIT,ICSSC,OSCINITIAL0
OSCINITIAL1:
            BRSET ICSSC_IREFST,ICSSC,OSCINITIAL1
OSCINITIAL2:
            BRCLR ICSSC_CLKST1,ICSSC,OSCINITIAL2
OSCINITIAL3:
            BRSET ICSSC_CLKST0,ICSSC,OSCINITIAL3
                        
                      
            ; ICS mode----> FBELP
            LDA #%00001100      ; FLL DISABLED
            STA ICSC2
            
                        
            ; Low Power Run Mode
            LDA SPMSC1
            ORA #%01000000   ;RESET FLAG DE LVD,LVDF=1--->NO RESET, LVD OFF  (also OFF in stop mode)
            AND #%01000000
            STA SPMSC1
            
            
            LDA #%01000000
            STA SPMSC3
            
            LDA #%01011000
            AND SPMSC2
            ORA #%00000110  ;STOP3 configuration
            STA SPMSC2
            ORA #%10000000   ;Low Power run mode
            STA SPMSC2

            STOP                   ;STOP3 mode

 

 

Appreciate,

mfv

Outcomes