Rev 67 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 67 | Rev 68 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | MP2COD 4.02, COFF to COD File Converter |
1 | MP2COD 4.02, COFF to COD File Converter |
| 2 | Copyright (c) 2006 Microchip Technology Inc. |
2 | Copyright (c) 2006 Microchip Technology Inc. |
| 3 | Listing File Generated: Tue Oct 31 13: |
3 | Listing File Generated: Tue Oct 31 13:43:43 2006 |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | Address Value Disassembly Source File |
6 | Address Value Disassembly Source File |
| 7 | ------- ------- ----------------------- ------------------------------------------------------------------------------- ----- |
7 | ------- ------- ----------------------- ------------------------------------------------------------------------------- ----- |
| 8 | /********************************************************************* F:\MCP\projects\CAN\canBoot\Source\Main.c |
8 | /********************************************************************* F:\MCP\projects\CAN\canBoot\Source\Main.c |
| Line 27... | Line 27... | ||
| 27 | /** V E C T O R R E M A P P I N G *******************************************/ F:\MCP\projects\CAN\canBoot\Source\Main.c |
27 | /** V E C T O R R E M A P P I N G *******************************************/ F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 28 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
28 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 29 | #pragma code _HIGH_INTERRUPT_VECTOR = 0x000008 F:\MCP\projects\CAN\canBoot\Source\Main.c |
29 | #pragma code _HIGH_INTERRUPT_VECTOR = 0x000008 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 30 | void _high_ISR (void) F:\MCP\projects\CAN\canBoot\Source\Main.c |
30 | void _high_ISR (void) F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 31 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
31 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 32 | 000008 ef04 GOTO |
32 | 000008 ef04 GOTO 0x1008 _asm goto RM_HIGH_INTERRUPT_VECTOR _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 33 | 00000a |
33 | 00000a f008 |
| 34 | 00000c 0012 RETURN 0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
34 | 00000c 0012 RETURN 0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 35 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
35 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 36 | #pragma code _LOW_INTERRUPT_VECTOR = 0x000018 F:\MCP\projects\CAN\canBoot\Source\Main.c |
36 | #pragma code _LOW_INTERRUPT_VECTOR = 0x000018 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 37 | void _low_ISR (void) F:\MCP\projects\CAN\canBoot\Source\Main.c |
37 | void _low_ISR (void) F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 38 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
38 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 39 | 000018 ef0c GOTO |
39 | 000018 ef0c GOTO 0x1018 _asm goto RM_LOW_INTERRUPT_VECTOR _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 40 | 00001a |
40 | 00001a f008 |
| 41 | 00001c 0012 RETURN 0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
41 | 00001c 0012 RETURN 0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 42 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
42 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 43 | #pragma code F:\MCP\projects\CAN\canBoot\Source\Main.c |
43 | #pragma code F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 44 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
44 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 45 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
45 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| Line 87... | Line 87... | ||
| 87 | static BYTE pgmData[64]; F:\MCP\projects\CAN\canBoot\Source\Main.c |
87 | static BYTE pgmData[64]; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 88 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
88 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 89 | static BYTE tmp; F:\MCP\projects\CAN\canBoot\Source\Main.c |
89 | static BYTE tmp; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 90 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
90 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 91 | // Inits F:\MCP\projects\CAN\canBoot\Source\Main.c |
91 | // Inits F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 92 | 000044 |
92 | 000044 db8e RCALL 0x762 mainInit(); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 93 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
93 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 94 | #ifdef USE_CAN F:\MCP\projects\CAN\canBoot\Source\Main.c |
94 | #ifdef USE_CAN F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 95 | 000046 |
95 | 000046 db93 RCALL 0x76e canInit(); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 96 | #endif F:\MCP\projects\CAN\canBoot\Source\Main.c |
96 | #endif F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 97 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
97 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 98 | 000048 |
98 | 000048 ec7b CALL 0xaf6,0x0 tBoot = tickGet(); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 99 | 00004a f005 |
99 | 00004a f005 |
| 100 | 00004c c010 MOVFF 0x10,0xfde |
100 | 00004c c010 MOVFF 0x10,0xfde |
| 101 | 00004e ffde |
101 | 00004e ffde |
| 102 | 000050 c011 MOVFF 0x11,0xfde |
102 | 000050 c011 MOVFF 0x11,0xfde |
| 103 | 000052 ffde |
103 | 000052 ffde |
| Line 107... | Line 107... | ||
| 107 | 00005a ffdd |
107 | 00005a ffdd |
| 108 | 00005c 52dd MOVF 0xdd,0x1,0x0 |
108 | 00005c 52dd MOVF 0xdd,0x1,0x0 |
| 109 | 00005e 52dd MOVF 0xdd,0x1,0x0 |
109 | 00005e 52dd MOVF 0xdd,0x1,0x0 |
| 110 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
110 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 111 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
111 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 112 |
|
112 | 00074c d489 BRA 0x60 for(;;) F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 113 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
113 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 114 | BYTE i; F:\MCP\projects\CAN\canBoot\Source\Main.c |
114 | BYTE i; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 115 | CAN_PROTO_MESSAGE outCm; F:\MCP\projects\CAN\canBoot\Source\Main.c |
115 | CAN_PROTO_MESSAGE outCm; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 116 | 000060 |
116 | 000060 dbaf RCALL 0x7c0 BOOL hasPacket = canGetPacket(); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 117 | 000062 6ee7 MOVWF 0xe7,0x0 |
117 | 000062 6ee7 MOVWF 0xe7,0x0 |
| 118 | 000064 0e15 MOVLW 0x15 |
118 | 000064 0e15 MOVLW 0x15 |
| 119 | 000066 cfe7 MOVFF 0xfe7,0xfdb |
119 | 000066 cfe7 MOVFF 0xfe7,0xfdb |
| 120 | 000068 ffdb |
120 | 000068 ffdb |
| 121 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
121 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| Line 152... | Line 152... | ||
| 152 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
152 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 153 | 0000a2 0100 MOVLB 0x0 switch(pgs) F:\MCP\projects\CAN\canBoot\Source\Main.c |
153 | 0000a2 0100 MOVLB 0x0 switch(pgs) F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 154 | 0000a4 51be MOVF 0xbe,0x0,0x1 |
154 | 0000a4 51be MOVF 0xbe,0x0,0x1 |
| 155 | 0000a6 0a05 XORLW 0x5 |
155 | 0000a6 0a05 XORLW 0x5 |
| 156 | 0000a8 e101 BNZ 0xac |
156 | 0000a8 e101 BNZ 0xac |
| 157 | 0000aa |
157 | 0000aa d34a BRA 0x740 |
| 158 | 0000ac 0a01 XORLW 0x1 |
158 | 0000ac 0a01 XORLW 0x1 |
| 159 | 0000ae e101 BNZ 0xb2 |
159 | 0000ae e101 BNZ 0xb2 |
| 160 | 0000b0 d299 BRA 0x5e4 |
160 | 0000b0 d299 BRA 0x5e4 |
| 161 | 0000b2 0a07 XORLW 0x7 |
161 | 0000b2 0a07 XORLW 0x7 |
| 162 | 0000b4 e101 BNZ 0xb8 |
162 | 0000b4 e101 BNZ 0xb8 |
| Line 167... | Line 167... | ||
| 167 | 0000be 0a03 XORLW 0x3 |
167 | 0000be 0a03 XORLW 0x3 |
| 168 | 0000c0 e101 BNZ 0xc4 |
168 | 0000c0 e101 BNZ 0xc4 |
| 169 | 0000c2 d0a7 BRA 0x212 |
169 | 0000c2 d0a7 BRA 0x212 |
| 170 | 0000c4 0a01 XORLW 0x1 |
170 | 0000c4 0a01 XORLW 0x1 |
| 171 | 0000c6 e001 BZ 0xca |
171 | 0000c6 e001 BZ 0xca |
| 172 | 0000c8 |
172 | 0000c8 d33e BRA 0x746 |
| 173 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
173 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 174 | case pgsWATING_START: F:\MCP\projects\CAN\canBoot\Source\Main.c |
174 | case pgsWATING_START: F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 175 | // Check if there is bootloader start packet F:\MCP\projects\CAN\canBoot\Source\Main.c |
175 | // Check if there is bootloader start packet F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 176 | 0000ca 0e15 MOVLW 0x15 if (hasPacket==TRUE && cm.funct==FUNCT_BOOTLOADER && cm.funcc==FUNCC_BOOT_INIT && cm.data[RID_INDEX]==MY_ID && cm.nid==MY_NID) F:\MCP\projects\CAN\canBoot\Source\Main.c |
176 | 0000ca 0e15 MOVLW 0x15 if (hasPacket==TRUE && cm.funct==FUNCT_BOOTLOADER && cm.funcc==FUNCC_BOOT_INIT && cm.data[RID_INDEX]==MY_ID && cm.nid==MY_NID) F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 177 | 0000cc 04db DECF 0xdb,0x0,0x0 |
177 | 0000cc 04db DECF 0xdb,0x0,0x0 |
| Line 255... | Line 255... | ||
| 255 | 000164 6fca MOVWF 0xca,0x1 |
255 | 000164 6fca MOVWF 0xca,0x1 |
| 256 | 000166 c064 MOVFF 0x64,0xc3 programmerSid = cm.sid; F:\MCP\projects\CAN\canBoot\Source\Main.c |
256 | 000166 c064 MOVFF 0x64,0xc3 programmerSid = cm.sid; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 257 | 000168 f0c3 |
257 | 000168 f0c3 |
| 258 | 00016a c065 MOVFF 0x65,0xc4 |
258 | 00016a c065 MOVFF 0x65,0xc4 |
| 259 | 00016c f0c4 |
259 | 00016c f0c4 |
| 260 | 00016e |
260 | 00016e ec7b CALL 0xaf6,0x0 t = tickGet(); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 261 | 000170 f005 |
261 | 000170 f005 |
| 262 | 000172 c010 MOVFF 0x10,0xbf |
262 | 000172 c010 MOVFF 0x10,0xbf |
| 263 | 000174 f0bf |
263 | 000174 f0bf |
| 264 | 000176 c011 MOVFF 0x11,0xc0 |
264 | 000176 c011 MOVFF 0x11,0xc0 |
| 265 | 000178 f0c0 |
265 | 000178 f0c0 |
| Line 298... | Line 298... | ||
| 298 | 0001b0 ffe6 |
298 | 0001b0 ffe6 |
| 299 | 0001b2 c006 MOVFF 0x6,0xfe6 |
299 | 0001b2 c006 MOVFF 0x6,0xfe6 |
| 300 | 0001b4 ffe6 |
300 | 0001b4 ffe6 |
| 301 | 0001b6 c007 MOVFF 0x7,0xfe6 |
301 | 0001b6 c007 MOVFF 0x7,0xfe6 |
| 302 | 0001b8 ffe6 |
302 | 0001b8 ffe6 |
| 303 | 0001ba |
303 | 0001ba ec7b CALL 0xaf6,0x0 |
| 304 | 0001bc f005 |
304 | 0001bc f005 |
| 305 | 0001be 52e5 MOVF 0xe5,0x1,0x0 |
305 | 0001be 52e5 MOVF 0xe5,0x1,0x0 |
| 306 | 0001c0 cfe7 MOVFF 0xfe7,0x7 |
306 | 0001c0 cfe7 MOVFF 0xfe7,0x7 |
| 307 | 0001c2 f007 |
307 | 0001c2 f007 |
| 308 | 0001c4 52e5 MOVF 0xe5,0x1,0x0 |
308 | 0001c4 52e5 MOVF 0xe5,0x1,0x0 |
| Line 343... | Line 343... | ||
| 343 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
343 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 344 | 00020a 0100 MOVLB 0x0 pgs = pgsDONE; F:\MCP\projects\CAN\canBoot\Source\Main.c |
344 | 00020a 0100 MOVLB 0x0 pgs = pgsDONE; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 345 | 00020c 0e05 MOVLW 0x5 |
345 | 00020c 0e05 MOVLW 0x5 |
| 346 | 00020e 6fbe MOVWF 0xbe,0x1 |
346 | 00020e 6fbe MOVWF 0xbe,0x1 |
| 347 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
347 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 348 | 000210 |
348 | 000210 d29d BRA 0x74c break; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 349 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
349 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 350 | case pgsSEND_ACK: F:\MCP\projects\CAN\canBoot\Source\Main.c |
350 | case pgsSEND_ACK: F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 351 | // send ack F:\MCP\projects\CAN\canBoot\Source\Main.c |
351 | // send ack F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 352 | 000212 0e05 MOVLW 0x5 outCm.funct = FUNCT_BOOTLOADER; F:\MCP\projects\CAN\canBoot\Source\Main.c |
352 | 000212 0e05 MOVLW 0x5 outCm.funct = FUNCT_BOOTLOADER; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 353 | 000214 6adb CLRF 0xdb,0x0 |
353 | 000214 6adb CLRF 0xdb,0x0 |
| Line 375... | Line 375... | ||
| 375 | 000240 0e0c MOVLW 0xc outCm.remote_request = FALSE; F:\MCP\projects\CAN\canBoot\Source\Main.c |
375 | 000240 0e0c MOVLW 0xc outCm.remote_request = FALSE; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 376 | 000242 6adb CLRF 0xdb,0x0 |
376 | 000242 6adb CLRF 0xdb,0x0 |
| 377 | 000244 0e11 MOVLW 0x11 outCm.data[ERR_INDEX] = errMsg; F:\MCP\projects\CAN\canBoot\Source\Main.c |
377 | 000244 0e11 MOVLW 0x11 outCm.data[ERR_INDEX] = errMsg; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 378 | 000246 c0c5 MOVFF 0xc5,0xfdb |
378 | 000246 c0c5 MOVFF 0xc5,0xfdb |
| 379 | 000248 ffdb |
379 | 000248 ffdb |
| 380 | 00024a |
380 | 00024a ec7b CALL 0xaf6,0x0 t = tickGet(); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 381 | 00024c f005 |
381 | 00024c f005 |
| 382 | 00024e c010 MOVFF 0x10,0xbf |
382 | 00024e c010 MOVFF 0x10,0xbf |
| 383 | 000250 f0bf |
383 | 000250 f0bf |
| 384 | 000252 c011 MOVFF 0x11,0xc0 |
384 | 000252 c011 MOVFF 0x11,0xc0 |
| 385 | 000254 f0c0 |
385 | 000254 f0c0 |
| Line 427... | Line 427... | ||
| 427 | 0002a6 ffe6 |
427 | 0002a6 ffe6 |
| 428 | 0002a8 cfee MOVFF 0xfee,0xfe6 |
428 | 0002a8 cfee MOVFF 0xfee,0xfe6 |
| 429 | 0002aa ffe6 |
429 | 0002aa ffe6 |
| 430 | 0002ac cfee MOVFF 0xfee,0xfe6 |
430 | 0002ac cfee MOVFF 0xfee,0xfe6 |
| 431 | 0002ae ffe6 |
431 | 0002ae ffe6 |
| 432 | 0002b0 |
432 | 0002b0 db47 RCALL 0x940 |
| 433 | 0002b2 6e00 MOVWF 0x0,0x0 |
433 | 0002b2 6e00 MOVWF 0x0,0x0 |
| 434 | 0002b4 0e11 MOVLW 0x11 |
434 | 0002b4 0e11 MOVLW 0x11 |
| 435 | 0002b6 5ee1 SUBWF 0xe1,0x1,0x0 |
435 | 0002b6 5ee1 SUBWF 0xe1,0x1,0x0 |
| 436 | 0002b8 5000 MOVF 0x0,0x0,0x0 |
436 | 0002b8 5000 MOVF 0x0,0x0,0x0 |
| 437 | 0002ba 0900 IORLW 0x0 |
437 | 0002ba 0900 IORLW 0x0 |
| 438 | 0002bc e101 BNZ 0x2c0 |
438 | 0002bc e101 BNZ 0x2c0 |
| 439 | 0002be d7d1 BRA 0x262 |
439 | 0002be d7d1 BRA 0x262 |
| 440 | 0002c0 |
440 | 0002c0 d245 BRA 0x74c break; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 441 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
441 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 442 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
442 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 443 | case pgsWAIT_FIRST_PGM_PACKET: F:\MCP\projects\CAN\canBoot\Source\Main.c |
443 | case pgsWAIT_FIRST_PGM_PACKET: F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 444 | // wait for first pgm packet. F:\MCP\projects\CAN\canBoot\Source\Main.c |
444 | // wait for first pgm packet. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 445 | 0002c2 |
445 | 0002c2 ec7b CALL 0xaf6,0x0 if ((tickGet()-t)>PACKET_TIMEOUT) F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 446 | 0002c4 f005 |
446 | 0002c4 f005 |
| 447 | 0002c6 0100 MOVLB 0x0 |
447 | 0002c6 0100 MOVLB 0x0 |
| 448 | 0002c8 51bf MOVF 0xbf,0x0,0x1 |
448 | 0002c8 51bf MOVF 0xbf,0x0,0x1 |
| 449 | 0002ca 5c10 SUBWF 0x10,0x0,0x0 |
449 | 0002ca 5c10 SUBWF 0x10,0x0,0x0 |
| 450 | 0002cc 6e00 MOVWF 0x0,0x0 |
450 | 0002cc 6e00 MOVWF 0x0,0x0 |
| Line 619... | Line 619... | ||
| 619 | 00040c 0e03 MOVLW 0x3 |
619 | 00040c 0e03 MOVLW 0x3 |
| 620 | 00040e 6fbe MOVWF 0xbe,0x1 |
620 | 00040e 6fbe MOVWF 0xbe,0x1 |
| 621 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
621 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 622 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
622 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 623 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
623 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 624 | 000410 |
624 | 000410 d19d BRA 0x74c break; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 625 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
625 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 626 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
626 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 627 | case pgsWAIT_PGM_PACKET: F:\MCP\projects\CAN\canBoot\Source\Main.c |
627 | case pgsWAIT_PGM_PACKET: F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 628 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
628 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 629 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
629 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| Line 891... | Line 891... | ||
| 891 | 0005e0 6fc6 MOVWF 0xc6,0x1 |
891 | 0005e0 6fc6 MOVWF 0xc6,0x1 |
| 892 | // TODO! Send ack more than once.. F:\MCP\projects\CAN\canBoot\Source\Main.c |
892 | // TODO! Send ack more than once.. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 893 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
893 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 894 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
894 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 895 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
895 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 896 | 0005e2 |
896 | 0005e2 d0b4 BRA 0x74c break; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 897 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
897 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 898 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
898 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 899 | case pgsWRITE_PROGRAM: F:\MCP\projects\CAN\canBoot\Source\Main.c |
899 | case pgsWRITE_PROGRAM: F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 900 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
900 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 901 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
901 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 902 | // Write program and send ack. F:\MCP\projects\CAN\canBoot\Source\Main.c |
902 | // Write program and send ack. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 903 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
903 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 904 | // |
904 | // Check addr limit F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 905 | 0005e4 |
905 | 0005e4 0e00 MOVLW 0x0 if (pgmAddress<RM_RESET_VECTOR) F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 906 | 0005e6 |
906 | 0005e6 0100 MOVLB 0x0 |
| 907 | 0005e8 |
907 | 0005e8 5dc7 SUBWF 0xc7,0x0,0x1 |
| 908 | 0005ea |
908 | 0005ea 0e10 MOVLW 0x10 |
| 909 | 0005ec |
909 | 0005ec 59c8 SUBWFB 0xc8,0x0,0x1 |
| 910 | 0005ee |
910 | 0005ee 0e00 MOVLW 0x0 |
| 911 | 0005f0 |
911 | 0005f0 59c9 SUBWFB 0xc9,0x0,0x1 |
| 912 | 0005f2 f003 |
- | |
| 913 | 0005f4 6a00 CLRF 0x0,0x0 |
- | |
| 914 | 0005f6 6a01 CLRF 0x1,0x0 |
- | |
| 915 | 0005f8 6a03 CLRF 0x3,0x0 |
- | |
| 916 |
|
912 | 0005f2 0e00 MOVLW 0x0 |
| 917 |
|
913 | 0005f4 59ca SUBWFB 0xca,0x0,0x1 |
| 918 | 0005fe 3203 RRCF 0x3,0x1,0x0 |
- | |
| 919 | 000600 3202 RRCF 0x2,0x1,0x0 |
- | |
| 920 | 000602 3201 RRCF 0x1,0x1,0x0 |
- | |
| 921 | 000604 3200 RRCF 0x0,0x1,0x0 |
- | |
| 922 | 000606 06e8 DECF 0xe8,0x1,0x0 |
- | |
| 923 |
|
914 | 0005f6 e206 BC 0x604 |
| 924 | 00060a 5000 MOVF 0x0,0x0,0x0 |
- | |
| 925 |
|
915 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 926 |
|
916 | 0005f8 0100 MOVLB 0x0 errMsg = ERR_ERROR; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 927 |
|
917 | 0005fa 0e01 MOVLW 0x1 |
| 928 |
|
918 | 0005fc 6fc5 MOVWF 0xc5,0x1 |
| 929 | 000614 f001 |
- | |
| 930 | 000616 c0c9 MOVFF 0xc9,0x2 |
- | |
| 931 | 000618 f002 |
- | |
| 932 | 00061a c0ca MOVFF 0xca,0x3 |
- | |
| 933 | 00061c f003 |
- | |
| 934 |
|
919 | 0005fe 0100 MOVLB 0x0 pgs = pgsSEND_ACK; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 935 | 000620 6a02 CLRF 0x2,0x0 |
- | |
| 936 | 000622 6a03 CLRF 0x3,0x0 |
- | |
| 937 |
|
920 | 000600 0e01 MOVLW 0x1 |
| 938 | 000626 90d8 BCF 0xd8,0x0,0x0 |
- | |
| 939 | 000628 3203 RRCF 0x3,0x1,0x0 |
- | |
| 940 | 00062a 3202 RRCF 0x2,0x1,0x0 |
- | |
| 941 | 00062c 3201 RRCF 0x1,0x1,0x0 |
- | |
| 942 | 00062e 3200 RRCF 0x0,0x1,0x0 |
- | |
| 943 | 000630 06e8 DECF 0xe8,0x1,0x0 |
- | |
| 944 | 000632 e1f9 BNZ 0x626 |
- | |
| 945 | 000634 5000 MOVF 0x0,0x0,0x0 |
- | |
| 946 |
|
921 | 000602 6fbe MOVWF 0xbe,0x1 |
| 947 |
|
922 | //Not allowed to write here! F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 948 |
|
923 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 949 |
|
924 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 950 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
925 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| - | 926 | //Load Table pointer registers with base address to erase. F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 927 | 000604 c0c7 MOVFF 0xc7,0x0 TBLPTRU = (BYTE)((pgmAddress & 0xFF0000)>>16); F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 928 | 000606 f000 |
|
| - | 929 | 000608 c0c8 MOVFF 0xc8,0x1 |
|
| - | 930 | 00060a f001 |
|
| - | 931 | 00060c c0c9 MOVFF 0xc9,0x2 |
|
| - | 932 | 00060e f002 |
|
| - | 933 | 000610 c0ca MOVFF 0xca,0x3 |
|
| - | 934 | 000612 f003 |
|
| - | 935 | 000614 6a00 CLRF 0x0,0x0 |
|
| - | 936 | 000616 6a01 CLRF 0x1,0x0 |
|
| - | 937 | 000618 6a03 CLRF 0x3,0x0 |
|
| - | 938 | 00061a 0e10 MOVLW 0x10 |
|
| - | 939 | 00061c 90d8 BCF 0xd8,0x0,0x0 |
|
| - | 940 | 00061e 3203 RRCF 0x3,0x1,0x0 |
|
| - | 941 | 000620 3202 RRCF 0x2,0x1,0x0 |
|
| - | 942 | 000622 3201 RRCF 0x1,0x1,0x0 |
|
| - | 943 | 000624 3200 RRCF 0x0,0x1,0x0 |
|
| - | 944 | 000626 06e8 DECF 0xe8,0x1,0x0 |
|
| - | 945 | 000628 e1f9 BNZ 0x61c |
|
| - | 946 | 00062a 5000 MOVF 0x0,0x0,0x0 |
|
| - | 947 | 00062c 6ef8 MOVWF 0xf8,0x0 |
|
| - | 948 | 00062e c0c7 MOVFF 0xc7,0x0 TBLPTRH = (BYTE)((pgmAddress & 0xFF00)>>8); F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 949 | 000630 f000 |
|
| - | 950 | 000632 c0c8 MOVFF 0xc8,0x1 |
|
| - | 951 | 000634 f001 |
|
| - | 952 | 000636 c0c9 MOVFF 0xc9,0x2 |
|
| - | 953 | 000638 f002 |
|
| - | 954 | 00063a c0ca MOVFF 0xca,0x3 |
|
| - | 955 | 00063c f003 |
|
| - | 956 | 00063e 6a00 CLRF 0x0,0x0 |
|
| - | 957 | 000640 6a02 CLRF 0x2,0x0 |
|
| - | 958 | 000642 6a03 CLRF 0x3,0x0 |
|
| - | 959 | 000644 0e08 MOVLW 0x8 |
|
| - | 960 | 000646 90d8 BCF 0xd8,0x0,0x0 |
|
| - | 961 | 000648 3203 RRCF 0x3,0x1,0x0 |
|
| - | 962 | 00064a 3202 RRCF 0x2,0x1,0x0 |
|
| - | 963 | 00064c 3201 RRCF 0x1,0x1,0x0 |
|
| - | 964 | 00064e 3200 RRCF 0x0,0x1,0x0 |
|
| - | 965 | 000650 06e8 DECF 0xe8,0x1,0x0 |
|
| - | 966 | 000652 e1f9 BNZ 0x646 |
|
| - | 967 | 000654 5000 MOVF 0x0,0x0,0x0 |
|
| - | 968 | 000656 6ef7 MOVWF 0xf7,0x0 |
|
| - | 969 | 000658 0100 MOVLB 0x0 TBLPTRL = (BYTE)(pgmAddress & 0xFF); F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 970 | 00065a 51c7 MOVF 0xc7,0x0,0x1 |
|
| - | 971 | 00065c 6ef6 MOVWF 0xf6,0x0 |
|
| - | 972 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| 951 | // point to Flash program memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
973 | // point to Flash program memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 952 |
|
974 | 00065e 8ea6 BSF 0xa6,0x7,0x0 EECON1bits.EEPGD = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 953 | // access Flash program memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
975 | // access Flash program memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 954 |
|
976 | 000660 9ca6 BCF 0xa6,0x6,0x0 EECON1bits.CFGS = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 955 | // enable write to memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
977 | // enable write to memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 956 |
|
978 | 000662 84a6 BSF 0xa6,0x2,0x0 EECON1bits.WREN = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 957 | // enable Row Erase operation F:\MCP\projects\CAN\canBoot\Source\Main.c |
979 | // enable Row Erase operation F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 958 |
|
980 | 000664 88a6 BSF 0xa6,0x4,0x0 EECON1bits.FREE = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 959 | // disable interrupts F:\MCP\projects\CAN\canBoot\Source\Main.c |
981 | // disable interrupts F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 960 |
|
982 | 000666 9ef2 BCF 0xf2,0x7,0x0 INTCONbits.GIE = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 961 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
983 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 962 | // Do it! F:\MCP\projects\CAN\canBoot\Source\Main.c |
984 | // Do it! F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 963 |
|
985 | 000668 0e55 MOVLW 0x55 EECON2 = 0x55; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 964 |
|
986 | 00066a 6ea7 MOVWF 0xa7,0x0 |
| 965 |
|
987 | 00066c 0eaa MOVLW 0xaa EECON2 = 0xAA; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 966 |
|
988 | 00066e 6ea7 MOVWF 0xa7,0x0 |
| 967 |
|
989 | 000670 82a6 BSF 0xa6,0x1,0x0 EECON1bits.WR = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 968 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
990 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 969 | // enable interrupts F:\MCP\projects\CAN\canBoot\Source\Main.c |
991 | // enable interrupts F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 970 |
|
992 | 000672 8ef2 BSF 0xf2,0x7,0x0 INTCONbits.GIE = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 971 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
993 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 972 | //Load Table pointer registers with base address to program. F:\MCP\projects\CAN\canBoot\Source\Main.c |
994 | //Load Table pointer registers with base address to program. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 973 |
|
995 | 000674 c0c7 MOVFF 0xc7,0x0 TBLPTRU = (BYTE)((pgmAddress & 0xFF0000)>>16); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 974 |
|
996 | 000676 f000 |
| 975 |
|
997 | 000678 c0c8 MOVFF 0xc8,0x1 |
| 976 |
|
998 | 00067a f001 |
| 977 |
|
999 | 00067c c0c9 MOVFF 0xc9,0x2 |
| 978 |
|
1000 | 00067e f002 |
| 979 |
|
1001 | 000680 c0ca MOVFF 0xca,0x3 |
| 980 |
|
1002 | 000682 f003 |
| 981 |
|
1003 | 000684 6a00 CLRF 0x0,0x0 |
| 982 |
|
1004 | 000686 6a01 CLRF 0x1,0x0 |
| 983 |
|
1005 | 000688 6a03 CLRF 0x3,0x0 |
| 984 |
|
1006 | 00068a 0e10 MOVLW 0x10 |
| 985 |
|
1007 | 00068c 90d8 BCF 0xd8,0x0,0x0 |
| 986 |
|
1008 | 00068e 3203 RRCF 0x3,0x1,0x0 |
| 987 |
|
1009 | 000690 3202 RRCF 0x2,0x1,0x0 |
| 988 |
|
1010 | 000692 3201 RRCF 0x1,0x1,0x0 |
| 989 |
|
1011 | 000694 3200 RRCF 0x0,0x1,0x0 |
| 990 |
|
1012 | 000696 06e8 DECF 0xe8,0x1,0x0 |
| 991 |
|
1013 | 000698 e1f9 BNZ 0x68c |
| 992 |
|
1014 | 00069a 5000 MOVF 0x0,0x0,0x0 |
| 993 |
|
1015 | 00069c 6ef8 MOVWF 0xf8,0x0 |
| 994 |
|
1016 | 00069e c0c7 MOVFF 0xc7,0x0 TBLPTRH = (BYTE)((pgmAddress & 0xFF00)>>8); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 995 |
|
1017 | 0006a0 f000 |
| 996 |
|
1018 | 0006a2 c0c8 MOVFF 0xc8,0x1 |
| 997 |
|
1019 | 0006a4 f001 |
| 998 |
|
1020 | 0006a6 c0c9 MOVFF 0xc9,0x2 |
| 999 |
|
1021 | 0006a8 f002 |
| 1000 |
|
1022 | 0006aa c0ca MOVFF 0xca,0x3 |
| 1001 |
|
1023 | 0006ac f003 |
| 1002 |
|
1024 | 0006ae 6a00 CLRF 0x0,0x0 |
| 1003 |
|
1025 | 0006b0 6a02 CLRF 0x2,0x0 |
| 1004 |
|
1026 | 0006b2 6a03 CLRF 0x3,0x0 |
| 1005 |
|
1027 | 0006b4 0e08 MOVLW 0x8 |
| 1006 |
|
1028 | 0006b6 90d8 BCF 0xd8,0x0,0x0 |
| 1007 |
|
1029 | 0006b8 3203 RRCF 0x3,0x1,0x0 |
| 1008 |
|
1030 | 0006ba 3202 RRCF 0x2,0x1,0x0 |
| 1009 |
|
1031 | 0006bc 3201 RRCF 0x1,0x1,0x0 |
| 1010 |
|
1032 | 0006be 3200 RRCF 0x0,0x1,0x0 |
| 1011 |
|
1033 | 0006c0 06e8 DECF 0xe8,0x1,0x0 |
| 1012 |
|
1034 | 0006c2 e1f9 BNZ 0x6b6 |
| 1013 |
|
1035 | 0006c4 5000 MOVF 0x0,0x0,0x0 |
| 1014 |
|
1036 | 0006c6 6ef7 MOVWF 0xf7,0x0 |
| 1015 |
|
1037 | 0006c8 0100 MOVLB 0x0 TBLPTRL = (BYTE)(pgmAddress & 0xFF); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1016 |
|
1038 | 0006ca 51c7 MOVF 0xc7,0x0,0x1 |
| 1017 |
|
1039 | 0006cc 6ef6 MOVWF 0xf6,0x0 |
| 1018 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1040 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1019 | // Load bytes F:\MCP\projects\CAN\canBoot\Source\Main.c |
1041 | // Load bytes F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1020 |
|
1042 | 0006ce 0e04 MOVLW 0x4 for(i=0;i<63;i++) F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1021 |
|
1043 | 0006d0 6adb CLRF 0xdb,0x0 |
| 1022 |
|
1044 | 0006d2 0e3f MOVLW 0x3f |
| 1023 |
|
1045 | 0006d4 6ef3 MOVWF 0xf3,0x0 |
| 1024 | 0006b6 0e04 MOVLW 0x4 |
- | |
| 1025 | 0006b8 cfdb MOVFF 0xfdb,0xff4 |
- | |
| 1026 | 0006ba fff4 |
- | |
| 1027 | 0006bc 50f3 MOVF 0xf3,0x0,0x0 |
- | |
| 1028 | 0006be 5cf4 SUBWF 0xf4,0x0,0x0 |
- | |
| 1029 | 0006c0 e20d BC 0x6dc |
- | |
| 1030 | 0006d6 0e04 MOVLW 0x4 |
1046 | 0006d6 0e04 MOVLW 0x4 |
| - | 1047 | 0006d8 cfdb MOVFF 0xfdb,0xff4 |
|
| - | 1048 | 0006da fff4 |
|
| - | 1049 | 0006dc 50f3 MOVF 0xf3,0x0,0x0 |
|
| - | 1050 | 0006de 5cf4 SUBWF 0xf4,0x0,0x0 |
|
| - | 1051 | 0006e0 e20d BC 0x6fc |
|
| - | 1052 | 0006f6 0e04 MOVLW 0x4 |
|
| 1031 |
|
1053 | 0006f8 2adb INCF 0xdb,0x1,0x0 |
| 1032 |
|
1054 | 0006fa d7eb BRA 0x6d2 |
| 1033 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
1055 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1034 |
|
1056 | 0006e2 0e04 MOVLW 0x4 TABLAT=pgmData[i]; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1035 |
|
1057 | 0006e4 50db MOVF 0xdb,0x0,0x0 |
| 1036 |
|
1058 | 0006e6 6aea CLRF 0xea,0x0 |
| 1037 |
|
1059 | 0006e8 0f70 ADDLW 0x70 |
| 1038 |
|
1060 | 0006ea 6ee9 MOVWF 0xe9,0x0 |
| 1039 |
|
1061 | 0006ec 0e00 MOVLW 0x0 |
| 1040 |
|
1062 | 0006ee 22ea ADDWFC 0xea,0x1,0x0 |
| 1041 |
|
1063 | 0006f0 50ef MOVF 0xef,0x0,0x0 |
| 1042 |
|
1064 | 0006f2 6ef5 MOVWF 0xf5,0x0 |
| 1043 |
|
1065 | 0006f4 d9fe RCALL 0xaf2 TBLWTPOSTINC_Func(); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1044 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
1066 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1045 |
|
1067 | 0006fc c0af MOVFF 0xaf,0xff5 TABLAT=pgmData[63]; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1046 |
|
1068 | 0006fe fff5 |
| 1047 |
|
1069 | 000700 d9f6 RCALL 0xaee TBLWT_Func(); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1048 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1070 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1049 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1071 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1050 | // point to Flash program memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
1072 | // point to Flash program memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1051 |
|
1073 | 000702 8ea6 BSF 0xa6,0x7,0x0 EECON1bits.EEPGD = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1052 | // access Flash program memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
1074 | // access Flash program memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1053 |
|
1075 | 000704 9ca6 BCF 0xa6,0x6,0x0 EECON1bits.CFGS = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1054 | // enable write to memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
1076 | // enable write to memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1055 |
|
1077 | 000706 84a6 BSF 0xa6,0x2,0x0 EECON1bits.WREN = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1056 | // disable interrupts F:\MCP\projects\CAN\canBoot\Source\Main.c |
1078 | // disable interrupts F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1057 |
|
1079 | 000708 9ef2 BCF 0xf2,0x7,0x0 INTCONbits.GIE = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1058 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1080 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1059 | // Do it! F:\MCP\projects\CAN\canBoot\Source\Main.c |
1081 | // Do it! F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1060 |
|
1082 | 00070a 0e55 MOVLW 0x55 EECON2 = 0x55; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1061 |
|
1083 | 00070c 6ea7 MOVWF 0xa7,0x0 |
| 1062 |
|
1084 | 00070e 0eaa MOVLW 0xaa EECON2 = 0xAA; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1063 |
|
1085 | 000710 6ea7 MOVWF 0xa7,0x0 |
| 1064 |
|
1086 | 000712 82a6 BSF 0xa6,0x1,0x0 EECON1bits.WR = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1065 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1087 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1066 | // enable interrupts F:\MCP\projects\CAN\canBoot\Source\Main.c |
1088 | // enable interrupts F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1067 |
|
1089 | 000714 8ef2 BSF 0xf2,0x7,0x0 INTCONbits.GIE = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1068 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1090 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1069 | // disable write to memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
1091 | // disable write to memory F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1070 |
|
1092 | 000716 94a6 BCF 0xa6,0x2,0x0 EECON1bits.WREN = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1071 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1093 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1072 |
|
1094 | 000718 0e40 MOVLW 0x40 pgmAddress += 64; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1073 |
|
1095 | 00071a 0100 MOVLB 0x0 |
| 1074 |
|
1096 | 00071c 27c7 ADDWF 0xc7,0x1,0x1 |
| 1075 |
|
1097 | 00071e 0e00 MOVLW 0x0 |
| 1076 |
|
1098 | 000720 0100 MOVLB 0x0 |
| 1077 |
|
1099 | 000722 23c8 ADDWFC 0xc8,0x1,0x1 |
| 1078 |
|
1100 | 000724 0e00 MOVLW 0x0 |
| 1079 |
|
1101 | 000726 0100 MOVLB 0x0 |
| 1080 |
|
1102 | 000728 23c9 ADDWFC 0xc9,0x1,0x1 |
| 1081 |
|
1103 | 00072a 0e00 MOVLW 0x0 |
| 1082 |
|
1104 | 00072c 0100 MOVLB 0x0 |
| 1083 |
|
1105 | 00072e 23ca ADDWFC 0xca,0x1,0x1 |
| 1084 |
|
1106 | 000730 0100 MOVLB 0x0 bytesReceived = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1085 |
|
1107 | 000732 6bcb CLRF 0xcb,0x1 |
| 1086 |
|
1108 | 000734 0100 MOVLB 0x0 errMsg = ERR_NO_ERROR; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1087 |
|
1109 | 000736 6bc5 CLRF 0xc5,0x1 |
| 1088 |
|
1110 | 000738 0100 MOVLB 0x0 pgs = pgsSEND_ACK; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1089 |
|
1111 | 00073a 0e01 MOVLW 0x1 |
| 1090 |
|
1112 | 00073c 6fbe MOVWF 0xbe,0x1 |
| 1091 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1113 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1092 |
|
1114 | 00073e d006 BRA 0x74c break; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1093 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1115 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1094 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1116 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1095 | case pgsDONE: F:\MCP\projects\CAN\canBoot\Source\Main.c |
1117 | case pgsDONE: F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1096 |
|
1118 | 000740 ef00 GOTO 0x1000 _asm goto RM_RESET_VECTOR _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1097 |
|
1119 | 000742 f008 |
| 1098 |
|
1120 | 000744 d003 BRA 0x74c break; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1099 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1121 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1100 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1122 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1101 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1123 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1102 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1124 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1103 | default: F:\MCP\projects\CAN\canBoot\Source\Main.c |
1125 | default: F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1104 |
|
1126 | 000746 0100 MOVLB 0x0 pgs = pgsWATING_START; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1105 |
|
1127 | 000748 6bbe CLRF 0xbe,0x1 |
| 1106 |
|
1128 | 00074a d000 BRA 0x74c break; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| - | 1129 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 1130 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 1131 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| 1107 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
1132 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1108 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
- | |
| 1109 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
- | |
| 1110 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
- | |
| 1111 |
|
1133 | 00074e 0e18 MOVLW 0x18 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1112 |
|
1134 | 000750 5ce1 SUBWF 0xe1,0x0,0x0 |
| 1113 |
|
1135 | 000752 e202 BC 0x758 |
| 1114 |
|
1136 | 000754 6ae1 CLRF 0xe1,0x0 |
| 1115 |
|
1137 | 000756 52e5 MOVF 0xe5,0x1,0x0 |
| 1116 |
|
1138 | 000758 6ee1 MOVWF 0xe1,0x0 |
| 1117 |
|
1139 | 00075a 52e5 MOVF 0xe5,0x1,0x0 |
| 1118 |
|
1140 | 00075c cfe7 MOVFF 0xfe7,0xfd9 |
| 1119 |
|
1141 | 00075e ffd9 |
| 1120 |
|
1142 | 000760 0012 RETURN 0x0 |
| 1121 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1143 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1122 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1144 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1123 | /* F:\MCP\projects\CAN\canBoot\Source\Main.c |
1145 | /* F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1124 | * Function: mainInit F:\MCP\projects\CAN\canBoot\Source\Main.c |
1146 | * Function: mainInit F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1125 | * F:\MCP\projects\CAN\canBoot\Source\Main.c |
1147 | * F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1126 | * Input: none F:\MCP\projects\CAN\canBoot\Source\Main.c |
1148 | * Input: none F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1127 | * Output: none F:\MCP\projects\CAN\canBoot\Source\Main.c |
1149 | * Output: none F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1128 | * Pre-conditions: none F:\MCP\projects\CAN\canBoot\Source\Main.c |
1150 | * Pre-conditions: none F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1129 | * Affects: Se code F:\MCP\projects\CAN\canBoot\Source\Main.c |
1151 | * Affects: Se code F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1130 | * Depends: none. F:\MCP\projects\CAN\canBoot\Source\Main.c |
1152 | * Depends: none. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1131 | */ F:\MCP\projects\CAN\canBoot\Source\Main.c |
1153 | */ F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1132 | void mainInit() F:\MCP\projects\CAN\canBoot\Source\Main.c |
1154 | void mainInit() F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1133 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
1155 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1134 |
|
1156 | 000762 9294 BCF 0x94,0x1,0x0 LED0_TRIS=0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1135 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1157 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1136 | // Enable internal PORTB pull-ups F:\MCP\projects\CAN\canBoot\Source\Main.c |
1158 | // Enable internal PORTB pull-ups F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1137 |
|
1159 | 000764 9ef1 BCF 0xf1,0x7,0x0 INTCON2bits.RBPU = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1138 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1160 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1139 | // Enable Interrupts F:\MCP\projects\CAN\canBoot\Source\Main.c |
1161 | // Enable Interrupts F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1140 |
|
1162 | 000766 8ef2 BSF 0xf2,0x7,0x0 INTCONbits.GIEH = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1141 |
|
1163 | 000768 8cf2 BSF 0xf2,0x6,0x0 INTCONbits.GIEL = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1142 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1164 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1143 | // Enable interrupt prirority F:\MCP\projects\CAN\canBoot\Source\Main.c |
1165 | // Enable interrupt prirority F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1144 |
|
1166 | 00076a 8ed0 BSF 0xd0,0x7,0x0 RCONbits.IPEN=1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1145 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1167 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1146 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1168 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1147 |
|
1169 | 00076c 0012 RETURN 0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1148 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1170 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1149 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1171 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1150 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1172 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1151 | /// CAN------------------------------------------------------- F:\MCP\projects\CAN\canBoot\Source\Main.c |
1173 | /// CAN------------------------------------------------------- F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1152 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1174 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| Line 1163... | Line 1185... | ||
| 1163 | * Affects: Changes can registers. F:\MCP\projects\CAN\canBoot\Source\Main.c |
1185 | * Affects: Changes can registers. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1164 | * Depends: none. F:\MCP\projects\CAN\canBoot\Source\Main.c |
1186 | * Depends: none. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1165 | */ F:\MCP\projects\CAN\canBoot\Source\Main.c |
1187 | */ F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1166 | void canInit() F:\MCP\projects\CAN\canBoot\Source\Main.c |
1188 | void canInit() F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1167 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
1189 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1168 |
|
1190 | 00076e 0e80 MOVLW 0x80 CANCON = 0x80; //request config mode F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1169 |
|
1191 | 000770 6e6f MOVWF 0x6f,0x0 |
| 1170 |
|
1192 | 000772 0ee0 MOVLW 0xe0 while ((CANSTAT & 0xE0) != 0x80 ); //wait for config mode request F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1171 |
|
1193 | 000774 146e ANDWF 0x6e,0x0,0x0 |
| 1172 |
|
1194 | 000776 0880 SUBLW 0x80 |
| 1173 |
|
1195 | 000778 e001 BZ 0x77c |
| 1174 |
|
1196 | 00077a d7fb BRA 0x772 |
| 1175 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1197 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1176 | // BAUD AND TQS F:\MCP\projects\CAN\canBoot\Source\Main.c |
1198 | // BAUD AND TQS F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1177 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1199 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1178 |
|
1200 | 00077c 6a70 CLRF 0x70,0x0 BRGCON1=0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1179 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1201 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1180 | // Sync_Seq = 2 x TQ = 1 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1202 | // Sync_Seq = 2 x TQ = 1 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1181 |
|
1203 | 00077e 9e70 BCF 0x70,0x7,0x0 BRGCON1bits.SJW1=0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1182 |
|
1204 | 000780 8c70 BSF 0x70,0x6,0x0 BRGCON1bits.SJW0=1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1183 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1205 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1184 | // Setting BRP. F:\MCP\projects\CAN\canBoot\Source\Main.c |
1206 | // Setting BRP. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1185 |
|
1207 | 000782 0e04 MOVLW 0x4 BRGCON1=BRGCON1|CAN_BRP; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1186 |
|
1208 | 000784 1070 IORWF 0x70,0x0,0x0 |
| 1187 |
|
1209 | 000786 6e70 MOVWF 0x70,0x0 |
| 1188 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1210 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1189 | // Maximum PHEG1 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1211 | // Maximum PHEG1 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1190 |
|
1212 | 000788 8e71 BSF 0x71,0x7,0x0 BRGCON2bits.SEG2PHTS = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1191 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1213 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1192 | // Phase_Seg1 = 2 x TQ = 1 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1214 | // Phase_Seg1 = 2 x TQ = 1 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1193 |
|
1215 | 00078a 9a71 BCF 0x71,0x5,0x0 BRGCON2bits.SEG1PH2 = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1194 |
|
1216 | 00078c 9871 BCF 0x71,0x4,0x0 BRGCON2bits.SEG1PH1 = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1195 |
|
1217 | 00078e 8671 BSF 0x71,0x3,0x0 BRGCON2bits.SEG1PH0 = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1196 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1218 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1197 | // Prop_Seq = 2 x TQ = 1 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1219 | // Prop_Seq = 2 x TQ = 1 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1198 |
|
1220 | 000790 9471 BCF 0x71,0x2,0x0 BRGCON2bits.PRSEG2 = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1199 |
|
1221 | 000792 9271 BCF 0x71,0x1,0x0 BRGCON2bits.PRSEG1 = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1200 |
|
1222 | 000794 8071 BSF 0x71,0x0,0x0 BRGCON2bits.PRSEG0 = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1201 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1223 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1202 | // Enableing bus wake-up F:\MCP\projects\CAN\canBoot\Source\Main.c |
1224 | // Enableing bus wake-up F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1203 |
|
1225 | 000796 9e72 BCF 0x72,0x7,0x0 BRGCON3bits.WAKDIS = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1204 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1226 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1205 | // Dont use filter when wakeup F:\MCP\projects\CAN\canBoot\Source\Main.c |
1227 | // Dont use filter when wakeup F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1206 |
|
1228 | 000798 9c72 BCF 0x72,0x6,0x0 BRGCON3bits.WAKFIL = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1207 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1229 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1208 | // Phase_Seg2 = 2 x TQ = 1 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1230 | // Phase_Seg2 = 2 x TQ = 1 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1209 |
|
1231 | 00079a 9472 BCF 0x72,0x2,0x0 BRGCON3bits.SEG2PH2 = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1210 |
|
1232 | 00079c 9272 BCF 0x72,0x1,0x0 BRGCON3bits.SEG2PH1 = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1211 |
|
1233 | 00079e 8072 BSF 0x72,0x0,0x0 BRGCON3bits.SEG2PH0 = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1212 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1234 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1213 |
|
1235 | 0007a0 6a77 CLRF 0x77,0x0 ECANCON=0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1214 |
|
1236 | 0007a2 9e77 BCF 0x77,0x7,0x0 ECANCONbits.MDSEL1 = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1215 |
|
1237 | 0007a4 8c77 BSF 0x77,0x6,0x0 ECANCONbits.MDSEL0 = 1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1216 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1238 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1217 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1239 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1218 | // FILTERS AND MASKS F:\MCP\projects\CAN\canBoot\Source\Main.c |
1240 | // FILTERS AND MASKS F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1219 |
|
1241 | 0007a6 8c60 BSF 0x60,0x6,0x0 RXB0CONbits.RXM1=1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1220 |
|
1242 | 0007a8 9a60 BCF 0x60,0x5,0x0 RXB0CONbits.RXM0=0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1221 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1243 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1222 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1244 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1223 | // INTERRUPTS F:\MCP\projects\CAN\canBoot\Source\Main.c |
1245 | // INTERRUPTS F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1224 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1246 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1225 | // Diable transmit interrupt F:\MCP\projects\CAN\canBoot\Source\Main.c |
1247 | // Diable transmit interrupt F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1226 |
|
1248 | 0007aa 010d MOVLB 0xd TXBIE = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1227 |
|
1249 | 0007ac 6bfc CLRF 0xfc,0x1 |
| 1228 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1250 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1229 | //rx no interrupt F:\MCP\projects\CAN\canBoot\Source\Main.c |
1251 | //rx no interrupt F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1230 |
|
1252 | 0007ae 6aa4 CLRF 0xa4,0x0 PIR3 = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1231 |
|
1253 | 0007b0 6aa3 CLRF 0xa3,0x0 PIE3 = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1232 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1254 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1233 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1255 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1234 | // Programmable no buffers interrupt F:\MCP\projects\CAN\canBoot\Source\Main.c |
1256 | // Programmable no buffers interrupt F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1235 |
|
1257 | 0007b2 6bfa CLRF 0xfa,0x1 BIE0 = 0x00; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1236 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1258 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1237 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1259 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1238 | //loopback mode or not F:\MCP\projects\CAN\canBoot\Source\Main.c |
1260 | //loopback mode or not F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1239 | #ifdef CAN_LOOPBACK_MODE F:\MCP\projects\CAN\canBoot\Source\Main.c |
1261 | #ifdef CAN_LOOPBACK_MODE F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1240 | CANCON = 0x40;//request loopback mode F:\MCP\projects\CAN\canBoot\Source\Main.c |
1262 | CANCON = 0x40;//request loopback mode F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1241 | while ((CANSTAT & 0xE0) != 0x40 );//wait for loopback mode F:\MCP\projects\CAN\canBoot\Source\Main.c |
1263 | while ((CANSTAT & 0xE0) != 0x40 );//wait for loopback mode F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1242 | #else F:\MCP\projects\CAN\canBoot\Source\Main.c |
1264 | #else F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1243 |
|
1265 | 0007b4 6a6f CLRF 0x6f,0x0 CANCON = 0x00;//request normal mode F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1244 |
|
1266 | 0007b6 0ee0 MOVLW 0xe0 while ((CANSTAT & 0xE0) != 0x00 );//wait for normal mode F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1245 |
|
1267 | 0007b8 146e ANDWF 0x6e,0x0,0x0 |
| 1246 |
|
1268 | 0007ba e001 BZ 0x7be |
| 1247 |
|
1269 | 0007bc d7fc BRA 0x7b6 |
| 1248 | #endif F:\MCP\projects\CAN\canBoot\Source\Main.c |
1270 | #endif F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1249 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1271 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1250 |
|
1272 | 0007be 0012 RETURN 0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1251 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1273 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1252 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1274 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1253 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1275 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1254 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1276 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1255 | /* F:\MCP\projects\CAN\canBoot\Source\Main.c |
1277 | /* F:\MCP\projects\CAN\canBoot\Source\Main.c |
| Line 1263... | Line 1285... | ||
| 1263 | */ F:\MCP\projects\CAN\canBoot\Source\Main.c |
1285 | */ F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1264 | BOOL canGetPacket() F:\MCP\projects\CAN\canBoot\Source\Main.c |
1286 | BOOL canGetPacket() F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1265 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
1287 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1266 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1288 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1267 | // Get which buffer that is ful. F:\MCP\projects\CAN\canBoot\Source\Main.c |
1289 | // Get which buffer that is ful. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1268 |
|
1290 | 0007c0 ae60 BTFSS 0x60,0x7,0x0 if (RXB0CONbits.RXFUL) { ECANCON=(ECANCON&0b00000)|0b10000; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1269 | 0007a2 d005 BRA 0x7ae |
- | |
| 1270 | 0007a4 0e00 MOVLW 0x0 |
- | |
| 1271 | 0007a6 1477 ANDWF 0x77,0x0,0x0 |
- | |
| 1272 | 0007a8 0910 IORLW 0x10 |
- | |
| 1273 | 0007aa 6e77 MOVWF 0x77,0x0 |
- | |
| 1274 | 0007ac d035 BRA 0x818 else if (RXB1CONbits.RXFUL) { ECANCON=(ECANCON&0b00000)|0b10001; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
- | |
| 1275 | 0007ae 010f MOVLB 0xf |
- | |
| 1276 | 0007b0 af50 BTFSS 0x50,0x7,0x1 |
- | |
| 1277 | 0007b2 d005 BRA 0x7be |
- | |
| 1278 | 0007b4 0e00 MOVLW 0x0 |
- | |
| 1279 | 0007b6 1477 ANDWF 0x77,0x0,0x0 |
- | |
| 1280 | 0007b8 0911 IORLW 0x11 |
- | |
| 1281 | 0007ba 6e77 MOVWF 0x77,0x0 |
- | |
| 1282 | 0007bc d02d BRA 0x818 else if (B0CONbits.RXFUL) { ECANCON=(ECANCON&0b00000)|0b10010; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
- | |
| 1283 | 0007be 010e MOVLB 0xe |
- | |
| 1284 | 0007c0 af20 BTFSS 0x20,0x7,0x1 |
- | |
| 1285 | 0007c2 d005 BRA 0x7ce |
1291 | 0007c2 d005 BRA 0x7ce |
| 1286 | 0007c4 0e00 MOVLW 0x0 |
1292 | 0007c4 0e00 MOVLW 0x0 |
| 1287 | 0007c6 1477 ANDWF 0x77,0x0,0x0 |
1293 | 0007c6 1477 ANDWF 0x77,0x0,0x0 |
| 1288 | 0007c8 |
1294 | 0007c8 0910 IORLW 0x10 |
| 1289 | 0007ca 6e77 MOVWF 0x77,0x0 |
1295 | 0007ca 6e77 MOVWF 0x77,0x0 |
| - | 1296 | 0007cc d035 BRA 0x838 else if (RXB1CONbits.RXFUL) { ECANCON=(ECANCON&0b00000)|0b10001; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 1297 | 0007ce 010f MOVLB 0xf |
|
| - | 1298 | 0007d0 af50 BTFSS 0x50,0x7,0x1 |
|
| - | 1299 | 0007d2 d005 BRA 0x7de |
|
| - | 1300 | 0007d4 0e00 MOVLW 0x0 |
|
| - | 1301 | 0007d6 1477 ANDWF 0x77,0x0,0x0 |
|
| - | 1302 | 0007d8 0911 IORLW 0x11 |
|
| - | 1303 | 0007da 6e77 MOVWF 0x77,0x0 |
|
| - | 1304 | 0007dc d02d BRA 0x838 else if (B0CONbits.RXFUL) { ECANCON=(ECANCON&0b00000)|0b10010; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 1305 | 0007de 010e MOVLB 0xe |
|
| - | 1306 | 0007e0 af20 BTFSS 0x20,0x7,0x1 |
|
| - | 1307 | 0007e2 d005 BRA 0x7ee |
|
| - | 1308 | 0007e4 0e00 MOVLW 0x0 |
|
| - | 1309 | 0007e6 1477 ANDWF 0x77,0x0,0x0 |
|
| - | 1310 | 0007e8 0912 IORLW 0x12 |
|
| - | 1311 | 0007ea 6e77 MOVWF 0x77,0x0 |
|
| 1290 |
|
1312 | 0007ec d025 BRA 0x838 else if (B1CONbits.RXFUL) { ECANCON=(ECANCON&0b00000)|0b10011; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1291 |
|
1313 | 0007ee af30 BTFSS 0x30,0x7,0x1 |
| 1292 |
|
1314 | 0007f0 d005 BRA 0x7fc |
| 1293 |
|
1315 | 0007f2 0e00 MOVLW 0x0 |
| 1294 |
|
1316 | 0007f4 1477 ANDWF 0x77,0x0,0x0 |
| 1295 |
|
1317 | 0007f6 0913 IORLW 0x13 |
| 1296 |
|
1318 | 0007f8 6e77 MOVWF 0x77,0x0 |
| 1297 |
|
1319 | 0007fa d01e BRA 0x838 else if (B2CONbits.RXFUL) { ECANCON=(ECANCON&0b00000)|0b10100; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1298 |
|
1320 | 0007fc af40 BTFSS 0x40,0x7,0x1 |
| 1299 |
|
1321 | 0007fe d005 BRA 0x80a |
| 1300 |
|
1322 | 000800 0e00 MOVLW 0x0 |
| 1301 |
|
1323 | 000802 1477 ANDWF 0x77,0x0,0x0 |
| 1302 |
|
1324 | 000804 0914 IORLW 0x14 |
| 1303 |
|
1325 | 000806 6e77 MOVWF 0x77,0x0 |
| 1304 |
|
1326 | 000808 d017 BRA 0x838 else if (B3CONbits.RXFUL) { ECANCON=(ECANCON&0b00000)|0b10101; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1305 |
|
1327 | 00080a af50 BTFSS 0x50,0x7,0x1 |
| 1306 |
|
1328 | 00080c d005 BRA 0x818 |
| 1307 |
|
1329 | 00080e 0e00 MOVLW 0x0 |
| 1308 |
|
1330 | 000810 1477 ANDWF 0x77,0x0,0x0 |
| 1309 |
|
1331 | 000812 0915 IORLW 0x15 |
| 1310 |
|
1332 | 000814 6e77 MOVWF 0x77,0x0 |
| 1311 |
|
1333 | 000816 d010 BRA 0x838 else if (B4CONbits.RXFUL) { ECANCON=(ECANCON&0b00000)|0b10110; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1312 |
|
1334 | 000818 af60 BTFSS 0x60,0x7,0x1 |
| 1313 |
|
1335 | 00081a d005 BRA 0x826 |
| 1314 |
|
1336 | 00081c 0e00 MOVLW 0x0 |
| 1315 |
|
1337 | 00081e 1477 ANDWF 0x77,0x0,0x0 |
| 1316 |
|
1338 | 000820 0916 IORLW 0x16 |
| 1317 |
|
1339 | 000822 6e77 MOVWF 0x77,0x0 |
| 1318 |
|
1340 | 000824 d009 BRA 0x838 else if (B5CONbits.RXFUL) { ECANCON=(ECANCON&0b00000)|0b10111; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1319 |
|
1341 | 000826 af70 BTFSS 0x70,0x7,0x1 |
| 1320 |
|
1342 | 000828 d005 BRA 0x834 |
| 1321 |
|
1343 | 00082a 0e00 MOVLW 0x0 |
| 1322 |
|
1344 | 00082c 1477 ANDWF 0x77,0x0,0x0 |
| 1323 |
|
1345 | 00082e 0917 IORLW 0x17 |
| 1324 |
|
1346 | 000830 6e77 MOVWF 0x77,0x0 |
| 1325 |
|
1347 | 000832 d002 BRA 0x838 else return FALSE; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1326 |
|
1348 | 000834 0e00 MOVLW 0x0 |
| 1327 |
|
1349 | 000836 d083 BRA 0x93e |
| 1328 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1350 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1329 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1351 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1330 | //RXB0SIDH 28 27 26 25 24 23 22 21 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1352 | //RXB0SIDH 28 27 26 25 24 23 22 21 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1331 | //RXB0SIDL 20 19 18 xx xx xx 17 16 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1353 | //RXB0SIDL 20 19 18 xx xx xx 17 16 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1332 | //RXB0EIDH 15 14 13 12 11 10 09 08 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1354 | //RXB0EIDH 15 14 13 12 11 10 09 08 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| Line 1336... | Line 1358... | ||
| 1336 | //funcc xx xx xx xx xx xx 24 23 22 21 20 19 18 17 16 15 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1358 | //funcc xx xx xx xx xx xx 24 23 22 21 20 19 18 17 16 15 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1337 | //nid xx xx 14 13 12 11 10 09 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1359 | //nid xx xx 14 13 12 11 10 09 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1338 | //sid xx xx xx xx xx xx xx 08 07 06 05 04 03 02 01 00 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1360 | //sid xx xx xx xx xx xx xx 08 07 06 05 04 03 02 01 00 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1339 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1361 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1340 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1362 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1341 |
|
1363 | 000838 0ef0 MOVLW 0xf0 cm.funct=((RXB0SIDH & 0xF0)>>4); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1342 |
|
1364 | 00083a 1461 ANDWF 0x61,0x0,0x0 |
| 1343 |
|
1365 | 00083c 38e8 SWAPF 0xe8,0x0,0x0 |
| 1344 |
|
1366 | 00083e 0b0f ANDLW 0xf |
| 1345 |
|
1367 | 000840 0100 MOVLB 0x0 |
| 1346 |
|
1368 | 000842 6f60 MOVWF 0x60,0x1 |
| 1347 |
|
1369 | 000844 0e0f MOVLW 0xf cm.funcc=(((WORD)(RXB0SIDH & 0x0F))<<6)+(((WORD)(RXB0SIDL & 0xE0))>>2)+(((WORD)(RXB0SIDL & 0x03))<<1)+(((WORD)(RXB0EIDH & 0x80))>>7); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1348 |
|
1370 | 000846 1461 ANDWF 0x61,0x0,0x0 |
| 1349 |
|
1371 | 000848 6e04 MOVWF 0x4,0x0 |
| 1350 |
|
1372 | 00084a 6a05 CLRF 0x5,0x0 |
| 1351 |
|
1373 | 00084c 0e06 MOVLW 0x6 |
| 1352 |
|
1374 | 00084e 90d8 BCF 0xd8,0x0,0x0 |
| 1353 |
|
1375 | 000850 3604 RLCF 0x4,0x1,0x0 |
| 1354 |
|
1376 | 000852 3605 RLCF 0x5,0x1,0x0 |
| 1355 |
|
1377 | 000854 04e8 DECF 0xe8,0x0,0x0 |
| 1356 |
|
1378 | 000856 e1fb BNZ 0x84e |
| 1357 |
|
1379 | 000858 0ee0 MOVLW 0xe0 |
| 1358 | 00083a 1462 ANDWF 0x62,0x0,0x0 |
- | |
| 1359 | 00083c 6e06 MOVWF 0x6,0x0 |
- | |
| 1360 | 00083e 6a07 CLRF 0x7,0x0 |
- | |
| 1361 | 000840 90d8 BCF 0xd8,0x0,0x0 |
- | |
| 1362 | 000842 3207 RRCF 0x7,0x1,0x0 |
- | |
| 1363 | 000844 3206 RRCF 0x6,0x1,0x0 |
- | |
| 1364 | 000846 90d8 BCF 0xd8,0x0,0x0 |
- | |
| 1365 | 000848 3207 RRCF 0x7,0x1,0x0 |
- | |
| 1366 | 00084a 3206 RRCF 0x6,0x1,0x0 |
- | |
| 1367 | 00084c 5004 MOVF 0x4,0x0,0x0 |
- | |
| 1368 | 00084e 2406 ADDWF 0x6,0x0,0x0 |
- | |
| 1369 | 000850 6e02 MOVWF 0x2,0x0 |
- | |
| 1370 | 000852 5005 MOVF 0x5,0x0,0x0 |
- | |
| 1371 | 000854 2007 ADDWFC 0x7,0x0,0x0 |
- | |
| 1372 | 000856 6e03 MOVWF 0x3,0x0 |
- | |
| 1373 | 000858 0e03 MOVLW 0x3 |
- | |
| 1374 | 00085a 1462 ANDWF 0x62,0x0,0x0 |
1380 | 00085a 1462 ANDWF 0x62,0x0,0x0 |
| 1375 | 00085c |
1381 | 00085c 6e06 MOVWF 0x6,0x0 |
| 1376 | 00085e |
1382 | 00085e 6a07 CLRF 0x7,0x0 |
| 1377 | 000860 90d8 BCF 0xd8,0x0,0x0 |
1383 | 000860 90d8 BCF 0xd8,0x0,0x0 |
| - | 1384 | 000862 3207 RRCF 0x7,0x1,0x0 |
|
| - | 1385 | 000864 3206 RRCF 0x6,0x1,0x0 |
|
| - | 1386 | 000866 90d8 BCF 0xd8,0x0,0x0 |
|
| - | 1387 | 000868 3207 RRCF 0x7,0x1,0x0 |
|
| - | 1388 | 00086a 3206 RRCF 0x6,0x1,0x0 |
|
| - | 1389 | 00086c 5004 MOVF 0x4,0x0,0x0 |
|
| - | 1390 | 00086e 2406 ADDWF 0x6,0x0,0x0 |
|
| - | 1391 | 000870 6e02 MOVWF 0x2,0x0 |
|
| - | 1392 | 000872 5005 MOVF 0x5,0x0,0x0 |
|
| - | 1393 | 000874 2007 ADDWFC 0x7,0x0,0x0 |
|
| - | 1394 | 000876 6e03 MOVWF 0x3,0x0 |
|
| - | 1395 | 000878 0e03 MOVLW 0x3 |
|
| - | 1396 | 00087a 1462 ANDWF 0x62,0x0,0x0 |
|
| - | 1397 | 00087c 6e08 MOVWF 0x8,0x0 |
|
| - | 1398 | 00087e 6a09 CLRF 0x9,0x0 |
|
| - | 1399 | 000880 90d8 BCF 0xd8,0x0,0x0 |
|
| 1378 |
|
1400 | 000882 3608 RLCF 0x8,0x1,0x0 |
| 1379 |
|
1401 | 000884 3609 RLCF 0x9,0x1,0x0 |
| 1380 |
|
1402 | 000886 5002 MOVF 0x2,0x0,0x0 |
| 1381 |
|
1403 | 000888 2408 ADDWF 0x8,0x0,0x0 |
| 1382 |
|
1404 | 00088a 6e00 MOVWF 0x0,0x0 |
| 1383 |
|
1405 | 00088c 5003 MOVF 0x3,0x0,0x0 |
| 1384 |
|
1406 | 00088e 2009 ADDWFC 0x9,0x0,0x0 |
| 1385 |
|
1407 | 000890 6e01 MOVWF 0x1,0x0 |
| 1386 |
|
1408 | 000892 0e80 MOVLW 0x80 |
| 1387 |
|
1409 | 000894 1463 ANDWF 0x63,0x0,0x0 |
| 1388 |
|
1410 | 000896 6e0a MOVWF 0xa,0x0 |
| 1389 |
|
1411 | 000898 6a0b CLRF 0xb,0x0 |
| 1390 |
|
1412 | 00089a 0e07 MOVLW 0x7 |
| 1391 |
|
1413 | 00089c 90d8 BCF 0xd8,0x0,0x0 |
| 1392 |
|
1414 | 00089e 320b RRCF 0xb,0x1,0x0 |
| 1393 |
|
1415 | 0008a0 320a RRCF 0xa,0x1,0x0 |
| 1394 |
|
1416 | 0008a2 04e8 DECF 0xe8,0x0,0x0 |
| 1395 |
|
1417 | 0008a4 e1fb BNZ 0x89c |
| 1396 |
|
1418 | 0008a6 5000 MOVF 0x0,0x0,0x0 |
| 1397 |
|
1419 | 0008a8 240a ADDWF 0xa,0x0,0x0 |
| 1398 |
|
1420 | 0008aa 0100 MOVLB 0x0 |
| 1399 |
|
1421 | 0008ac 6f61 MOVWF 0x61,0x1 |
| 1400 |
|
1422 | 0008ae 5001 MOVF 0x1,0x0,0x0 |
| 1401 |
|
1423 | 0008b0 200b ADDWFC 0xb,0x0,0x0 |
| 1402 |
|
1424 | 0008b2 6f62 MOVWF 0x62,0x1 |
| 1403 |
|
1425 | 0008b4 0e7e MOVLW 0x7e cm.nid=((RXB0EIDH & 0x7E)>>1); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1404 |
|
1426 | 0008b6 1463 ANDWF 0x63,0x0,0x0 |
| 1405 |
|
1427 | 0008b8 40e8 RRNCF 0xe8,0x0,0x0 |
| 1406 |
|
1428 | 0008ba 0b7f ANDLW 0x7f |
| 1407 |
|
1429 | 0008bc 6f63 MOVWF 0x63,0x1 |
| 1408 |
|
1430 | 0008be 0e01 MOVLW 0x1 cm.sid=(((WORD)(RXB0EIDH & 0x01))<<8)+RXB0EIDL; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1409 |
|
1431 | 0008c0 1463 ANDWF 0x63,0x0,0x0 |
| 1410 |
|
1432 | 0008c2 6e00 MOVWF 0x0,0x0 |
| 1411 |
|
1433 | 0008c4 c000 MOVFF 0x0,0x1 |
| 1412 |
|
1434 | 0008c6 f001 |
| 1413 |
|
1435 | 0008c8 6a00 CLRF 0x0,0x0 |
| 1414 |
|
1436 | 0008ca 5064 MOVF 0x64,0x0,0x0 |
| 1415 |
|
1437 | 0008cc 2400 ADDWF 0x0,0x0,0x0 |
| 1416 |
|
1438 | 0008ce 6f64 MOVWF 0x64,0x1 |
| 1417 |
|
1439 | 0008d0 0e00 MOVLW 0x0 |
| 1418 |
|
1440 | 0008d2 2001 ADDWFC 0x1,0x0,0x0 |
| 1419 |
|
1441 | 0008d4 6f65 MOVWF 0x65,0x1 |
| 1420 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1442 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1421 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1443 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1422 | // Data length F:\MCP\projects\CAN\canBoot\Source\Main.c |
1444 | // Data length F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1423 |
|
1445 | 0008d6 5065 MOVF 0x65,0x0,0x0 cm.data_length=(RXB0DLCbits.DLC3<<3)+(RXB0DLCbits.DLC2<<2)+(RXB0DLCbits.DLC1<<1)+RXB0DLCbits.DLC0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1424 |
|
1446 | 0008d8 0b01 ANDLW 0x1 |
| 1425 |
|
1447 | 0008da 6e02 MOVWF 0x2,0x0 |
| 1426 |
|
1448 | 0008dc 5065 MOVF 0x65,0x0,0x0 |
| 1427 |
|
1449 | 0008de 0b02 ANDLW 0x2 |
| 1428 |
|
1450 | 0008e0 e001 BZ 0x8e4 |
| 1429 |
|
1451 | 0008e2 0e01 MOVLW 0x1 |
| 1430 |
|
1452 | 0008e4 24e8 ADDWF 0xe8,0x0,0x0 |
| 1431 |
|
1453 | 0008e6 6e01 MOVWF 0x1,0x0 |
| 1432 |
|
1454 | 0008e8 5065 MOVF 0x65,0x0,0x0 |
| 1433 |
|
1455 | 0008ea 0b04 ANDLW 0x4 |
| 1434 |
|
1456 | 0008ec e001 BZ 0x8f0 |
| 1435 |
|
1457 | 0008ee 0e01 MOVLW 0x1 |
| 1436 |
|
1458 | 0008f0 0d04 MULLW 0x4 |
| 1437 |
|
1459 | 0008f2 cff3 MOVFF 0xff3,0x0 |
| 1438 |
|
1460 | 0008f4 f000 |
| 1439 |
|
1461 | 0008f6 5065 MOVF 0x65,0x0,0x0 |
| 1440 |
|
1462 | 0008f8 0b08 ANDLW 0x8 |
| 1441 |
|
1463 | 0008fa e001 BZ 0x8fe |
| 1442 |
|
1464 | 0008fc 0e01 MOVLW 0x1 |
| 1443 |
|
1465 | 0008fe 0d08 MULLW 0x8 |
| 1444 |
|
1466 | 000900 50f3 MOVF 0xf3,0x0,0x0 |
| 1445 |
|
1467 | 000902 2400 ADDWF 0x0,0x0,0x0 |
| 1446 |
|
1468 | 000904 2401 ADDWF 0x1,0x0,0x0 |
| 1447 |
|
1469 | 000906 2402 ADDWF 0x2,0x0,0x0 |
| 1448 |
|
1470 | 000908 6f66 MOVWF 0x66,0x1 |
| 1449 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1471 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1450 | // Remote request F:\MCP\projects\CAN\canBoot\Source\Main.c |
1472 | // Remote request F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1451 |
|
1473 | 00090a 5065 MOVF 0x65,0x0,0x0 cm.remote_request=(RXB0DLCbits.RXRTR==0?FALSE:TRUE); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1452 |
|
1474 | 00090c 0b40 ANDLW 0x40 |
| 1453 |
|
1475 | 00090e e102 BNZ 0x914 |
| 1454 |
|
1476 | 000910 0e00 MOVLW 0x0 |
| 1455 |
|
1477 | 000912 d001 BRA 0x916 |
| 1456 |
|
1478 | 000914 0e01 MOVLW 0x1 |
| 1457 |
|
1479 | 000916 6f67 MOVWF 0x67,0x1 |
| 1458 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1480 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1459 | // Data one bye one, for speed F:\MCP\projects\CAN\canBoot\Source\Main.c |
1481 | // Data one bye one, for speed F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1460 |
|
1482 | 000918 cf66 MOVFF 0xf66,0x68 cm.data[0]=RXB0D0; cm.data[1]=RXB0D1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1461 |
|
1483 | 00091a f068 |
| 1462 |
|
1484 | 00091c cf67 MOVFF 0xf67,0x69 |
| 1463 |
|
1485 | 00091e f069 |
| 1464 |
|
1486 | 000920 cf68 MOVFF 0xf68,0x6a cm.data[2]=RXB0D2; cm.data[3]=RXB0D3; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1465 |
|
1487 | 000922 f06a |
| 1466 |
|
1488 | 000924 cf69 MOVFF 0xf69,0x6b |
| 1467 |
|
1489 | 000926 f06b |
| 1468 |
|
1490 | 000928 cf6a MOVFF 0xf6a,0x6c cm.data[4]=RXB0D4; cm.data[5]=RXB0D5; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1469 |
|
1491 | 00092a f06c |
| 1470 |
|
1492 | 00092c cf6b MOVFF 0xf6b,0x6d |
| 1471 |
|
1493 | 00092e f06d |
| 1472 |
|
1494 | 000930 cf6c MOVFF 0xf6c,0x6e cm.data[6]=RXB0D6; cm.data[7]=RXB0D7; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1473 |
|
1495 | 000932 f06e |
| 1474 |
|
1496 | 000934 cf6d MOVFF 0xf6d,0x6f |
| 1475 |
|
1497 | 000936 f06f |
| 1476 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1498 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1477 | // Clear ful status F:\MCP\projects\CAN\canBoot\Source\Main.c |
1499 | // Clear ful status F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1478 |
|
1500 | 000938 9e60 BCF 0x60,0x7,0x0 RXB0CONbits.RXFUL=0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1479 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1501 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1480 |
|
1502 | 00093a 0e01 MOVLW 0x1 return TRUE; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1481 |
|
1503 | 00093c d000 BRA 0x93e |
| 1482 |
|
1504 | 00093e 0012 RETURN 0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1483 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1505 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1484 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1506 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1485 | /* F:\MCP\projects\CAN\canBoot\Source\Main.c |
1507 | /* F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1486 | * Function: canSendMessage F:\MCP\projects\CAN\canBoot\Source\Main.c |
1508 | * Function: canSendMessage F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1487 | * F:\MCP\projects\CAN\canBoot\Source\Main.c |
1509 | * F:\MCP\projects\CAN\canBoot\Source\Main.c |
| Line 1489... | Line 1511... | ||
| 1489 | * Output: True if packet scheduled sucess, false otherwise. F:\MCP\projects\CAN\canBoot\Source\Main.c |
1511 | * Output: True if packet scheduled sucess, false otherwise. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1490 | * Pre-conditions: canInit F:\MCP\projects\CAN\canBoot\Source\Main.c |
1512 | * Pre-conditions: canInit F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1491 | * Affects: .. F:\MCP\projects\CAN\canBoot\Source\Main.c |
1513 | * Affects: .. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1492 | * Depends: .. F:\MCP\projects\CAN\canBoot\Source\Main.c |
1514 | * Depends: .. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1493 | */ F:\MCP\projects\CAN\canBoot\Source\Main.c |
1515 | */ F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1494 |
|
1516 | 000940 cfd9 MOVFF 0xfd9,0xfe6 BOOL canSendMessage(CAN_PROTO_MESSAGE cm,CAN_PRIORITY prio) F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1495 |
|
1517 | 000942 ffe6 |
| 1496 |
|
1518 | 000944 cfe1 MOVFF 0xfe1,0xfd9 |
| 1497 |
|
1519 | 000946 ffd9 |
| 1498 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
1520 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1499 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1521 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1500 |
|
1522 | 000948 010f MOVLB 0xf if ( TXB0CONbits.TXREQ == 0 ) { ECANCON=(ECANCON&0b00000)|0b00011; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1501 |
|
1523 | 00094a b740 BTFSC 0x40,0x3,0x1 |
| 1502 |
|
1524 | 00094c d004 BRA 0x956 |
| 1503 |
|
1525 | 00094e 0e00 MOVLW 0x0 |
| 1504 |
|
1526 | 000950 1477 ANDWF 0x77,0x0,0x0 |
| 1505 |
|
1527 | 000952 0903 IORLW 0x3 |
| 1506 |
|
1528 | 000954 6e77 MOVWF 0x77,0x0 |
| 1507 |
|
1529 | 000956 010f MOVLB 0xf if ( TXB1CONbits.TXREQ == 0 ) { ECANCON=(ECANCON&0b00000)|0b00100; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1508 |
|
1530 | 000958 b730 BTFSC 0x30,0x3,0x1 |
| 1509 |
|
1531 | 00095a d004 BRA 0x964 |
| 1510 |
|
1532 | 00095c 0e00 MOVLW 0x0 |
| 1511 |
|
1533 | 00095e 1477 ANDWF 0x77,0x0,0x0 |
| 1512 |
|
1534 | 000960 0904 IORLW 0x4 |
| 1513 |
|
1535 | 000962 6e77 MOVWF 0x77,0x0 |
| 1514 |
|
1536 | 000964 010f MOVLB 0xf if ( TXB2CONbits.TXREQ == 0 ) { ECANCON=(ECANCON&0b00000)|0b00101; } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1515 |
|
1537 | 000966 b720 BTFSC 0x20,0x3,0x1 |
| 1516 |
|
1538 | 000968 d005 BRA 0x974 |
| 1517 |
|
1539 | 00096a 0e00 MOVLW 0x0 |
| 1518 |
|
1540 | 00096c 1477 ANDWF 0x77,0x0,0x0 |
| 1519 |
|
1541 | 00096e 0905 IORLW 0x5 |
| 1520 |
|
1542 | 000970 6e77 MOVWF 0x77,0x0 |
| 1521 | // None of the transmit buffers were empty. F:\MCP\projects\CAN\canBoot\Source\Main.c |
1543 | // None of the transmit buffers were empty. F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1522 |
|
1544 | 000972 d002 BRA 0x978 else { return FALSE;} F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1523 |
|
1545 | 000974 0e00 MOVLW 0x0 |
| 1524 |
|
1546 | 000976 d0b5 BRA 0xae2 |
| 1525 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1547 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1526 |
|
1548 | 000978 0eee MOVLW 0xee if (prio<0 || prio>3) prio = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1527 |
|
1549 | 00097a cfdb MOVFF 0xfdb,0x0 |
| 1528 |
|
1550 | 00097c f000 |
| 1529 |
|
1551 | 00097e 3400 RLCF 0x0,0x0,0x0 |
| 1530 |
|
1552 | 000980 e20e BC 0x99e |
| 1531 |
|
1553 | 000982 0eee MOVLW 0xee |
| 1532 |
|
1554 | 000984 cfdb MOVFF 0xfdb,0x1 |
| 1533 |
|
1555 | 000986 f001 |
| 1534 |
|
1556 | 000988 0e03 MOVLW 0x3 |
| 1535 |
|
1557 | 00098a 6ee7 MOVWF 0xe7,0x0 |
| 1536 |
|
1558 | 00098c 1801 XORWF 0x1,0x0,0x0 |
| 1537 |
|
1559 | 00098e aee8 BTFSS 0xe8,0x7,0x0 |
| 1538 |
|
1560 | 000990 d002 BRA 0x996 |
| 1539 |
|
1561 | 000992 3401 RLCF 0x1,0x0,0x0 |
| 1540 |
|
1562 | 000994 d003 BRA 0x99c |
| 1541 |
|
1563 | 000996 50e7 MOVF 0xe7,0x0,0x0 |
| 1542 |
|
1564 | 000998 80d8 BSF 0xd8,0x0,0x0 |
| 1543 |
|
1565 | 00099a 5401 SUBFWB 0x1,0x0,0x0 |
| 1544 |
|
1566 | 00099c e202 BC 0x9a2 |
| 1545 |
|
1567 | 00099e 0eee MOVLW 0xee |
| 1546 |
|
1568 | 0009a0 6adb CLRF 0xdb,0x0 |
| 1547 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1569 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1548 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1570 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1549 | //RXB0SIDH 28 27 26 25 24 23 22 21 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1571 | //RXB0SIDH 28 27 26 25 24 23 22 21 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1550 | //RXB0SIDL 20 19 18 xx xx xx 17 16 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1572 | //RXB0SIDL 20 19 18 xx xx xx 17 16 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1551 | //RXB0EIDH 15 14 13 12 11 10 09 08 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1573 | //RXB0EIDH 15 14 13 12 11 10 09 08 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1552 | //RXB0EIDL 07 06 05 04 03 02 01 00 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1574 | //RXB0EIDL 07 06 05 04 03 02 01 00 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| Line 1554... | Line 1576... | ||
| 1554 | //funct xx xx xx xx 28 27 26 25 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1576 | //funct xx xx xx xx 28 27 26 25 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1555 | //funcc xx xx xx xx xx xx 24 23 22 21 20 19 18 17 16 15 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1577 | //funcc xx xx xx xx xx xx 24 23 22 21 20 19 18 17 16 15 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1556 | //nid xx xx 14 13 12 11 10 09 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1578 | //nid xx xx 14 13 12 11 10 09 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1557 | //sid xx xx xx xx xx xx xx 08 07 06 05 04 03 02 01 00 F:\MCP\projects\CAN\canBoot\Source\Main.c |
1579 | //sid xx xx xx xx xx xx xx 08 07 06 05 04 03 02 01 00 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1558 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1580 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1559 |
|
1581 | 0009a2 0ef0 MOVLW 0xf0 RXB0SIDH = (BYTE)((cm.funct & 0x0F)<<4)+(BYTE)((cm.funcc & 0x03C0)>>6); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1560 |
|
1582 | 0009a4 cfdb MOVFF 0xfdb,0x0 |
| 1561 |
|
1583 | 0009a6 f000 |
| 1562 |
|
1584 | 0009a8 0ef1 MOVLW 0xf1 |
| 1563 |
|
1585 | 0009aa cfdb MOVFF 0xfdb,0x1 |
| 1564 |
|
1586 | 0009ac f001 |
| 1565 |
|
1587 | 0009ae 0ec0 MOVLW 0xc0 |
| 1566 |
|
1588 | 0009b0 1600 ANDWF 0x0,0x1,0x0 |
| 1567 |
|
1589 | 0009b2 0e03 MOVLW 0x3 |
| 1568 |
|
1590 | 0009b4 1601 ANDWF 0x1,0x1,0x0 |
| 1569 |
|
1591 | 0009b6 0e06 MOVLW 0x6 |
| 1570 |
|
1592 | 0009b8 90d8 BCF 0xd8,0x0,0x0 |
| 1571 |
|
1593 | 0009ba 3201 RRCF 0x1,0x1,0x0 |
| 1572 |
|
1594 | 0009bc 3200 RRCF 0x0,0x1,0x0 |
| 1573 |
|
1595 | 0009be 04e8 DECF 0xe8,0x0,0x0 |
| 1574 |
|
1596 | 0009c0 e1fb BNZ 0x9b8 |
| 1575 |
|
1597 | 0009c2 0eef MOVLW 0xef |
| 1576 |
|
1598 | 0009c4 50db MOVF 0xdb,0x0,0x0 |
| 1577 |
|
1599 | 0009c6 0b0f ANDLW 0xf |
| 1578 |
|
1600 | 0009c8 0d10 MULLW 0x10 |
| 1579 |
|
1601 | 0009ca 50f3 MOVF 0xf3,0x0,0x0 |
| 1580 |
|
1602 | 0009cc 2400 ADDWF 0x0,0x0,0x0 |
| 1581 |
|
1603 | 0009ce 6e61 MOVWF 0x61,0x0 |
| 1582 |
|
1604 | 0009d0 0e06 MOVLW 0x6 RXB0SIDL = (BYTE)((cm.funcc & 0x003F)<<2)+(BYTE)((cm.funcc & 0x0006)>>1); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1583 |
|
1605 | 0009d2 6ee7 MOVWF 0xe7,0x0 |
| 1584 |
|
1606 | 0009d4 0ef0 MOVLW 0xf0 |
| 1585 |
|
1607 | 0009d6 cfdb MOVFF 0xfdb,0x2 |
| 1586 |
|
1608 | 0009d8 f002 |
| 1587 |
|
1609 | 0009da 0ef1 MOVLW 0xf1 |
| 1588 |
|
1610 | 0009dc cfdb MOVFF 0xfdb,0x3 |
| 1589 |
|
1611 | 0009de f003 |
| 1590 |
|
1612 | 0009e0 50e7 MOVF 0xe7,0x0,0x0 |
| 1591 |
|
1613 | 0009e2 1602 ANDWF 0x2,0x1,0x0 |
| 1592 |
|
1614 | 0009e4 6a03 CLRF 0x3,0x0 |
| 1593 |
|
1615 | 0009e6 90d8 BCF 0xd8,0x0,0x0 |
| 1594 |
|
1616 | 0009e8 3203 RRCF 0x3,0x1,0x0 |
| 1595 |
|
1617 | 0009ea 3202 RRCF 0x2,0x1,0x0 |
| 1596 |
|
1618 | 0009ec 0e3f MOVLW 0x3f |
| 1597 |
|
1619 | 0009ee 6ee7 MOVWF 0xe7,0x0 |
| 1598 |
|
1620 | 0009f0 0ef0 MOVLW 0xf0 |
| 1599 |
|
1621 | 0009f2 cfdb MOVFF 0xfdb,0x0 |
| 1600 |
|
1622 | 0009f4 f000 |
| 1601 |
|
1623 | 0009f6 0ef1 MOVLW 0xf1 |
| 1602 |
|
1624 | 0009f8 cfdb MOVFF 0xfdb,0x1 |
| 1603 |
|
1625 | 0009fa f001 |
| 1604 |
|
1626 | 0009fc 50e7 MOVF 0xe7,0x0,0x0 |
| 1605 |
|
1627 | 0009fe 1600 ANDWF 0x0,0x1,0x0 |
| 1606 |
|
1628 | 000a00 6a01 CLRF 0x1,0x0 |
| 1607 |
|
1629 | 000a02 90d8 BCF 0xd8,0x0,0x0 |
| 1608 |
|
1630 | 000a04 3600 RLCF 0x0,0x1,0x0 |
| 1609 |
|
1631 | 000a06 3601 RLCF 0x1,0x1,0x0 |
| 1610 |
|
1632 | 000a08 90d8 BCF 0xd8,0x0,0x0 |
| 1611 |
|
1633 | 000a0a 3600 RLCF 0x0,0x1,0x0 |
| 1612 |
|
1634 | 000a0c 3601 RLCF 0x1,0x1,0x0 |
| 1613 |
|
1635 | 000a0e 5000 MOVF 0x0,0x0,0x0 |
| 1614 |
|
1636 | 000a10 2402 ADDWF 0x2,0x0,0x0 |
| 1615 |
|
1637 | 000a12 6e62 MOVWF 0x62,0x0 |
| 1616 |
|
1638 | 000a14 0ef3 MOVLW 0xf3 RXB0EIDH = (BYTE)((cm.funcc & 0x0001)<<7)+(BYTE)((cm.nid & 0x3F)<<1)+(BYTE)((cm.sid & 0x0100)>>8); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1617 |
|
1639 | 000a16 cfdb MOVFF 0xfdb,0x2 |
| 1618 |
|
1640 | 000a18 f002 |
| 1619 |
|
1641 | 000a1a 0ef4 MOVLW 0xf4 |
| 1620 |
|
1642 | 000a1c cfdb MOVFF 0xfdb,0x3 |
| 1621 |
|
1643 | 000a1e f003 |
| 1622 |
|
1644 | 000a20 0e00 MOVLW 0x0 |
| 1623 |
|
1645 | 000a22 1602 ANDWF 0x2,0x1,0x0 |
| 1624 |
|
1646 | 000a24 0e01 MOVLW 0x1 |
| 1625 |
|
1647 | 000a26 1603 ANDWF 0x3,0x1,0x0 |
| 1626 |
|
1648 | 000a28 c003 MOVFF 0x3,0x2 |
| 1627 |
|
1649 | 000a2a f002 |
| 1628 |
|
1650 | 000a2c 6a03 CLRF 0x3,0x0 |
| 1629 |
|
1651 | 000a2e 0e01 MOVLW 0x1 |
| 1630 |
|
1652 | 000a30 6ee7 MOVWF 0xe7,0x0 |
| 1631 |
|
1653 | 000a32 0ef0 MOVLW 0xf0 |
| 1632 |
|
1654 | 000a34 cfdb MOVFF 0xfdb,0x0 |
| 1633 |
|
1655 | 000a36 f000 |
| 1634 |
|
1656 | 000a38 0ef1 MOVLW 0xf1 |
| 1635 |
|
1657 | 000a3a cfdb MOVFF 0xfdb,0x1 |
| 1636 |
|
1658 | 000a3c f001 |
| 1637 |
|
1659 | 000a3e 50e7 MOVF 0xe7,0x0,0x0 |
| 1638 |
|
1660 | 000a40 1600 ANDWF 0x0,0x1,0x0 |
| 1639 |
|
1661 | 000a42 6a01 CLRF 0x1,0x0 |
| 1640 |
|
1662 | 000a44 0e07 MOVLW 0x7 |
| 1641 |
|
1663 | 000a46 90d8 BCF 0xd8,0x0,0x0 |
| 1642 |
|
1664 | 000a48 3600 RLCF 0x0,0x1,0x0 |
| 1643 |
|
1665 | 000a4a 3601 RLCF 0x1,0x1,0x0 |
| 1644 |
|
1666 | 000a4c 04e8 DECF 0xe8,0x0,0x0 |
| 1645 |
|
1667 | 000a4e e1fb BNZ 0xa46 |
| 1646 |
|
1668 | 000a50 0ef2 MOVLW 0xf2 |
| 1647 |
|
1669 | 000a52 50db MOVF 0xdb,0x0,0x0 |
| 1648 |
|
1670 | 000a54 0b3f ANDLW 0x3f |
| 1649 |
|
1671 | 000a56 24e8 ADDWF 0xe8,0x0,0x0 |
| 1650 |
|
1672 | 000a58 2400 ADDWF 0x0,0x0,0x0 |
| 1651 |
|
1673 | 000a5a 2402 ADDWF 0x2,0x0,0x0 |
| 1652 |
|
1674 | 000a5c 6e63 MOVWF 0x63,0x0 |
| 1653 |
|
1675 | 000a5e 0eff MOVLW 0xff RXB0EIDL = (BYTE)((cm.sid & 0x00FF)); F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1654 |
|
1676 | 000a60 6ee7 MOVWF 0xe7,0x0 |
| 1655 |
|
1677 | 000a62 0ef3 MOVLW 0xf3 |
| 1656 |
|
1678 | 000a64 cfdb MOVFF 0xfdb,0x0 |
| 1657 |
|
1679 | 000a66 f000 |
| 1658 |
|
1680 | 000a68 0ef4 MOVLW 0xf4 |
| 1659 |
|
1681 | 000a6a cfdb MOVFF 0xfdb,0x1 |
| 1660 |
|
1682 | 000a6c f001 |
| 1661 |
|
1683 | 000a6e 50e7 MOVF 0xe7,0x0,0x0 |
| 1662 |
|
1684 | 000a70 1600 ANDWF 0x0,0x1,0x0 |
| 1663 |
|
1685 | 000a72 6a01 CLRF 0x1,0x0 |
| 1664 |
|
1686 | 000a74 5000 MOVF 0x0,0x0,0x0 |
| 1665 |
|
1687 | 000a76 6e64 MOVWF 0x64,0x0 |
| 1666 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1688 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1667 | // Data length F:\MCP\projects\CAN\canBoot\Source\Main.c |
1689 | // Data length F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1668 |
|
1690 | 000a78 6a65 CLRF 0x65,0x0 RXB0DLC = 0; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1669 |
|
1691 | 000a7a 0ef5 MOVLW 0xf5 if (cm.data_length>8) RXB0DLC=8; else RXB0DLC=cm.data_length; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1670 |
|
1692 | 000a7c 50db MOVF 0xdb,0x0,0x0 |
| 1671 |
|
1693 | 000a7e 0808 SUBLW 0x8 |
| 1672 |
|
1694 | 000a80 e203 BC 0xa88 |
| 1673 |
|
1695 | 000a82 0e08 MOVLW 0x8 |
| 1674 |
|
1696 | 000a84 6e65 MOVWF 0x65,0x0 |
| 1675 |
|
1697 | 000a86 d003 BRA 0xa8e |
| 1676 |
|
1698 | 000a88 0ef5 MOVLW 0xf5 |
| 1677 |
|
1699 | 000a8a 50db MOVF 0xdb,0x0,0x0 |
| 1678 |
|
1700 | 000a8c 6e65 MOVWF 0x65,0x0 |
| 1679 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1701 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1680 | // Remote request F:\MCP\projects\CAN\canBoot\Source\Main.c |
1702 | // Remote request F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1681 |
|
1703 | 000a8e 0ef6 MOVLW 0xf6 if (cm.remote_request==TRUE) F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1682 |
|
1704 | 000a90 04db DECF 0xdb,0x0,0x0 |
| 1683 |
|
1705 | 000a92 e102 BNZ 0xa98 |
| - | 1706 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 1707 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 1708 | 000a94 8c65 BSF 0x65,0x6,0x0 bsf RXB0DLC, 6, 0 F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 1709 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 1710 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| - | 1711 | 000a96 d001 BRA 0xa9a else F:\MCP\projects\CAN\canBoot\Source\Main.c |
|
| 1684 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
1712 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1685 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
1713 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1686 | 000a74 8c65 BSF 0x65,0x6,0x0 bsf RXB0DLC, 6, 0 F:\MCP\projects\CAN\canBoot\Source\Main.c |
- | |
| 1687 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
- | |
| 1688 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
- | |
| 1689 | 000a76 d001 BRA 0xa7a else F:\MCP\projects\CAN\canBoot\Source\Main.c |
- | |
| 1690 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
- | |
| 1691 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
- | |
| 1692 |
|
1714 | 000a98 9c65 BCF 0x65,0x6,0x0 bcf RXB0DLC, 6, 0 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1693 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
1715 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1694 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
1716 | } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1695 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1717 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1696 | // Data one bye one, for speed F:\MCP\projects\CAN\canBoot\Source\Main.c |
1718 | // Data one bye one, for speed F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1697 |
|
1719 | 000a9a 0ef7 MOVLW 0xf7 RXB0D0=cm.data[0]; RXB0D1=cm.data[1]; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1698 |
|
1720 | 000a9c 50db MOVF 0xdb,0x0,0x0 |
| 1699 |
|
1721 | 000a9e 6e66 MOVWF 0x66,0x0 |
| 1700 |
|
1722 | 000aa0 0ef8 MOVLW 0xf8 |
| 1701 |
|
1723 | 000aa2 50db MOVF 0xdb,0x0,0x0 |
| 1702 |
|
1724 | 000aa4 6e67 MOVWF 0x67,0x0 |
| 1703 |
|
1725 | 000aa6 0ef9 MOVLW 0xf9 RXB0D2=cm.data[2]; RXB0D3=cm.data[3]; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1704 |
|
1726 | 000aa8 50db MOVF 0xdb,0x0,0x0 |
| 1705 |
|
1727 | 000aaa 6e68 MOVWF 0x68,0x0 |
| 1706 |
|
1728 | 000aac 0efa MOVLW 0xfa |
| 1707 |
|
1729 | 000aae 50db MOVF 0xdb,0x0,0x0 |
| 1708 |
|
1730 | 000ab0 6e69 MOVWF 0x69,0x0 |
| 1709 |
|
1731 | 000ab2 0efb MOVLW 0xfb RXB0D4=cm.data[4]; RXB0D5=cm.data[5]; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1710 |
|
1732 | 000ab4 50db MOVF 0xdb,0x0,0x0 |
| 1711 |
|
1733 | 000ab6 6e6a MOVWF 0x6a,0x0 |
| 1712 |
|
1734 | 000ab8 0efc MOVLW 0xfc |
| 1713 |
|
1735 | 000aba 50db MOVF 0xdb,0x0,0x0 |
| 1714 |
|
1736 | 000abc 6e6b MOVWF 0x6b,0x0 |
| 1715 |
|
1737 | 000abe 0efd MOVLW 0xfd RXB0D6=cm.data[6]; RXB0D7=cm.data[7]; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1716 |
|
1738 | 000ac0 50db MOVF 0xdb,0x0,0x0 |
| 1717 |
|
1739 | 000ac2 6e6c MOVWF 0x6c,0x0 |
| 1718 |
|
1740 | 000ac4 0efe MOVLW 0xfe |
| 1719 |
|
1741 | 000ac6 50db MOVF 0xdb,0x0,0x0 |
| 1720 |
|
1742 | 000ac8 6e6d MOVWF 0x6d,0x0 |
| 1721 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1743 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1722 | // set extended or not F:\MCP\projects\CAN\canBoot\Source\Main.c |
1744 | // set extended or not F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1723 |
|
1745 | 000aca 8662 BSF 0x62,0x3,0x0 RXB0SIDLbits.EXID=1; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1724 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1746 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1725 | // Priority F:\MCP\projects\CAN\canBoot\Source\Main.c |
1747 | // Priority F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1726 |
|
1748 | 000acc 0eee MOVLW 0xee RXB0CON = (RXB0CON & 0b11111100) | prio; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1727 |
|
1749 | 000ace cfdb MOVFF 0xfdb,0xfe6 |
| 1728 |
|
1750 | 000ad0 ffe6 |
| 1729 |
|
1751 | 000ad2 0efc MOVLW 0xfc |
| 1730 |
|
1752 | 000ad4 1460 ANDWF 0x60,0x0,0x0 |
| 1731 |
|
1753 | 000ad6 52e5 MOVF 0xe5,0x1,0x0 |
| 1732 |
|
1754 | 000ad8 10e7 IORWF 0xe7,0x0,0x0 |
| 1733 |
|
1755 | 000ada 6e60 MOVWF 0x60,0x0 |
| 1734 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1756 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1735 | // mark as redy to transmit F:\MCP\projects\CAN\canBoot\Source\Main.c |
1757 | // mark as redy to transmit F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1736 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
1758 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1737 |
|
1759 | 000adc 8660 BSF 0x60,0x3,0x0 bsf RXB0CON, 3, 0 F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1738 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
1760 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1739 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1761 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1740 |
|
1762 | 000ade 0e01 MOVLW 0x1 return TRUE; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1741 |
|
1763 | 000ae0 d000 BRA 0xae2 |
| 1742 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1764 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1743 |
|
1765 | 000ae2 52e5 MOVF 0xe5,0x1,0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1744 |
|
1766 | 000ae4 cfe7 MOVFF 0xfe7,0xfd9 |
| 1745 |
|
1767 | 000ae6 ffd9 |
| 1746 |
|
1768 | 000ae8 0012 RETURN 0x0 |
| 1747 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1769 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1748 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1770 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1749 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1771 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1750 | #endif //USE_CAN F:\MCP\projects\CAN\canBoot\Source\Main.c |
1772 | #endif //USE_CAN F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1751 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1773 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| Line 1753... | Line 1775... | ||
| 1753 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1775 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1754 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1776 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1755 | void TBLRD_Func() F:\MCP\projects\CAN\canBoot\Source\Main.c |
1777 | void TBLRD_Func() F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1756 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
1778 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1757 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
1779 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1758 |
|
1780 | 000aea 0008 TBLRD TBLRD F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1759 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
1781 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1760 |
|
1782 | 000aec 0012 RETURN 0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1761 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1783 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1762 | void TBLWT_Func() F:\MCP\projects\CAN\canBoot\Source\Main.c |
1784 | void TBLWT_Func() F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1763 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
1785 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1764 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
1786 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1765 |
|
1787 | 000aee 000c TBLWT TBLWT F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1766 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
1788 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1767 |
|
1789 | 000af0 0012 RETURN 0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1768 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1790 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1769 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1791 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1770 | void TBLWTPOSTINC_Func (void){ F:\MCP\projects\CAN\canBoot\Source\Main.c |
1792 | void TBLWTPOSTINC_Func (void){ F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1771 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
1793 | _asm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1772 |
|
1794 | 000af2 000d TBLWTPOSTINC TBLWTPOSTINC F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1773 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
1795 | _endasm F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1774 |
|
1796 | 000af4 0012 RETURN 0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1775 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1797 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1776 | DWORD tickGet() F:\MCP\projects\CAN\canBoot\Source\Main.c |
1798 | DWORD tickGet() F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1777 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
1799 | { F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1778 |
|
1800 | 000af6 c0b6 MOVFF 0xb6,0x10 return tickCounter; F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1779 |
|
1801 | 000af8 f010 |
| 1780 |
|
1802 | 000afa c0b7 MOVFF 0xb7,0x11 |
| 1781 |
|
1803 | 000afc f011 |
| 1782 |
|
1804 | 000afe c0b8 MOVFF 0xb8,0x12 |
| 1783 |
|
1805 | 000b00 f012 |
| 1784 |
|
1806 | 000b02 c0b9 MOVFF 0xb9,0x13 |
| 1785 |
|
1807 | 000b04 f013 |
| 1786 |
|
1808 | 000b06 d000 BRA 0xb08 |
| 1787 |
|
1809 | 000b08 0012 RETURN 0x0 } F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1788 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1810 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1789 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
1811 | F:\MCP\projects\CAN\canBoot\Source\Main.c |
| 1790 | #pragma code user = RM_RESET_VECTOR F:\MCP\projects\CAN\canBoot\Source\Main.c |
1812 | #pragma code user = RM_RESET_VECTOR F:\MCP\projects\CAN\canBoot\Source\Main.c |