📄 boot5402.lst
字号:
657 000209 F010 sub #1,a ;Section size - 1.
00020a 0001
658 00020b 881A stlm a, brc ;Update block repeat counter register.
659
660 00020c 6D93 mar *ar3+ ;Increment address.
661 00020d F074 call SPI_READ ;Read address 0eh.
00020e 0000!
662 00020f 6F67 stl a, 8, xdest ;Store xdest high-byte.
000210 0C88
663 000211 6D93 mar *ar3+ ;increment address
664 000212 F074 call SPI_READ ;Read address 0fh.
000213 0000!
665 000214 1A67 or xdest, a ;And xdest high-byte and low-byte.
666 000215 8067 stl a, xdest ;Store XPC entry point.
667
668 000216 6D93 mar *ar3+ ;Increment address.
669 000217 F074 call SPI_READ ;Read address 010h.
000218 0000!
670 000219 6F66 stl a, 8, dest ;Store dest high-byte.
00021a 0C88
TMS320C54x COFF Assembler Version 3.50 Thu Feb 03 13:21:23 2000
Copyright (c) 1996-1999 Texas Instruments Incorporated
bootVC5402 PAGE 17
671 00021b 6D93 mar *ar3+ ;increment address
672 00021c F074 call SPI_READ ;Read address 011h.
00021d 0000!
673 00021e 1A66 or dest, a ;And dest high-byte and low-byte.
674 00021f 8066 stl a, dest ;Store PC dest point.
675 *********This is the loop for reading a section**************
676 000220 F072 rptb SPILOOP-1
000221 0230+
677 000222 6D93 mar *ar3+ ;Increment address.
678 000223 F074 call SPI_READ ;Read high-byte.
000224 0000!
679 000225 6F69 stl a, 8, temp0 ;Store high-byte.
000226 0C88
680 000227 6D93 mar *ar3+ ;increment address
681 000228 F074 call SPI_READ ;Read address low-byte.
000229 0000!
682 00022a 1A69 or temp0, a ;And high-byte and low-byte.
683 00022b 8069 stl a, temp0 ;Temporarily save it.
684 00022c 5667 dld xdest, a ;Get destination address.
685 00022d 7F69 writa temp0 ;[acc A] <-- acc BL
686 00022e F000 add #1, a ;increment dest add
00022f 0001
687 000230 4E67 dst a, xdest ;Save destination address.
688 000231 6D93 SPILOOP mar *ar3+ ;Increment address.
689 000232 F073 b SPISECT ;Read next section.
000233 01FF+
690 000234 F6BD SPIEND rsbx XF ;Drive XF low - optional hold feature.
691 000235 F073 b endboot ;Branch to loaded code.
000236 00C2+
692
693
694 *****************************************************************
695 * Bootload from parallel I/O port (pa0)
696 *****************************************************************
697
698 000237 pasyini
699 000237 F074 call handshake
000238 02AC+
700 000239 7469 portr pa0, @temp0 ; read BSW 10AAh or 8AAh
00023a 0000
701 00023b 1069 ld @temp0, a ; check BSW
702 00023c F110 sub #10aah, a, b ; acc A = 10aah ?
00023d 10AA
703 00023e FA4D bcd pasync16, beq ;
00023f 027A+
704 000240 F030 and #0ffh, a ; check acc AL = 08
000241 00FF
705 000242 F010 sub #8,a ;
000243 0008
706 000244 F844 bc endboot, aneq ; not a boot mode
000245 00C2+
707 000246 F074 call handshake
000247 02AC+
708 000248 7469 portr pa0, @temp0 ; read BSW 10AAh or 8AAh
000249 0000
TMS320C54x COFF Assembler Version 3.50 Thu Feb 03 13:21:23 2000
Copyright (c) 1996-1999 Texas Instruments Incorporated
bootVC5402 PAGE 18
709 00024a 1069 ld @temp0, a ; check BSW
710 00024b F030 and #0ffh, a ; check acc AL = 08
00024c 00FF
711 00024d F010 sub #0aah, a ; acc A = 0aah ?
00024e 00AA
712 00024f F845 bc pasync08, aeq ;
000250 0253+
713 000251 F073 b endboot
000252 00C2+
714
715 *****************************************************************
716 * Bootload from I/O port (8-bit parallel), MS byte first
717 *****************************************************************
718
719 000253 pasync08
720 000253 F074 call handshake8
000254 02B3+
721 000255 8128 stl b, @swwsr ; save swwsr ini-value to SWWSR
722
723 000256 F074 call handshake8
000257 02B3+
724 000258 8129 stl b, @bscr ; save bscr ini-value to BSCR
725
726 000259 F074 call handshake8
00025a 02B3+
727 00025b 8161 stl b, @xentry ; save XPC of entry point
728
729 00025c F074 call handshake8
00025d 02B3+
730 00025e 8162 stl b, @entry ; save entry point
731 00025f pasy08_1
732 00025f E900 ld #0, b ; b=0, Rev1.02 to fix 8bitI/O bug.
733 000260 F074 call handshake8
000261 02B3+
734 000262 F84D bc endboot, beq ; if size = 0, branch to endboot
000263 00C2+
735 000264 F310 sub #1, b ; otherwise, subtract 1 from block size
000265 0001
736 000266 891A stlm b, brc ; set brc to correct block size
737
738 000267 F074 call handshake8
000268 02B3+
739 *********************** Bug fix ***********************************
740 000269 8169 stl b, @temp0 ; save XPC of destination addr
741 00026a 4469 ld @temp0,16,a ;added to correctly calculate the
742 ;extended address of the section
743 ;PMJ2(11/10/99) 1.03
744 00026b F074 call handshake8
00026c 02B3+
745 00026d F600 add b,a ; acc A <-- destination address
746 *******************************************************************
747
748 00026e F072 rptb pfxr08-1
00026f 0277+
749 000270 F074 call handshake8
TMS320C54x COFF Assembler Version 3.50 Thu Feb 03 13:21:23 2000
Copyright (c) 1996-1999 Texas Instruments Incorporated
bootVC5402 PAGE 19
000271 02B3+
750
751 000272 F7BD ssbx xf ; acknowledge byte as soon as it's read
752
753 000273 F803 bc $,bio ;wait until BIO high to write data
000274 0273+
754
755 000275 7F0B writa BL ; write code word to program memory
756 000276 F000 add #1, a ; increment destination address
000277 0001
757 000278 pfxr08
758 000278 F073 b pasy08_1 ; branch to next section
000279 025F+
759
760 *****************************************************************
761 * Bootload from I/O port (16-bit parallel)
762 *****************************************************************
763
764 00027a pasync16
765 00027a F074 call handshake
00027b 02AC+
766 00027c 7428 portr pa0, @swwsr ; read word from port to SWWSR
00027d 0000
767 00027e F074 call handshake
00027f 02AC+
768 000280 7429 portr pa0, @bscr ; read word from port to BSCR
000281 0000
769 000282 F074 call handshake
000283 02AC+
770 000284 7461 portr pa0, @xentry ; read word from port to XPC of
000285 0000
771 ; entry point
772 000286 F074 call handshake
000287 02AC+
773 000288 7462 portr pa0, @entry ; read word from port to entry
000289 0000
774 00028a pasy16_1
775 00028a F074 call handshake
00028b 02AC+
776 00028c 7468 portr pa0, @lngth ; read word from port to length
00028d 0000
777 00028e 1268 ldu @lngth, a ; check size
778 00028f FA45 bcd endboot, aeq ; size = 0, end of boot
000290 00C2+
779 000291 F110 sub #1, a, b ;
000292 0001
780 000293 891A stlm b, brc
781 000294 F074 call handshake
000295 02AC+
782 000296 7466 portr pa0, @dest ; read word from port to XPC of
000297 0000
783 ; destination addr
784 000298 F074 call handshake
000299 02AC+
785 00029a 7469 portr pa0, @temp0 ; read from port to temp for
TMS320C54x COFF Assembler Version 3.50 Thu Feb 03 13:21:23 2000
Copyright (c) 1996-1999 Texas Instruments Incorporated
bootVC5402 PAGE 20
00029b 0000
786 ; destiantion addr
787 00029c 1269 ldu @temp0, a ; acc A <-- destination address
788 00029d 3C66 add @dest, 16, a ;
789
790 00029e F072 rptb pfxr16-1
00029f 02A9+
791 0002a0 F074 call handshake ; check BIO low ?
0002a1 02AC+
792 0002a2 7469 portr pa0, @temp0 ; read word from port to temp
0002a3 0000
793 0002a4 F7BD ssbx xf ; acknowledge word as soon as it's read
794
795 0002a5 F803 bc $,bio ; wait until BIO high to write data
0002a6 02A5+
796
797 0002a7 7F69 writa @temp0 ; write word to destination
798 0002a8 F000 add #1, a ; increment destination address
0002a9 0001
799 0002aa pfxr16
800 0002aa F073 b pasy16_1
0002ab 028A+
801
802 * Handshake with BIO signal using XF
803
804 0002ac handshake
805 0002ac F7BD ssbx xf ; acknowledge previous data word
806 0002ad F803 bc $,bio ; wait till host sends request
0002ae
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -