BUG in bootloader branch of bootcode
authorDan White <dan@whiteaudio.com>
Sun, 1 Jan 2012 22:24:38 +0000 (16:24 -0600)
committerDan White <dan@whiteaudio.com>
Sun, 1 Jan 2012 22:24:38 +0000 (16:24 -0600)
sets SCG[1:0] = 10b
which simultaneously *disables* the HFXTAL oscillator
and *selects* the HFXTAL output

rom-label.asm

index 5dcef741e030fcea38b56810035ed68bbe5778c2..1a7afe27804e01771cf173944879e213a8e8d235 100644 (file)
@@ -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