📄 s12xe_flash.lst
字号:
Options : -CPUHCS12XE -D__FAR_DATA -D__NO_FLOAT__ -Env"GENPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\prm;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\cmd;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\lib;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\src;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\lib;*C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\src;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources\Configuration;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\defs_XEx100_M22E;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\include;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\include" -Env"LIBPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\prm;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\cmd;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\lib;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\src;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\lib;*C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\src;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources\Configuration;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\defs_XEx100_M22E;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\include;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\include" -Env"OBJPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin" -Env"TEXTPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin" -Lasm=%n.lst -Mb -ObjN="D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Example_9_Data\Flash_P&E_target\ObjectCode\S12XE_Flash.c.o" -WmsgSd1106
0000 3b [2] PSHD
189: /* Clear any error flags*/
190: FTM.fstat.byte = (FPVIOL | ACCERR);
0001 cc0630 [2] LDD #1584
0004 7b0000 [3] STAB FTM:6
191:
192: /* Write the program command and the GPAGE part */
193: FTM.fccobix.byte = 0;
0007 790000 [3] CLR FTM:2
194: FTM.fccob.byte.hi = PROGRAM_P_FLASH;
000a 7a0000 [3] STAA FTM:10
195: FTM.fccob.byte.lo = gpage;
000d e687 [3] LDAB 7,SP
000f 7b0000 [3] STAB FTM:11
196: /* Write the 16-bit address part of phrase */
197: FTM.fccobix.byte++;
0012 720000 [4] INC FTM:2
198: FTM.fccob.word = addr;
0015 ec85 [3] LDD 5,SP
0017 7c0000 [3] STD FTM:10
199:
200: FTM.fccobix.byte++;
001a 720000 [4] INC FTM:2
201: FTM.fccob.word = *data++; /* Write next data word to CCOB buffer. */
001d ee80 [3] LDX 0,SP
001f 0718 [4] BSR *+26 ;abs = 0039
202:
203: FTM.fccobix.byte++;
204: FTM.fccob.word = *data++; /* Write next data word to CCOB buffer. */
0021 0716 [4] BSR *+24 ;abs = 0039
205:
206: FTM.fccobix.byte++;
207: FTM.fccob.word = *data++; /* Write next data word to CCOB buffer. */
0023 0714 [4] BSR *+22 ;abs = 0039
208:
209: FTM.fccobix.byte++;
210: FTM.fccob.word = *data; /* Write next data word to CCOB buffer. */
0025 ec00 [3] LDD 0,X
0027 7c0000 [3] STD FTM:10
211: /* Clear command buffer empty flag by writing a 1 to it
212: This launches the command. */
213: FTM.fstat.byte = CCIF;
002a c680 [1] LDAB #128
002c 7b0000 [3] STAB FTM:6
214: while (!FTM.fstat.bit.ccif) { /* wait for the command to complete */
002f 1f000080fb [5] BRCLR FTM:6,#128,*+0 ;abs = 002f
215: }
216:
217: return(FTM.fstat.byte); /* return status */
0034 f60000 [3] LDAB FTM:6
218: }
0037 30 [3] PULX
0038 0a [7] RTC
0039 ec31 [3] LDD 2,X+
003b 7c0000 [3] STD FTM:10
003e 720000 [4] INC FTM:2
0041 3d [5] RTS
219:
220: /******************************************************************************
221: Function Name : LoadP_FlashPhraseData
222: Engineer : r32151
223: Date : 15/12/06
224: Arguments : gpage GPAGE of phrase to be programmed
225: addr 16-bit part of global addreess of phrase to be
226: programmed - must be on a /8 boundary
227: * data 16-bit data to be programmed
228: Notes : This function must be located in RAM or a flash block not
229: being programmed.
230: ******************************************************************************/
231: tU08
232: LoadP_FlashPhraseData(tU08 gpage, tU16 addr, tU16 *data)
233: {
Function: LoadP_FlashPhraseData
Source : D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources\S12XE_Flash.c
Options : -CPUHCS12XE -D__FAR_DATA -D__NO_FLOAT__ -Env"GENPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\prm;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\cmd;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\lib;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\src;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\lib;*C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\src;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources\Configuration;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\defs_XEx100_M22E;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\include;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\include" -Env"LIBPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\prm;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\cmd;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\lib;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\src;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\lib;*C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\src;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Sources\Configuration;D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\defs_XEx100_M22E;C:\Program Files\Freescale\CW for HC12 V4.5\lib\HC12c\include;C:\Program Files\Freescale\CW for HC12 V4.5\lib\xgatec\include" -Env"OBJPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin" -Env"TEXTPATH=D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\bin" -Lasm=%n.lst -Mb -ObjN="D:\Profiles\b06321\My Documents\S12X\S12XE - Sailfish\Training\Training REV0\Solutions\Example 9\Example_9_Data\Flash_P&E_target\ObjectCode\S12XE_Flash.c.o" -WmsgSd1106
0000 3b [2] PSHD
234: /* Clear any error flags*/
235: FTM.fstat.byte = (FPVIOL | ACCERR);
0001 cc0530 [2] LDD #1328
0004 7b0000 [3] STAB FTM:6
236:
237: /* Write the program command and the GPAGE part */
238: FTM.fccobix.byte = 0;
0007 790000 [3] CLR FTM:2
239: FTM.fccob.byte.hi = LOAD_DATA_FIELD;
000a 7a0000 [3] STAA FTM:10
240: FTM.fccob.byte.lo = gpage;
000d e687 [3] LDAB 7,SP
000f 7b0000 [3] STAB FTM:11
241: /* Write the 16-bit address part of phrase */
242: FTM.fccobix.byte++;
0012 720000 [4] INC FTM:2
243: FTM.fccob.word = addr;
0015 ec85 [3] LDD 5,SP
0017 7c0000 [3] STD FTM:10
244:
245: FTM.fccobix.byte++;
001a 720000 [4] INC FTM:2
246: FTM.fccob.word = *data++; /* Write next data word to CCOB buffer. */
001d ee80 [3] LDX 0,SP
001f 0718 [4] BSR *+26 ;abs = 0039
247:
248: FTM.fccobix.byte++;
249: FTM.fccob.word = *data++; /* Write next data word to CCOB buffer. */
0021 0716 [4] BSR *+24 ;abs = 0039
250:
251: FTM.fccobix.byte++;
252: FTM.fccob.word = *data++; /* Write next data word to CCOB buffer. */
0023 0714 [4] BSR *+22 ;abs = 0039
253:
254: FTM.fccobix.byte++;
255: FTM.fccob.word = *data; /* Write next data word to CCOB buffer. */
0025 ec00 [3] LDD 0,X
0027 7c0000 [3] STD FTM:10
256: /* Clear command buffer empty flag by writing a 1 to it
257: This launches the command. */
258: FTM.fstat.byte = CCIF;
002a c680 [1] LDAB #128
002c 7b0000 [3] STAB FTM:6
259: while (!FTM.fstat.bit.ccif) { /* wait for the command to complete */
002f 1f000080fb [5] BRCLR FTM:6,#128,*+0 ;abs = 002f
260: }
261:
262: return(FTM.fstat.byte); /* return status */
0034 f60000 [3] LDAB FTM:6
263: }
0037 30 [3] PULX
0038 0a [7] RTC
0039 ec31 [3] LDD 2,X+
003b 7c0000 [3] STD FTM:10
003e 720000 [4] INC FTM:2
0041 3d [5] RTS
264:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -