Kevin Sargent

Stumped geezer on Stop3 power / QDn

Discussion created by Kevin Sargent on Feb 21, 2012
Latest reply on Feb 23, 2012 by bigmac

10+yrs in Freescale 908/9S08, but I'm stumped... Very simple ckt: 3 spst mom. sws, 1 IR LED. Using KBI on sws to exit Stop3, issue a pattern, reenter Stop3 . This all works fine. I know Stop works: STOPE(SOPT1)=0 gives an ILOP(illegal op code) reset.

 

Problem: power never <8.5-9.1mA in Stop. Tried 2 QD2s 1 QD4: same situ. Using default internal FEI clock, other clocking methods yield looping resets. Weird part: attached USB Multilink has power@ 8.5-9.1, target as standalone draws 14-16mA! This is by pulling USB off live, It won't run standalone from power cycle. Tried a different USB Intf: same situ.

 

Sure looks like I've got the clock wrong, but don't see where. Also, it consistantly starts running the code after a flash download, first time I've seen this. Is there a CW(6.3.1) patch for QDs' I'm missing?

 

Here's the sysreg inits (yes, I write asm)

_Startup:

        ldhx    #RAMEnd+1    
        txs
        lda     #$f2
        sta     SOPT1           ;enable STOP modes
        clra
        sta     SOPT2
        lda     #$00
        sta     ICSC1           ;internal ref clk
        lda     #$40
        sta     ICSC2           ;clk/2, FLL ena
        lda     #clktrm          ;=$7b
        sta     ICSTRM
        lda     #$00
        sta     SPMSC1          ;disable LVD
        lda     #$41
        sta     SPMSC2          ;LVD low trip, STOP3 mode

 

I don't understand the ICS module well, but defaults have historically been fine. What else could be wrong?

 Thanks in advance, Kevin Sargent

Outcomes