Motorola Semiconductor Engineering Bulletin EB422 Enhanced
Motorola Semiconductor Engineering Bulletin EB422 Enhanced
Motorola Semiconductor Engineering Bulletin EB422 Enhanced
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Freescale <strong>Semiconductor</strong>, Inc...<br />
<strong>EB422</strong><br />
<strong>Engineering</strong> <strong>Bulletin</strong><br />
Listing 9. MC68HC711PH8 Bootloader ROM Listing<br />
0217 * 9/ If PLLON=1 then wait 10ms (@ 38.4KHz)<br />
0218 * 10/ Set BCS=1 and MCS=1<br />
0219 * 11/ Continue bootloader<br />
0220 ********<br />
0221 bea8 PLLSTRT EQU *<br />
0222 bea8 96 2e LDAA PLLCR Get control values<br />
0223 beaa 2a 26 BPL DONE Not active carry on<br />
0224 beac d6 05 LDAB PORTF Get SYNR value<br />
0225 beae c1 ff CMPB #$FF Check for default<br />
0226 beb0 26 02 BNE NOTFF Not $FF so carry on<br />
0227 beb2 c6 cc LDAB #$CC Load value for 8MHz<br />
0228 beb4 NOTFF EQU *<br />
0229 beb4 84 bf ANDA #$BF Reset BCS=0<br />
0230 beb6 97 2e STAA PLLCR<br />
0231 beb8 84 3f ANDA #$3F Reset PLLON=0<br />
0232 beba 97 2e STAA PLLCR<br />
0233 bebc d7 2f STAB SYNR New value for SYNR<br />
0234 bebe 8a 80 ORAA #$80 Set PLLON=1<br />
0235 bec0 97 2e STAA PLLCR<br />
0236 bec2 96 2e LDAA PLLCR Check if PLL is active<br />
0237 bec4 2a 0c BPL DONE Not active carry on<br />
0238 bec6 18 ce 00 0e LDY #14 Dly for 10ms @ 38.4KHz<br />
0239 beca 18 09 DELLP DEY<br />
0240 becc 26 fc BNE DELLP<br />
0241 bece 8a 44 ORAA #$44<br />
0242 bed0 97 2e STAA PLLCR BCS/MCS for high speed<br />
0243 bed2 39<br />
0244<br />
DONE RTS<br />
0245 ***************************************************************<br />
0246 * EEPROM ERASE DELAY<br />
0247 bed3 ERASE EQU *<br />
0248 bed3 18 ce 0b b8 LDY #3000<br />
0249 bed7 BK1 EQU *<br />
0250 bed7 18 09 DEY<br />
0251 bed9 26 fc BNE BK1<br />
0252 bedb 7f 00 3b CLR PPROG Clear<br />
0253 bede 39<br />
0254<br />
RTS<br />
0255 ***************************************************************<br />
0256<br />
0257<br />
* Block fill unused bytes with zero<br />
0258 bedf 00 00 00 00 00 00<br />
00 00 00 00 00 00<br />
00 00 00 00 00 00<br />
00 00 00 00 00 00<br />
00 00 00 00 00 00<br />
BSZ $BF00-*<br />
00 00 00<br />
Freescale <strong>Semiconductor</strong>, Inc.<br />
0259<br />
0260 ***************************************************************<br />
0261 bf00 ORG $BF00<br />
0262 ***************************************************************<br />
0263<br />
0264 * Next instruction provides a predictable place<br />
0265 * to call PROGRAM even if the routine changes in<br />
0266 * size in future versions. Note that the "UPLOAD"<br />
0267 * routine did not fit on this part.<br />
0268 *<br />
0269 bf00 7e be 40 PROGRAM JMP PROGOUT Program utility<br />
0270<br />
0271 ***************************************************************<br />
0272 * Main bootloader starts here<br />
0273 ***************************************************************<br />
0274 * RESET vector points to here<br />
MOTOROLA 23<br />
For More Information On This Product,<br />
Go to: www.freescale.com