From: Dan White Date: Sun, 1 Jan 2012 22:24:38 +0000 (-0600) Subject: BUG in bootloader branch of bootcode X-Git-Tag: calibrations~386 X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=f79b1aa4bed73ff1c6d6953b85931dea58f27c08;p=430.git BUG in bootloader branch of bootcode sets SCG[1:0] = 10b which simultaneously *disables* the HFXTAL oscillator and *selects* the HFXTAL output --- diff --git a/rom-label.asm b/rom-label.asm index 5dcef74..1a7afe2 100644 --- a/rom-label.asm +++ b/rom-label.asm @@ -342,6 +342,22 @@ gotoMain: 315c: a4 f2 ;set SCG1 = 1 315e: 32 d0 80 00 bis #128,sr ;#0x0080 +; FIXME: +; *** IN FABBED CHIP: *** +; this makes SCG[1:0] = 10b +; SCG0 = 0 **selects** the HF crystal +; SCG1 = 1 **disables** the HF crystal oscillator +; by stopping the inverter FB loop. +; The crystal output will likely continue for a few cycles, +; depending on the trail-off of the tank. +; The tank will NOT oscillate long enough to continue execution to a point +; where SCG[1:0] can be written to again. +; +; Options: +; a) Directly drive the HFXTAL PI pin externally. +; b) Couple the LFXTAL to the PI pin weakly to drive enough to switch. +; May not be fast enough for UART0 baud rate-setting code operation. +; c) ??? Assembly_Code: 3162: b2 40 8e 34 mov #UART_ISR, &0xffea ;#0x348e @@ -454,7 +470,7 @@ main: ;infinite loop ; set CPUOFF bit -; set GIE bit +; set GIE bit (enable) ; r4 += 0 (nop) 3218: 32 d0 18 00 bis #24,sr ;#0x0018 321c: 04 53 add #0, r4 ;r3 As==00