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 />
Listing 11. MC68HC711E20 Secured Bootloader ROM Listing<br />
<strong>EB422</strong><br />
Freescale <strong>Semiconductor</strong>, Inc.<br />
<strong>Engineering</strong> <strong>Bulletin</strong><br />
Listing 11. MC68HC711E20 Secured Bootloader ROM Listing<br />
0442 *<br />
0443 be9a INSCI EQU *<br />
0444 be9a 12 74 0a a2 BRSET SCSR1 #$0A TLKRSTART Restart talker if break detected<br />
0445 be9e 13 74 20 f8 BRCLR SCSR1 #RDRF INSCI Loop to INSCI if no character received<br />
0446 bea2 d6 77 LDAB SCDRL then read data received from host<br />
0447 bea4 39 EPRG RTS and return with data in ACCB<br />
0448 *<br />
0449 bea5 OUTSCI EQU * Only register Y modified.<br />
0450 bea5 13 74 80 fc OUTSCI1 BRCLR SCSR1 #$80 OUTSCI1Loop until set before storing next byte<br />
0451 bea9 97 77 STAA SCDRL Important - Updates CCR!<br />
0452 beab 39 RTS<br />
0453 *<br />
0454 beac INH1 EQU *<br />
0455 beac 81 7e CMPA #$7E If command is read MCU registers then INH1A<br />
0456 beae 26 0c BNE INH2 else jump to INH2<br />
0457 *<br />
0458 beb0 30 INH1A TSX Move stack pointer to X<br />
0459 beb1 8f XGDX then to ACCD<br />
0460 beb2 8d f1 BSR OUTSCI send stack pointer to host (high byte first)<br />
0461 beb4 17 TBA<br />
0462 beb5 8d ee BSR OUTSCI then low byte<br />
0463 beb7 30 TSX Restore X (=stack pointer)<br />
0464 beb8 c6 09 LDAB #9 then return 9 bytes on stack<br />
0465 beba 20 bd BRA TREADMEM i.e. CCR,ACCB,ACCA,IXH,IXL,IYH,IYL,PCH,PCL<br />
0466 *<br />
0467 bebc INH2 EQU *<br />
0468 bebc 81 3e CMPA #$3E If command is write MCU registers then don't jump<br />
0469 bebe 26 d9 BNE RXSRVEX else quit processing<br />
0470 *<br />
0471 bec0 8d d8 BSR INSCI get stack pointer from host (High byte first)<br />
0472 bec2 17 TBA<br />
0473 bec3 8d d5 BSR INSCI<br />
0474 bec5 8f XGDX Move to X reg<br />
0475 bec6 35 TXS and copy to stack pointer<br />
0476 bec7 86 09 LDAA #9 Then put next 9 bytes from host on to stack<br />
0477 bec9 20 c0 BRA TWRITMEM<br />
0478 *<br />
0479 *****************************************************************<br />
0480 * Block fill unused bytes with zero<br />
0481<br />
0482 becb 00 00 00 00 00 00 BSZ $BED5-*<br />
00 00 00 00<br />
0483<br />
0484 *****************************************************************<br />
0485<br />
0486 END<br />
0487<br />
0001 **********************************************************************<br />
0002 * FIRMWARE FOR SECURED 68HC711E20 - 11 December 1992<br />
0003 *<br />
0004 **********************************************************************<br />
0005 * SECURED EPROM VERSION<br />
0006 *<br />
0007 * BASED ON SECURE 711E9 BOOTLOADER 09 MAY 92<br />
0008 * EXTENDED TO CHECK BOTH ROM BLOCKS OF E20<br />
0009 *<br />
0010 * THIS NEW VERSION ALLOWS VARIABLE LENGTH DOWNLOAD<br />
0011 * BY QUITTING RECEPTION OF CHARACTERS WHEN AN IDLE<br />
0012 * OF AT LEAST FOUR WORD TIMES OCCURS<br />
0013 *<br />
0014 * EQUATES FOR USE WITH INDEX OFFSET = $1000<br />
0015 *<br />
0016 *<br />
0017 0008 PORTD EQU $08<br />
0018 0009 DDRD EQU $09<br />
MOTOROLA 33<br />
For More Information On This Product,<br />
Go to: www.freescale.com