Hi Rocky,
I just discovered this oscillation on the reset pin about one hour ago, but rather than trying to kill it I have been trying to find the reason.
Here is what I have found:
Start a blank JB16.
Execution starts from the monitor mode reset vector at $FEFE which is $FE10.
0000FE10 A7FA AIS #$FA ;don't know
0000FE12 1100 BCLR 0,PORTA ;why?
0000FE14 CDFA07 JSR $FA07 ;jump to near top of MON ROM 1 to see if USB Monitor
;
0000FA07 070809 BRCLR 3,PORTE,*+12 ;abs = $FA13 branch if D+ low USBICP!!!!!
0000FA0A 3F38 CLR UADDR ;disable USB
0000FA0C 6EFF80 MOV #$FF,$80 ;RAM0 = $FF
0000FA0F 45FFF6 LDHX #$FFF6 ;TIM1 Int Vector
0000FA12 81 RTS
;
0000FA13 C6FFD0 LDA $FFD0 ;Check Ext Security 2 USBICP
0000FA16 4187F1 CBEQA #$87,*-12 ;abs = $FA0A No USB if sec2 set
0000FA19 9B SEI ;mask ints
blah, blah, blah
So very quickly after it starts it checks for USB D+ being low (which is the only condition required other than blank)
If it is low, it checks that the extended security has not been set then gets to address $FA19.
$FA19 is the entry point that is used by AN2399 and also where the OSBDM code jumps to if the PORTD bit 3 jumper is on.
Now the strange thing is if you jump to $FA19 from a user programme in FLASH everything works very reliably.
If you let it get there via the monitor code it doesn't.
Also jumping straight to $FE10 from a user programme works OK as well
The only pre-requisite is to disable the COP.
The reset pin is going low for a double pulse every 150us when entered via monitor entry.
A 0.1uf makes it all work for me. But why doesn't the problem occur when entered from user mode?
Here is my test programme:
ORG $BA00 ;start of FLASH
BRCLR 3,$03,COP ;if jumper on don't disable COP
MOV #%00000001,$1F ;disable COP
;COP JMP $FA19 ;jump to ICP entry in Monitor that AN2399 uses
COP JMP $FE10 ;jump to monitor entry point that blank reset vector uses
ORG $FFFE
DW $BA00 ;set reset vector to start of FLASH
BR Peg