1 ;-------------------------------------------------------- 2 ; File Created by SDCC : free open source ANSI-C Compiler 3 ; Version 3.0.0 #6037 (Oct 31 2010) (Linux) 4 ; This file was generated Sat May 26 21:02:12 2012 5 ;-------------------------------------------------------- 6 .module debugint 7 .optsdcc -mmcs51 --model-medium 8 9 ;-------------------------------------------------------- 10 ; Public variables in this module 11 ;-------------------------------------------------------- 12 .globl _main 13 .globl _UM6_flash_commit 14 .globl _read_gyro_procXY 15 .globl _read_accel_procXY 16 .globl _read_gyro_procZ 17 .globl _read_accel_procZ 18 .globl _read_euler_phi_theta 19 .globl _read_euler_psi 20 .globl _read_accel_rawZ 21 .globl _write_UM6_Miscconfig 22 .globl _Zero_Gyros 23 .globl _write_UM6comm 24 .globl _spi_UM6_init 25 .globl _read_rxbuf0 26 .globl _load_can_txbuf2 27 .globl _load_can_txbuf1 28 .globl _load_can_txbuf0 29 .globl _IMU_rxdata 30 .globl _IMU_txdata 31 .globl _txdata 32 .globl _rxdata 33 .globl _txdata2 34 .globl _txpkt 35 .globl _gyroprocZ 36 .globl _gyroprocX 37 .globl _gyroprocY 38 .globl _euler_theta 39 .globl _euler_phi 40 .globl _euler_psi 41 .globl _accelrawZ 42 .globl _accelrawX 43 .globl _accelrawY 44 .globl _accelprocZ 45 .globl _accelprocX 46 .globl _accelprocY 47 .globl _write_can_reg_PARM_2 48 .globl _msg2 49 .globl _Can_init 50 .globl _Can_setnormalmode 51 .globl _Can_setconfigmode 52 .globl _Can_reset 53 .globl _read_can_reg 54 .globl _write_can_reg 55 .globl _buf0ovfbuf1 56 .globl _setmask0 57 .globl _setrxfil0 58 .globl _setrxfil1 59 .globl _set_Can_baudrate 60 .globl _send_Canmsg_wait 61 .globl _get_Canmsg 62 .globl _rxbuf0_full 63 .globl _testfun 64 ;-------------------------------------------------------- 65 ; special function registers 66 ;-------------------------------------------------------- 67 .area RSEG (ABS,DATA) 0000 68 .org 0x0000 0080 69 Fdebugint$P0$0$0 == 0x0080 0080 70 _P0 = 0x0080 0081 71 Fdebugint$SP$0$0 == 0x0081 0081 72 _SP = 0x0081 0082 73 Fdebugint$DPL0$0$0 == 0x0082 0082 74 _DPL0 = 0x0082 0083 75 Fdebugint$DPH0$0$0 == 0x0083 0083 76 _DPH0 = 0x0083 0084 77 Fdebugint$DPL1$0$0 == 0x0084 0084 78 _DPL1 = 0x0084 0085 79 Fdebugint$DPH1$0$0 == 0x0085 0085 80 _DPH1 = 0x0085 0086 81 Fdebugint$U0CSR$0$0 == 0x0086 0086 82 _U0CSR = 0x0086 0087 83 Fdebugint$PCON$0$0 == 0x0087 0087 84 _PCON = 0x0087 0088 85 Fdebugint$TCON$0$0 == 0x0088 0088 86 _TCON = 0x0088 0089 87 Fdebugint$P0IFG$0$0 == 0x0089 0089 88 _P0IFG = 0x0089 008A 89 Fdebugint$P1IFG$0$0 == 0x008a 008A 90 _P1IFG = 0x008a 008B 91 Fdebugint$P2IFG$0$0 == 0x008b 008B 92 _P2IFG = 0x008b 008C 93 Fdebugint$PICTL$0$0 == 0x008c 008C 94 _PICTL = 0x008c 008D 95 Fdebugint$P1IEN$0$0 == 0x008d 008D 96 _P1IEN = 0x008d 008F 97 Fdebugint$P0INP$0$0 == 0x008f 008F 98 _P0INP = 0x008f 0090 99 Fdebugint$P1$0$0 == 0x0090 0090 100 _P1 = 0x0090 0091 101 Fdebugint$RFIM$0$0 == 0x0091 0091 102 _RFIM = 0x0091 0092 103 Fdebugint$DPS$0$0 == 0x0092 0092 104 _DPS = 0x0092 0093 105 Fdebugint$MPAGE$0$0 == 0x0093 0093 106 _MPAGE = 0x0093 0095 107 Fdebugint$ENDIAN$0$0 == 0x0095 0095 108 _ENDIAN = 0x0095 0098 109 Fdebugint$S0CON$0$0 == 0x0098 0098 110 _S0CON = 0x0098 009A 111 Fdebugint$IEN2$0$0 == 0x009a 009A 112 _IEN2 = 0x009a 009B 113 Fdebugint$S1CON$0$0 == 0x009b 009B 114 _S1CON = 0x009b 009C 115 Fdebugint$T2CT$0$0 == 0x009c 009C 116 _T2CT = 0x009c 009D 117 Fdebugint$T2PR$0$0 == 0x009d 009D 118 _T2PR = 0x009d 009E 119 Fdebugint$T2CTL$0$0 == 0x009e 009E 120 _T2CTL = 0x009e 00A0 121 Fdebugint$P2$0$0 == 0x00a0 00A0 122 _P2 = 0x00a0 00A1 123 Fdebugint$WORIRQ$0$0 == 0x00a1 00A1 124 _WORIRQ = 0x00a1 00A2 125 Fdebugint$WORCTRL$0$0 == 0x00a2 00A2 126 _WORCTRL = 0x00a2 00A3 127 Fdebugint$WOREVT0$0$0 == 0x00a3 00A3 128 _WOREVT0 = 0x00a3 00A4 129 Fdebugint$WOREVT1$0$0 == 0x00a4 00A4 130 _WOREVT1 = 0x00a4 00A5 131 Fdebugint$WORTIME0$0$0 == 0x00a5 00A5 132 _WORTIME0 = 0x00a5 00A6 133 Fdebugint$WORTIME1$0$0 == 0x00a6 00A6 134 _WORTIME1 = 0x00a6 00A8 135 Fdebugint$IEN0$0$0 == 0x00a8 00A8 136 _IEN0 = 0x00a8 00A9 137 Fdebugint$IP0$0$0 == 0x00a9 00A9 138 _IP0 = 0x00a9 00AB 139 Fdebugint$FWT$0$0 == 0x00ab 00AB 140 _FWT = 0x00ab 00AC 141 Fdebugint$FADDRL$0$0 == 0x00ac 00AC 142 _FADDRL = 0x00ac 00AD 143 Fdebugint$FADDRH$0$0 == 0x00ad 00AD 144 _FADDRH = 0x00ad 00AE 145 Fdebugint$FCTL$0$0 == 0x00ae 00AE 146 _FCTL = 0x00ae 00AF 147 Fdebugint$FWDATA$0$0 == 0x00af 00AF 148 _FWDATA = 0x00af 00B1 149 Fdebugint$ENCDI$0$0 == 0x00b1 00B1 150 _ENCDI = 0x00b1 00B2 151 Fdebugint$ENCDO$0$0 == 0x00b2 00B2 152 _ENCDO = 0x00b2 00B3 153 Fdebugint$ENCCS$0$0 == 0x00b3 00B3 154 _ENCCS = 0x00b3 00B4 155 Fdebugint$ADCCON1$0$0 == 0x00b4 00B4 156 _ADCCON1 = 0x00b4 00B5 157 Fdebugint$ADCCON2$0$0 == 0x00b5 00B5 158 _ADCCON2 = 0x00b5 00B6 159 Fdebugint$ADCCON3$0$0 == 0x00b6 00B6 160 _ADCCON3 = 0x00b6 00B8 161 Fdebugint$IEN1$0$0 == 0x00b8 00B8 162 _IEN1 = 0x00b8 00B9 163 Fdebugint$IP1$0$0 == 0x00b9 00B9 164 _IP1 = 0x00b9 00BA 165 Fdebugint$ADCL$0$0 == 0x00ba 00BA 166 _ADCL = 0x00ba 00BB 167 Fdebugint$ADCH$0$0 == 0x00bb 00BB 168 _ADCH = 0x00bb 00BC 169 Fdebugint$RNDL$0$0 == 0x00bc 00BC 170 _RNDL = 0x00bc 00BD 171 Fdebugint$RNDH$0$0 == 0x00bd 00BD 172 _RNDH = 0x00bd 00BE 173 Fdebugint$SLEEP$0$0 == 0x00be 00BE 174 _SLEEP = 0x00be 00C0 175 Fdebugint$IRCON$0$0 == 0x00c0 00C0 176 _IRCON = 0x00c0 00C1 177 Fdebugint$U0DBUF$0$0 == 0x00c1 00C1 178 _U0DBUF = 0x00c1 00C2 179 Fdebugint$U0BAUD$0$0 == 0x00c2 00C2 180 _U0BAUD = 0x00c2 00C4 181 Fdebugint$U0UCR$0$0 == 0x00c4 00C4 182 _U0UCR = 0x00c4 00C5 183 Fdebugint$U0GCR$0$0 == 0x00c5 00C5 184 _U0GCR = 0x00c5 00C6 185 Fdebugint$CLKCON$0$0 == 0x00c6 00C6 186 _CLKCON = 0x00c6 00C7 187 Fdebugint$MEMCTR$0$0 == 0x00c7 00C7 188 _MEMCTR = 0x00c7 00C9 189 Fdebugint$WDCTL$0$0 == 0x00c9 00C9 190 _WDCTL = 0x00c9 00CA 191 Fdebugint$T3CNT$0$0 == 0x00ca 00CA 192 _T3CNT = 0x00ca 00CB 193 Fdebugint$T3CTL$0$0 == 0x00cb 00CB 194 _T3CTL = 0x00cb 00CC 195 Fdebugint$T3CCTL0$0$0 == 0x00cc 00CC 196 _T3CCTL0 = 0x00cc 00CD 197 Fdebugint$T3CC0$0$0 == 0x00cd 00CD 198 _T3CC0 = 0x00cd 00CE 199 Fdebugint$T3CCTL1$0$0 == 0x00ce 00CE 200 _T3CCTL1 = 0x00ce 00CF 201 Fdebugint$T3CC1$0$0 == 0x00cf 00CF 202 _T3CC1 = 0x00cf 00D0 203 Fdebugint$PSW$0$0 == 0x00d0 00D0 204 _PSW = 0x00d0 00D1 205 Fdebugint$DMAIRQ$0$0 == 0x00d1 00D1 206 _DMAIRQ = 0x00d1 00D2 207 Fdebugint$DMA1CFGL$0$0 == 0x00d2 00D2 208 _DMA1CFGL = 0x00d2 00D3 209 Fdebugint$DMA1CFGH$0$0 == 0x00d3 00D3 210 _DMA1CFGH = 0x00d3 00D4 211 Fdebugint$DMA0CFGL$0$0 == 0x00d4 00D4 212 _DMA0CFGL = 0x00d4 00D5 213 Fdebugint$DMA0CFGH$0$0 == 0x00d5 00D5 214 _DMA0CFGH = 0x00d5 00D6 215 Fdebugint$DMAARM$0$0 == 0x00d6 00D6 216 _DMAARM = 0x00d6 00D7 217 Fdebugint$DMAREQ$0$0 == 0x00d7 00D7 218 _DMAREQ = 0x00d7 00D8 219 Fdebugint$TIMIF$0$0 == 0x00d8 00D8 220 _TIMIF = 0x00d8 00D9 221 Fdebugint$RFD$0$0 == 0x00d9 00D9 222 _RFD = 0x00d9 00DA 223 Fdebugint$T1CC0L$0$0 == 0x00da 00DA 224 _T1CC0L = 0x00da 00DB 225 Fdebugint$T1CC0H$0$0 == 0x00db 00DB 226 _T1CC0H = 0x00db 00DC 227 Fdebugint$T1CC1L$0$0 == 0x00dc 00DC 228 _T1CC1L = 0x00dc 00DD 229 Fdebugint$T1CC1H$0$0 == 0x00dd 00DD 230 _T1CC1H = 0x00dd 00DE 231 Fdebugint$T1CC2L$0$0 == 0x00de 00DE 232 _T1CC2L = 0x00de 00DF 233 Fdebugint$T1CC2H$0$0 == 0x00df 00DF 234 _T1CC2H = 0x00df 00E0 235 Fdebugint$ACC$0$0 == 0x00e0 00E0 236 _ACC = 0x00e0 00E1 237 Fdebugint$RFST$0$0 == 0x00e1 00E1 238 _RFST = 0x00e1 00E2 239 Fdebugint$T1CNTL$0$0 == 0x00e2 00E2 240 _T1CNTL = 0x00e2 00E3 241 Fdebugint$T1CNTH$0$0 == 0x00e3 00E3 242 _T1CNTH = 0x00e3 00E4 243 Fdebugint$T1CTL$0$0 == 0x00e4 00E4 244 _T1CTL = 0x00e4 00E5 245 Fdebugint$T1CCTL0$0$0 == 0x00e5 00E5 246 _T1CCTL0 = 0x00e5 00E6 247 Fdebugint$T1CCTL1$0$0 == 0x00e6 00E6 248 _T1CCTL1 = 0x00e6 00E7 249 Fdebugint$T1CCTL2$0$0 == 0x00e7 00E7 250 _T1CCTL2 = 0x00e7 00E8 251 Fdebugint$IRCON2$0$0 == 0x00e8 00E8 252 _IRCON2 = 0x00e8 00E9 253 Fdebugint$RFIF$0$0 == 0x00e9 00E9 254 _RFIF = 0x00e9 00EA 255 Fdebugint$T4CNT$0$0 == 0x00ea 00EA 256 _T4CNT = 0x00ea 00EB 257 Fdebugint$T4CTL$0$0 == 0x00eb 00EB 258 _T4CTL = 0x00eb 00EC 259 Fdebugint$T4CCTL0$0$0 == 0x00ec 00EC 260 _T4CCTL0 = 0x00ec 00ED 261 Fdebugint$T4CC0$0$0 == 0x00ed 00ED 262 _T4CC0 = 0x00ed 00EE 263 Fdebugint$T4CCTL1$0$0 == 0x00ee 00EE 264 _T4CCTL1 = 0x00ee 00EF 265 Fdebugint$T4CC1$0$0 == 0x00ef 00EF 266 _T4CC1 = 0x00ef 00F0 267 Fdebugint$B$0$0 == 0x00f0 00F0 268 _B = 0x00f0 00F1 269 Fdebugint$PERCFG$0$0 == 0x00f1 00F1 270 _PERCFG = 0x00f1 00F2 271 Fdebugint$ADCCFG$0$0 == 0x00f2 00F2 272 _ADCCFG = 0x00f2 00F3 273 Fdebugint$P0SEL$0$0 == 0x00f3 00F3 274 _P0SEL = 0x00f3 00F4 275 Fdebugint$P1SEL$0$0 == 0x00f4 00F4 276 _P1SEL = 0x00f4 00F5 277 Fdebugint$P2SEL$0$0 == 0x00f5 00F5 278 _P2SEL = 0x00f5 00F6 279 Fdebugint$P1INP$0$0 == 0x00f6 00F6 280 _P1INP = 0x00f6 00F7 281 Fdebugint$P2INP$0$0 == 0x00f7 00F7 282 _P2INP = 0x00f7 00F8 283 Fdebugint$U1CSR$0$0 == 0x00f8 00F8 284 _U1CSR = 0x00f8 00F9 285 Fdebugint$U1DBUF$0$0 == 0x00f9 00F9 286 _U1DBUF = 0x00f9 00FA 287 Fdebugint$U1BAUD$0$0 == 0x00fa 00FA 288 _U1BAUD = 0x00fa 00FB 289 Fdebugint$U1UCR$0$0 == 0x00fb 00FB 290 _U1UCR = 0x00fb 00FC 291 Fdebugint$U1GCR$0$0 == 0x00fc 00FC 292 _U1GCR = 0x00fc 00FD 293 Fdebugint$P0DIR$0$0 == 0x00fd 00FD 294 _P0DIR = 0x00fd 00FE 295 Fdebugint$P1DIR$0$0 == 0x00fe 00FE 296 _P1DIR = 0x00fe 00FF 297 Fdebugint$P2DIR$0$0 == 0x00ff 00FF 298 _P2DIR = 0x00ff FFFFD5D4 299 Fdebugint$DMA0CFG$0$0 == 0xffffd5d4 FFFFD5D4 300 _DMA0CFG = 0xffffd5d4 FFFFD3D2 301 Fdebugint$DMA1CFG$0$0 == 0xffffd3d2 FFFFD3D2 302 _DMA1CFG = 0xffffd3d2 FFFFADAC 303 Fdebugint$FADDR$0$0 == 0xffffadac FFFFADAC 304 _FADDR = 0xffffadac FFFFBBBA 305 Fdebugint$ADC$0$0 == 0xffffbbba FFFFBBBA 306 _ADC = 0xffffbbba FFFFDBDA 307 Fdebugint$T1CC0$0$0 == 0xffffdbda FFFFDBDA 308 _T1CC0 = 0xffffdbda FFFFDDDC 309 Fdebugint$T1CC1$0$0 == 0xffffdddc FFFFDDDC 310 _T1CC1 = 0xffffdddc FFFFDFDE 311 Fdebugint$T1CC2$0$0 == 0xffffdfde FFFFDFDE 312 _T1CC2 = 0xffffdfde 313 ;-------------------------------------------------------- 314 ; special function bits 315 ;-------------------------------------------------------- 316 .area RSEG (ABS,DATA) 0000 317 .org 0x0000 0080 318 Fdebugint$P0_0$0$0 == 0x0080 0080 319 _P0_0 = 0x0080 0081 320 Fdebugint$P0_1$0$0 == 0x0081 0081 321 _P0_1 = 0x0081 0082 322 Fdebugint$P0_2$0$0 == 0x0082 0082 323 _P0_2 = 0x0082 0083 324 Fdebugint$P0_3$0$0 == 0x0083 0083 325 _P0_3 = 0x0083 0084 326 Fdebugint$P0_4$0$0 == 0x0084 0084 327 _P0_4 = 0x0084 0085 328 Fdebugint$P0_5$0$0 == 0x0085 0085 329 _P0_5 = 0x0085 0086 330 Fdebugint$P0_6$0$0 == 0x0086 0086 331 _P0_6 = 0x0086 0087 332 Fdebugint$P0_7$0$0 == 0x0087 0087 333 _P0_7 = 0x0087 0088 334 Fdebugint$_TCON_0$0$0 == 0x0088 0088 335 __TCON_0 = 0x0088 0089 336 Fdebugint$RFTXRXIF$0$0 == 0x0089 0089 337 _RFTXRXIF = 0x0089 008A 338 Fdebugint$_TCON_2$0$0 == 0x008a 008A 339 __TCON_2 = 0x008a 008B 340 Fdebugint$URX0IF$0$0 == 0x008b 008B 341 _URX0IF = 0x008b 008C 342 Fdebugint$_TCON_4$0$0 == 0x008c 008C 343 __TCON_4 = 0x008c 008D 344 Fdebugint$ADCIF$0$0 == 0x008d 008D 345 _ADCIF = 0x008d 008E 346 Fdebugint$_TCON_6$0$0 == 0x008e 008E 347 __TCON_6 = 0x008e 008F 348 Fdebugint$URX1IF$0$0 == 0x008f 008F 349 _URX1IF = 0x008f 0090 350 Fdebugint$P1_0$0$0 == 0x0090 0090 351 _P1_0 = 0x0090 0091 352 Fdebugint$P1_1$0$0 == 0x0091 0091 353 _P1_1 = 0x0091 0092 354 Fdebugint$P1_2$0$0 == 0x0092 0092 355 _P1_2 = 0x0092 0093 356 Fdebugint$P1_3$0$0 == 0x0093 0093 357 _P1_3 = 0x0093 0094 358 Fdebugint$P1_4$0$0 == 0x0094 0094 359 _P1_4 = 0x0094 0095 360 Fdebugint$P1_5$0$0 == 0x0095 0095 361 _P1_5 = 0x0095 0096 362 Fdebugint$P1_6$0$0 == 0x0096 0096 363 _P1_6 = 0x0096 0097 364 Fdebugint$P1_7$0$0 == 0x0097 0097 365 _P1_7 = 0x0097 0098 366 Fdebugint$ENCIF_0$0$0 == 0x0098 0098 367 _ENCIF_0 = 0x0098 0099 368 Fdebugint$ENCIF_1$0$0 == 0x0099 0099 369 _ENCIF_1 = 0x0099 009A 370 Fdebugint$_SOCON2$0$0 == 0x009a 009A 371 __SOCON2 = 0x009a 009B 372 Fdebugint$_SOCON3$0$0 == 0x009b 009B 373 __SOCON3 = 0x009b 009C 374 Fdebugint$_SOCON4$0$0 == 0x009c 009C 375 __SOCON4 = 0x009c 009D 376 Fdebugint$_SOCON5$0$0 == 0x009d 009D 377 __SOCON5 = 0x009d 009E 378 Fdebugint$_SOCON6$0$0 == 0x009e 009E 379 __SOCON6 = 0x009e 009F 380 Fdebugint$_SOCON7$0$0 == 0x009f 009F 381 __SOCON7 = 0x009f 00A0 382 Fdebugint$P2_0$0$0 == 0x00a0 00A0 383 _P2_0 = 0x00a0 00A1 384 Fdebugint$P2_1$0$0 == 0x00a1 00A1 385 _P2_1 = 0x00a1 00A2 386 Fdebugint$P2_2$0$0 == 0x00a2 00A2 387 _P2_2 = 0x00a2 00A3 388 Fdebugint$P2_3$0$0 == 0x00a3 00A3 389 _P2_3 = 0x00a3 00A4 390 Fdebugint$P2_4$0$0 == 0x00a4 00A4 391 _P2_4 = 0x00a4 00A5 392 Fdebugint$P2_5$0$0 == 0x00a5 00A5 393 _P2_5 = 0x00a5 00A6 394 Fdebugint$P2_6$0$0 == 0x00a6 00A6 395 _P2_6 = 0x00a6 00A7 396 Fdebugint$P2_7$0$0 == 0x00a7 00A7 397 _P2_7 = 0x00a7 00A8 398 Fdebugint$RFTXRXIE$0$0 == 0x00a8 00A8 399 _RFTXRXIE = 0x00a8 00A9 400 Fdebugint$ADCIE$0$0 == 0x00a9 00A9 401 _ADCIE = 0x00a9 00AA 402 Fdebugint$URX0IE$0$0 == 0x00aa 00AA 403 _URX0IE = 0x00aa 00AB 404 Fdebugint$URX1IE$0$0 == 0x00ab 00AB 405 _URX1IE = 0x00ab 00AC 406 Fdebugint$ENCIE$0$0 == 0x00ac 00AC 407 _ENCIE = 0x00ac 00AD 408 Fdebugint$STIE$0$0 == 0x00ad 00AD 409 _STIE = 0x00ad 00AE 410 Fdebugint$_IEN06$0$0 == 0x00ae 00AE 411 __IEN06 = 0x00ae 00AF 412 Fdebugint$EA$0$0 == 0x00af 00AF 413 _EA = 0x00af 00B8 414 Fdebugint$DMAIE$0$0 == 0x00b8 00B8 415 _DMAIE = 0x00b8 00B9 416 Fdebugint$T1IE$0$0 == 0x00b9 00B9 417 _T1IE = 0x00b9 00BA 418 Fdebugint$T2IE$0$0 == 0x00ba 00BA 419 _T2IE = 0x00ba 00BB 420 Fdebugint$T3IE$0$0 == 0x00bb 00BB 421 _T3IE = 0x00bb 00BC 422 Fdebugint$T4IE$0$0 == 0x00bc 00BC 423 _T4IE = 0x00bc 00BD 424 Fdebugint$P0IE$0$0 == 0x00bd 00BD 425 _P0IE = 0x00bd 00BE 426 Fdebugint$_IEN16$0$0 == 0x00be 00BE 427 __IEN16 = 0x00be 00BF 428 Fdebugint$_IEN17$0$0 == 0x00bf 00BF 429 __IEN17 = 0x00bf 00C0 430 Fdebugint$DMAIF$0$0 == 0x00c0 00C0 431 _DMAIF = 0x00c0 00C1 432 Fdebugint$T1IF$0$0 == 0x00c1 00C1 433 _T1IF = 0x00c1 00C2 434 Fdebugint$T2IF$0$0 == 0x00c2 00C2 435 _T2IF = 0x00c2 00C3 436 Fdebugint$T3IF$0$0 == 0x00c3 00C3 437 _T3IF = 0x00c3 00C4 438 Fdebugint$T4IF$0$0 == 0x00c4 00C4 439 _T4IF = 0x00c4 00C5 440 Fdebugint$P0IF$0$0 == 0x00c5 00C5 441 _P0IF = 0x00c5 00C6 442 Fdebugint$_IRCON6$0$0 == 0x00c6 00C6 443 __IRCON6 = 0x00c6 00C7 444 Fdebugint$STIF$0$0 == 0x00c7 00C7 445 _STIF = 0x00c7 00D0 446 Fdebugint$P$0$0 == 0x00d0 00D0 447 _P = 0x00d0 00D1 448 Fdebugint$F1$0$0 == 0x00d1 00D1 449 _F1 = 0x00d1 00D2 450 Fdebugint$OV$0$0 == 0x00d2 00D2 451 _OV = 0x00d2 00D3 452 Fdebugint$RS0$0$0 == 0x00d3 00D3 453 _RS0 = 0x00d3 00D4 454 Fdebugint$RS1$0$0 == 0x00d4 00D4 455 _RS1 = 0x00d4 00D5 456 Fdebugint$F0$0$0 == 0x00d5 00D5 457 _F0 = 0x00d5 00D6 458 Fdebugint$AC$0$0 == 0x00d6 00D6 459 _AC = 0x00d6 00D7 460 Fdebugint$CY$0$0 == 0x00d7 00D7 461 _CY = 0x00d7 00D8 462 Fdebugint$T3OVFIF$0$0 == 0x00d8 00D8 463 _T3OVFIF = 0x00d8 00D9 464 Fdebugint$T3CH0IF$0$0 == 0x00d9 00D9 465 _T3CH0IF = 0x00d9 00DA 466 Fdebugint$T3CH1IF$0$0 == 0x00da 00DA 467 _T3CH1IF = 0x00da 00DB 468 Fdebugint$T4OVFIF$0$0 == 0x00db 00DB 469 _T4OVFIF = 0x00db 00DC 470 Fdebugint$T4CH0IF$0$0 == 0x00dc 00DC 471 _T4CH0IF = 0x00dc 00DD 472 Fdebugint$T4CH1IF$0$0 == 0x00dd 00DD 473 _T4CH1IF = 0x00dd 00DE 474 Fdebugint$OVFIM$0$0 == 0x00de 00DE 475 _OVFIM = 0x00de 00DF 476 Fdebugint$_TIMIF7$0$0 == 0x00df 00DF 477 __TIMIF7 = 0x00df 00E0 478 Fdebugint$ACC_0$0$0 == 0x00e0 00E0 479 _ACC_0 = 0x00e0 00E1 480 Fdebugint$ACC_1$0$0 == 0x00e1 00E1 481 _ACC_1 = 0x00e1 00E2 482 Fdebugint$ACC_2$0$0 == 0x00e2 00E2 483 _ACC_2 = 0x00e2 00E3 484 Fdebugint$ACC_3$0$0 == 0x00e3 00E3 485 _ACC_3 = 0x00e3 00E4 486 Fdebugint$ACC_4$0$0 == 0x00e4 00E4 487 _ACC_4 = 0x00e4 00E5 488 Fdebugint$ACC_5$0$0 == 0x00e5 00E5 489 _ACC_5 = 0x00e5 00E6 490 Fdebugint$ACC_6$0$0 == 0x00e6 00E6 491 _ACC_6 = 0x00e6 00E7 492 Fdebugint$ACC_7$0$0 == 0x00e7 00E7 493 _ACC_7 = 0x00e7 00E8 494 Fdebugint$P2IF$0$0 == 0x00e8 00E8 495 _P2IF = 0x00e8 00E9 496 Fdebugint$UTX0IF$0$0 == 0x00e9 00E9 497 _UTX0IF = 0x00e9 00EA 498 Fdebugint$UTX1IF$0$0 == 0x00ea 00EA 499 _UTX1IF = 0x00ea 00EB 500 Fdebugint$P1IF$0$0 == 0x00eb 00EB 501 _P1IF = 0x00eb 00EC 502 Fdebugint$WDTIF$0$0 == 0x00ec 00EC 503 _WDTIF = 0x00ec 00ED 504 Fdebugint$_IRCON25$0$0 == 0x00ed 00ED 505 __IRCON25 = 0x00ed 00EE 506 Fdebugint$_IRCON26$0$0 == 0x00ee 00EE 507 __IRCON26 = 0x00ee 00EF 508 Fdebugint$_IRCON27$0$0 == 0x00ef 00EF 509 __IRCON27 = 0x00ef 00F0 510 Fdebugint$B_0$0$0 == 0x00f0 00F0 511 _B_0 = 0x00f0 00F1 512 Fdebugint$B_1$0$0 == 0x00f1 00F1 513 _B_1 = 0x00f1 00F2 514 Fdebugint$B_2$0$0 == 0x00f2 00F2 515 _B_2 = 0x00f2 00F3 516 Fdebugint$B_3$0$0 == 0x00f3 00F3 517 _B_3 = 0x00f3 00F4 518 Fdebugint$B_4$0$0 == 0x00f4 00F4 519 _B_4 = 0x00f4 00F5 520 Fdebugint$B_5$0$0 == 0x00f5 00F5 521 _B_5 = 0x00f5 00F6 522 Fdebugint$B_6$0$0 == 0x00f6 00F6 523 _B_6 = 0x00f6 00F7 524 Fdebugint$B_7$0$0 == 0x00f7 00F7 525 _B_7 = 0x00f7 00F8 526 Fdebugint$U1ACTIVE$0$0 == 0x00f8 00F8 527 _U1ACTIVE = 0x00f8 00F9 528 Fdebugint$U1TX_BYTE$0$0 == 0x00f9 00F9 529 _U1TX_BYTE = 0x00f9 00FA 530 Fdebugint$U1RX_BYTE$0$0 == 0x00fa 00FA 531 _U1RX_BYTE = 0x00fa 00FB 532 Fdebugint$U1ERR$0$0 == 0x00fb 00FB 533 _U1ERR = 0x00fb 00FC 534 Fdebugint$U1FE$0$0 == 0x00fc 00FC 535 _U1FE = 0x00fc 00FD 536 Fdebugint$U1SLAVE$0$0 == 0x00fd 00FD 537 _U1SLAVE = 0x00fd 00FE 538 Fdebugint$U1RE$0$0 == 0x00fe 00FE 539 _U1RE = 0x00fe 00FF 540 Fdebugint$U1MODE$0$0 == 0x00ff 00FF 541 _U1MODE = 0x00ff 542 ;-------------------------------------------------------- 543 ; overlayable register banks 544 ;-------------------------------------------------------- 545 .area REG_BANK_0 (REL,OVR,DATA) 0000 546 .ds 8 547 ;-------------------------------------------------------- 548 ; overlayable bit register bank 549 ;-------------------------------------------------------- 550 .area BIT_BANK (REL,OVR,DATA) 0000 551 bits: 0000 552 .ds 1 8000 553 b0 = bits[0] 8100 554 b1 = bits[1] 8200 555 b2 = bits[2] 8300 556 b3 = bits[3] 8400 557 b4 = bits[4] 8500 558 b5 = bits[5] 8600 559 b6 = bits[6] 8700 560 b7 = bits[7] 561 ;-------------------------------------------------------- 562 ; internal ram data 563 ;-------------------------------------------------------- 564 .area DSEG (DATA) 0000 565 Lsend_Canmsg_wait$sloc0$1$0==. 0000 566 _send_Canmsg_wait_sloc0_1_0: 0000 567 .ds 2 0002 568 Lget_Canmsg$sloc0$1$0==. 0002 569 _get_Canmsg_sloc0_1_0: 0002 570 .ds 3 0005 571 Lget_Canmsg$sloc1$1$0==. 0005 572 _get_Canmsg_sloc1_1_0: 0005 573 .ds 1 0006 574 Lget_Canmsg$sloc2$1$0==. 0006 575 _get_Canmsg_sloc2_1_0: 0006 576 .ds 1 0007 577 Lget_Canmsg$sloc3$1$0==. 0007 578 _get_Canmsg_sloc3_1_0: 0007 579 .ds 1 0008 580 Lget_Canmsg$sloc4$1$0==. 0008 581 _get_Canmsg_sloc4_1_0: 0008 582 .ds 2 000A 583 Lget_Canmsg$sloc5$1$0==. 000A 584 _get_Canmsg_sloc5_1_0: 000A 585 .ds 3 000D 586 G$msg2$0$0==. 000D 587 _msg2:: 000D 588 .ds 11 0018 589 Lmain$sloc0$1$0==. 0018 590 _main_sloc0_1_0: 0018 591 .ds 1 0019 592 Lmain$sloc1$1$0==. 0019 593 _main_sloc1_1_0: 0019 594 .ds 4 001D 595 Lmain$sloc2$1$0==. 001D 596 _main_sloc2_1_0: 001D 597 .ds 2 598 ;-------------------------------------------------------- 599 ; overlayable items in internal ram 600 ;-------------------------------------------------------- 601 .area OSEG (OVR,DATA) 602 ;-------------------------------------------------------- 603 ; Stack segment in internal ram 604 ;-------------------------------------------------------- 605 .area SSEG (DATA) 0000 606 __start__stack: 0000 607 .ds 1 608 609 ;-------------------------------------------------------- 610 ; indirectly addressable internal ram data 611 ;-------------------------------------------------------- 612 .area ISEG (DATA) 613 ;-------------------------------------------------------- 614 ; absolute internal ram data 615 ;-------------------------------------------------------- 616 .area IABS (ABS,DATA) 617 .area IABS (ABS,DATA) 618 ;-------------------------------------------------------- 619 ; bit data 620 ;-------------------------------------------------------- 621 .area BSEG (BIT) 622 ;-------------------------------------------------------- 623 ; paged external ram data 624 ;-------------------------------------------------------- 625 .area PSEG (PAG,XDATA) 0000 626 Lwrite_can_reg$val$1$1==. 0000 627 _write_can_reg_PARM_2: 0000 628 .ds 1 0001 629 Lsend_Canmsg_wait$msg$1$1==. 0001 630 _send_Canmsg_wait_msg_1_1: 0001 631 .ds 3 0004 632 Lsend_Canmsg_wait$i$1$1==. 0004 633 _send_Canmsg_wait_i_1_1: 0004 634 .ds 2 0006 635 Lsend_Canmsg_wait$sent$1$1==. 0006 636 _send_Canmsg_wait_sent_1_1: 0006 637 .ds 1 0007 638 Lget_Canmsg$msg$1$1==. 0007 639 _get_Canmsg_msg_1_1: 0007 640 .ds 3 000A 641 G$accelprocY$0$0==. 000A 642 _accelprocY:: 000A 643 .ds 2 000C 644 G$accelprocX$0$0==. 000C 645 _accelprocX:: 000C 646 .ds 2 000E 647 G$accelprocZ$0$0==. 000E 648 _accelprocZ:: 000E 649 .ds 2 0010 650 G$accelrawY$0$0==. 0010 651 _accelrawY:: 0010 652 .ds 2 0012 653 G$accelrawX$0$0==. 0012 654 _accelrawX:: 0012 655 .ds 2 0014 656 G$accelrawZ$0$0==. 0014 657 _accelrawZ:: 0014 658 .ds 2 0016 659 G$euler_psi$0$0==. 0016 660 _euler_psi:: 0016 661 .ds 2 0018 662 G$euler_phi$0$0==. 0018 663 _euler_phi:: 0018 664 .ds 2 001A 665 G$euler_theta$0$0==. 001A 666 _euler_theta:: 001A 667 .ds 2 001C 668 G$gyroprocY$0$0==. 001C 669 _gyroprocY:: 001C 670 .ds 2 001E 671 G$gyroprocX$0$0==. 001E 672 _gyroprocX:: 001E 673 .ds 2 0020 674 G$gyroprocZ$0$0==. 0020 675 _gyroprocZ:: 0020 676 .ds 2 0022 677 G$txpkt$0$0==. 0022 678 _txpkt:: 0022 679 .ds 2 680 ;-------------------------------------------------------- 681 ; external ram data 682 ;-------------------------------------------------------- 683 .area XSEG (XDATA) DF00 684 Fdebugint$SYNC1$0$0 == 0xdf00 DF00 685 _SYNC1 = 0xdf00 DF01 686 Fdebugint$SYNC0$0$0 == 0xdf01 DF01 687 _SYNC0 = 0xdf01 DF02 688 Fdebugint$PKTLEN$0$0 == 0xdf02 DF02 689 _PKTLEN = 0xdf02 DF03 690 Fdebugint$PKTCTRL1$0$0 == 0xdf03 DF03 691 _PKTCTRL1 = 0xdf03 DF04 692 Fdebugint$PKTCTRL0$0$0 == 0xdf04 DF04 693 _PKTCTRL0 = 0xdf04 DF05 694 Fdebugint$ADDR$0$0 == 0xdf05 DF05 695 _ADDR = 0xdf05 DF06 696 Fdebugint$CHANNR$0$0 == 0xdf06 DF06 697 _CHANNR = 0xdf06 DF07 698 Fdebugint$FSCTRL1$0$0 == 0xdf07 DF07 699 _FSCTRL1 = 0xdf07 DF08 700 Fdebugint$FSCTRL0$0$0 == 0xdf08 DF08 701 _FSCTRL0 = 0xdf08 DF09 702 Fdebugint$FREQ2$0$0 == 0xdf09 DF09 703 _FREQ2 = 0xdf09 DF0A 704 Fdebugint$FREQ1$0$0 == 0xdf0a DF0A 705 _FREQ1 = 0xdf0a DF0B 706 Fdebugint$FREQ0$0$0 == 0xdf0b DF0B 707 _FREQ0 = 0xdf0b DF0C 708 Fdebugint$MDMCFG4$0$0 == 0xdf0c DF0C 709 _MDMCFG4 = 0xdf0c DF0D 710 Fdebugint$MDMCFG3$0$0 == 0xdf0d DF0D 711 _MDMCFG3 = 0xdf0d DF0E 712 Fdebugint$MDMCFG2$0$0 == 0xdf0e DF0E 713 _MDMCFG2 = 0xdf0e DF0F 714 Fdebugint$MDMCFG1$0$0 == 0xdf0f DF0F 715 _MDMCFG1 = 0xdf0f DF10 716 Fdebugint$MDMCFG0$0$0 == 0xdf10 DF10 717 _MDMCFG0 = 0xdf10 DF11 718 Fdebugint$DEVIATN$0$0 == 0xdf11 DF11 719 _DEVIATN = 0xdf11 DF12 720 Fdebugint$MCSM2$0$0 == 0xdf12 DF12 721 _MCSM2 = 0xdf12 DF13 722 Fdebugint$MCSM1$0$0 == 0xdf13 DF13 723 _MCSM1 = 0xdf13 DF14 724 Fdebugint$MCSM0$0$0 == 0xdf14 DF14 725 _MCSM0 = 0xdf14 DF15 726 Fdebugint$FOCCFG$0$0 == 0xdf15 DF15 727 _FOCCFG = 0xdf15 DF16 728 Fdebugint$BSCFG$0$0 == 0xdf16 DF16 729 _BSCFG = 0xdf16 DF17 730 Fdebugint$AGCCTRL2$0$0 == 0xdf17 DF17 731 _AGCCTRL2 = 0xdf17 DF18 732 Fdebugint$AGCCTRL1$0$0 == 0xdf18 DF18 733 _AGCCTRL1 = 0xdf18 DF19 734 Fdebugint$AGCCTRL0$0$0 == 0xdf19 DF19 735 _AGCCTRL0 = 0xdf19 DF1A 736 Fdebugint$FREND1$0$0 == 0xdf1a DF1A 737 _FREND1 = 0xdf1a DF1B 738 Fdebugint$FREND0$0$0 == 0xdf1b DF1B 739 _FREND0 = 0xdf1b DF1C 740 Fdebugint$FSCAL3$0$0 == 0xdf1c DF1C 741 _FSCAL3 = 0xdf1c DF1D 742 Fdebugint$FSCAL2$0$0 == 0xdf1d DF1D 743 _FSCAL2 = 0xdf1d DF1E 744 Fdebugint$FSCAL1$0$0 == 0xdf1e DF1E 745 _FSCAL1 = 0xdf1e DF1F 746 Fdebugint$FSCAL0$0$0 == 0xdf1f DF1F 747 _FSCAL0 = 0xdf1f DF23 748 Fdebugint$TEST2$0$0 == 0xdf23 DF23 749 _TEST2 = 0xdf23 DF24 750 Fdebugint$TEST1$0$0 == 0xdf24 DF24 751 _TEST1 = 0xdf24 DF25 752 Fdebugint$TEST0$0$0 == 0xdf25 DF25 753 _TEST0 = 0xdf25 DF2E 754 Fdebugint$PA_TABLE0$0$0 == 0xdf2e DF2E 755 _PA_TABLE0 = 0xdf2e DF2F 756 Fdebugint$IOCFG2$0$0 == 0xdf2f DF2F 757 _IOCFG2 = 0xdf2f DF30 758 Fdebugint$IOCFG1$0$0 == 0xdf30 DF30 759 _IOCFG1 = 0xdf30 DF31 760 Fdebugint$IOCFG0$0$0 == 0xdf31 DF31 761 _IOCFG0 = 0xdf31 DF36 762 Fdebugint$PARTNUM$0$0 == 0xdf36 DF36 763 _PARTNUM = 0xdf36 DF37 764 Fdebugint$VERSION$0$0 == 0xdf37 DF37 765 _VERSION = 0xdf37 DF38 766 Fdebugint$FREQEST$0$0 == 0xdf38 DF38 767 _FREQEST = 0xdf38 DF39 768 Fdebugint$LQI$0$0 == 0xdf39 DF39 769 _LQI = 0xdf39 DF3A 770 Fdebugint$RSSI$0$0 == 0xdf3a DF3A 771 _RSSI = 0xdf3a DF3B 772 Fdebugint$MARCSTATE$0$0 == 0xdf3b DF3B 773 _MARCSTATE = 0xdf3b DF3C 774 Fdebugint$PKTSTATUS$0$0 == 0xdf3c DF3C 775 _PKTSTATUS = 0xdf3c DF3D 776 Fdebugint$VCO_VC_DAC$0$0 == 0xdf3d DF3D 777 _VCO_VC_DAC = 0xdf3d DF40 778 Fdebugint$I2SCFG0$0$0 == 0xdf40 DF40 779 _I2SCFG0 = 0xdf40 DF41 780 Fdebugint$I2SCFG1$0$0 == 0xdf41 DF41 781 _I2SCFG1 = 0xdf41 DF42 782 Fdebugint$I2SDATL$0$0 == 0xdf42 DF42 783 _I2SDATL = 0xdf42 DF43 784 Fdebugint$I2SDATH$0$0 == 0xdf43 DF43 785 _I2SDATH = 0xdf43 DF44 786 Fdebugint$I2SWCNT$0$0 == 0xdf44 DF44 787 _I2SWCNT = 0xdf44 DF45 788 Fdebugint$I2SSTAT$0$0 == 0xdf45 DF45 789 _I2SSTAT = 0xdf45 DF46 790 Fdebugint$I2SCLKF0$0$0 == 0xdf46 DF46 791 _I2SCLKF0 = 0xdf46 DF47 792 Fdebugint$I2SCLKF1$0$0 == 0xdf47 DF47 793 _I2SCLKF1 = 0xdf47 DF48 794 Fdebugint$I2SCLKF2$0$0 == 0xdf48 DF48 795 _I2SCLKF2 = 0xdf48 DE00 796 Fdebugint$USBADDR$0$0 == 0xde00 DE00 797 _USBADDR = 0xde00 DE01 798 Fdebugint$USBPOW$0$0 == 0xde01 DE01 799 _USBPOW = 0xde01 DE02 800 Fdebugint$USBIIF$0$0 == 0xde02 DE02 801 _USBIIF = 0xde02 DE04 802 Fdebugint$USBOIF$0$0 == 0xde04 DE04 803 _USBOIF = 0xde04 DE06 804 Fdebugint$USBCIF$0$0 == 0xde06 DE06 805 _USBCIF = 0xde06 DE07 806 Fdebugint$USBIIE$0$0 == 0xde07 DE07 807 _USBIIE = 0xde07 DE09 808 Fdebugint$USBOIE$0$0 == 0xde09 DE09 809 _USBOIE = 0xde09 DE0B 810 Fdebugint$USBCIE$0$0 == 0xde0b DE0B 811 _USBCIE = 0xde0b DE0C 812 Fdebugint$USBFRML$0$0 == 0xde0c DE0C 813 _USBFRML = 0xde0c DE0D 814 Fdebugint$USBFRMH$0$0 == 0xde0d DE0D 815 _USBFRMH = 0xde0d DE0E 816 Fdebugint$USBINDEX$0$0 == 0xde0e DE0E 817 _USBINDEX = 0xde0e DE10 818 Fdebugint$USBMAXI$0$0 == 0xde10 DE10 819 _USBMAXI = 0xde10 DE11 820 Fdebugint$USBCSIL$0$0 == 0xde11 DE11 821 _USBCSIL = 0xde11 DE12 822 Fdebugint$USBCSIH$0$0 == 0xde12 DE12 823 _USBCSIH = 0xde12 DE13 824 Fdebugint$USBMAXO$0$0 == 0xde13 DE13 825 _USBMAXO = 0xde13 DE14 826 Fdebugint$USBCSOL$0$0 == 0xde14 DE14 827 _USBCSOL = 0xde14 DE15 828 Fdebugint$USBCSOH$0$0 == 0xde15 DE15 829 _USBCSOH = 0xde15 DE16 830 Fdebugint$USBCNTL$0$0 == 0xde16 DE16 831 _USBCNTL = 0xde16 DE17 832 Fdebugint$USBCNTH$0$0 == 0xde17 DE17 833 _USBCNTH = 0xde17 DE20 834 Fdebugint$USBF0$0$0 == 0xde20 DE20 835 _USBF0 = 0xde20 DE22 836 Fdebugint$USBF1$0$0 == 0xde22 DE22 837 _USBF1 = 0xde22 DE24 838 Fdebugint$USBF2$0$0 == 0xde24 DE24 839 _USBF2 = 0xde24 DE26 840 Fdebugint$USBF3$0$0 == 0xde26 DE26 841 _USBF3 = 0xde26 DE28 842 Fdebugint$USBF4$0$0 == 0xde28 DE28 843 _USBF4 = 0xde28 DE2A 844 Fdebugint$USBF5$0$0 == 0xde2a DE2A 845 _USBF5 = 0xde2a 846 ;-------------------------------------------------------- 847 ; absolute external ram data 848 ;-------------------------------------------------------- 849 .area XABS (ABS,XDATA) 850 ;-------------------------------------------------------- 851 ; external initialized ram data 852 ;-------------------------------------------------------- 853 .area XISEG (XDATA) 0000 854 G$txdata2$0$0==. 0000 855 _txdata2:: 0000 856 .ds 14 000E 857 G$rxdata$0$0==. 000E 858 _rxdata:: 000E 859 .ds 14 001C 860 G$txdata$0$0==. 001C 861 _txdata:: 001C 862 .ds 14 002A 863 G$IMU_txdata$0$0==. 002A 864 _IMU_txdata:: 002A 865 .ds 8 0032 866 G$IMU_rxdata$0$0==. 0032 867 _IMU_rxdata:: 0032 868 .ds 8 869 .area HOME (CODE) 870 .area GSINIT0 (CODE) 871 .area GSINIT1 (CODE) 872 .area GSINIT2 (CODE) 873 .area GSINIT3 (CODE) 874 .area GSINIT4 (CODE) 875 .area GSINIT5 (CODE) 876 .area GSINIT (CODE) 877 .area GSFINAL (CODE) 878 .area CSEG (CODE) 879 ;-------------------------------------------------------- 880 ; interrupt vector 881 ;-------------------------------------------------------- 882 .area HOME (CODE) 0000 883 __interrupt_vect: 0000 02s00r00 884 ljmp __sdcc_gsinit_startup 0003 32 885 reti 0004 886 .ds 7 000B 32 887 reti 000C 888 .ds 7 0013 02s00r00 889 ljmp _ISR_URX0 0016 890 .ds 5 001B 02s00r00 891 ljmp _ISR_URX1 001E 892 .ds 5 0023 32 893 reti 0024 894 .ds 7 002B 32 895 reti 002C 896 .ds 7 0033 32 897 reti 0034 898 .ds 7 003B 32 899 reti 003C 900 .ds 7 0043 32 901 reti 0044 902 .ds 7 004B 32 903 reti 004C 904 .ds 7 0053 32 905 reti 0054 906 .ds 7 005B 32 907 reti 005C 908 .ds 7 0063 02s00r00 909 ljmp _ISR_T4 0066 910 .ds 5 006B 32 911 reti 006C 912 .ds 7 0073 32 913 reti 0074 914 .ds 7 007B 32 915 reti 007C 916 .ds 7 0083 02s00r00 917 ljmp _ISR_RF 918 ;-------------------------------------------------------- 919 ; global & static initialisations 920 ;-------------------------------------------------------- 921 .area HOME (CODE) 922 .area GSINIT (CODE) 923 .area GSFINAL (CODE) 924 .area GSINIT (CODE) 925 .globl __sdcc_gsinit_startup 926 .globl __sdcc_program_startup 927 .globl __start__stack 928 .globl __mcs51_genXINIT 929 .globl __mcs51_genXRAMCLEAR 930 .globl __mcs51_genRAMCLEAR 0000 931 G$main$0$0 ==. 0000 932 C$debugint.c$13$1$1 ==. 933 ; apps/debugint/debugint.c:13: uint8 XDATA *txpkt = 0; 0000 78r22 934 mov r0,#_txpkt 0002 E4 935 clr a 0003 F2 936 movx @r0,a 0004 08 937 inc r0 0005 F2 938 movx @r0,a 939 .area GSFINAL (CODE) 0000 02s00r86 940 ljmp __sdcc_program_startup 941 ;-------------------------------------------------------- 942 ; Home 943 ;-------------------------------------------------------- 944 .area HOME (CODE) 945 .area HOME (CODE) 0086 946 __sdcc_program_startup: 0086 12s09r23 947 lcall _main 948 ; return from main will lock up 0089 80 FE 949 sjmp . 950 ;-------------------------------------------------------- 951 ; code 952 ;-------------------------------------------------------- 953 .area CSEG (CODE) 954 ;------------------------------------------------------------ 955 ;Allocation info for local variables in function 'Can_init' 956 ;------------------------------------------------------------ 957 ;------------------------------------------------------------ 0000 958 G$Can_init$0$0 ==. 0000 959 C$CAN.c$38$0$0 ==. 960 ; apps/debugint/../CAN.c:38: void Can_init(uint8 baudrate){ 961 ; ----------------------------------------- 962 ; function Can_init 963 ; ----------------------------------------- 0000 964 _Can_init: 0002 965 ar2 = 0x02 0003 966 ar3 = 0x03 0004 967 ar4 = 0x04 0005 968 ar5 = 0x05 0006 969 ar6 = 0x06 0007 970 ar7 = 0x07 0000 971 ar0 = 0x00 0001 972 ar1 = 0x01 0000 AA 82 973 mov r2,dpl 0002 974 C$CAN.c$43$1$1 ==. 975 ; apps/debugint/../CAN.c:43: spiCANMasterInit(); 0002 C0 02 976 push ar2 0004 12s00r00 977 lcall _spi0MasterInit 0007 978 C$CAN.c$44$1$1 ==. 979 ; apps/debugint/../CAN.c:44: spiCANMasterSetFrequency(230400); 0007 90 84 00 980 mov dptr,#0x8400 000A 75 F0 03 981 mov b,#0x03 000D E4 982 clr a 000E 12s00r00 983 lcall _spi0MasterSetFrequency 0011 984 C$CAN.c$45$1$1 ==. 985 ; apps/debugint/../CAN.c:45: spiCANMasterSetClockPolarity(SPI_POLARITY_IDLE_HIGH); // idle when high 0011 D2*00 986 setb _spi0MasterSetClockPolarity_PARM_1 0013 12s00r00 987 lcall _spi0MasterSetClockPolarity 0016 988 C$CAN.c$46$1$1 ==. 989 ; apps/debugint/../CAN.c:46: spiCANMasterSetClockPhase(SPI_PHASE_EDGE_TRAILING); // data sampled when clock goes from active to idle 0016 D2*00 990 setb _spi0MasterSetClockPhase_PARM_1 0018 12s00r00 991 lcall _spi0MasterSetClockPhase 001B 992 C$CAN.c$47$1$1 ==. 993 ; apps/debugint/../CAN.c:47: spiCANMasterSetBitOrder(SPI_BIT_ORDER_MSB_FIRST); 001B C2*00 994 clr _spi0MasterSetBitOrder_PARM_1 001D 12s00r00 995 lcall _spi0MasterSetBitOrder 0020 D0 02 996 pop ar2 0022 997 C$CAN.c$48$1$1 ==. 998 ; apps/debugint/../CAN.c:48: for (i=1;i<10000;i++){ 0022 7B 01 999 mov r3,#0x01 0024 7C 0F 1000 mov r4,#0x0F 0026 7D 27 1001 mov r5,#0x27 0028 1002 00103$: 0028 1003 C$CAN.c$49$2$2 ==. 1004 ; apps/debugint/../CAN.c:49: a = a+1; 0028 0B 1005 inc r3 0029 1C 1006 dec r4 002A BC FF 01 1007 cjne r4,#0xff,00109$ 002D 1D 1008 dec r5 002E 1009 00109$: 002E 1010 C$CAN.c$48$2$2 ==. 1011 ; apps/debugint/../CAN.c:48: for (i=1;i<10000;i++){ 002E EC 1012 mov a,r4 002F 4D 1013 orl a,r5 0030 70 F6 1014 jnz 00103$ 0032 1015 C$CAN.c$51$1$1 ==. 1016 ; apps/debugint/../CAN.c:51: Can_reset(); //Reset CAN Controller & bring to CONFIG mode 0032 C0 02 1017 push ar2 0034 12s00r71 1018 lcall _Can_reset 0037 D0 02 1019 pop ar2 0039 1020 C$CAN.c$52$1$1 ==. 1021 ; apps/debugint/../CAN.c:52: set_Can_baudrate(baudrate); 0039 8A 82 1022 mov dpl,r2 003B 12s01rFE 1023 lcall _set_Can_baudrate 003E 1024 C$CAN.c$53$1$1 ==. 1025 ; apps/debugint/../CAN.c:53: write_can_reg(0x0F,0x03);// set CAN CTRL in normal mode 003E 78r00 1026 mov r0,#_write_can_reg_PARM_2 0040 74 03 1027 mov a,#0x03 0042 F2 1028 movx @r0,a 0043 75 82 0F 1029 mov dpl,#0x0F 0046 1030 C$CAN.c$56$1$1 ==. 0046 1031 XG$Can_init$0$0 ==. 0046 02s00rEF 1032 ljmp _write_can_reg 1033 ;------------------------------------------------------------ 1034 ;Allocation info for local variables in function 'Can_setnormalmode' 1035 ;------------------------------------------------------------ 1036 ;------------------------------------------------------------ 0049 1037 G$Can_setnormalmode$0$0 ==. 0049 1038 C$CAN.c$59$1$1 ==. 1039 ; apps/debugint/../CAN.c:59: void Can_setnormalmode(){ 1040 ; ----------------------------------------- 1041 ; function Can_setnormalmode 1042 ; ----------------------------------------- 0049 1043 _Can_setnormalmode: 0049 1044 C$CAN.c$60$1$1 ==. 1045 ; apps/debugint/../CAN.c:60: uint8 val = read_can_reg(0x0F); 0049 75 82 0F 1046 mov dpl,#0x0F 004C 12s00rA9 1047 lcall _read_can_reg 004F AA 82 1048 mov r2,dpl 0051 1049 C$CAN.c$61$1$1 ==. 1050 ; apps/debugint/../CAN.c:61: val = val & 0x1F; 0051 78r00 1051 mov r0,#_write_can_reg_PARM_2 0053 74 1F 1052 mov a,#0x1F 0055 5A 1053 anl a,r2 0056 F2 1054 movx @r0,a 0057 1055 C$CAN.c$62$1$1 ==. 1056 ; apps/debugint/../CAN.c:62: write_can_reg(0x0F,val); // set CAN CTRL in normal mode 0057 75 82 0F 1057 mov dpl,#0x0F 005A 1058 C$CAN.c$63$1$1 ==. 005A 1059 XG$Can_setnormalmode$0$0 ==. 005A 02s00rEF 1060 ljmp _write_can_reg 1061 ;------------------------------------------------------------ 1062 ;Allocation info for local variables in function 'Can_setconfigmode' 1063 ;------------------------------------------------------------ 1064 ;------------------------------------------------------------ 005D 1065 G$Can_setconfigmode$0$0 ==. 005D 1066 C$CAN.c$65$1$1 ==. 1067 ; apps/debugint/../CAN.c:65: void Can_setconfigmode(){ 1068 ; ----------------------------------------- 1069 ; function Can_setconfigmode 1070 ; ----------------------------------------- 005D 1071 _Can_setconfigmode: 005D 1072 C$CAN.c$66$1$1 ==. 1073 ; apps/debugint/../CAN.c:66: uint8 val = read_can_reg(0x0F); 005D 75 82 0F 1074 mov dpl,#0x0F 0060 12s00rA9 1075 lcall _read_can_reg 0063 AA 82 1076 mov r2,dpl 0065 1077 C$CAN.c$67$1$1 ==. 1078 ; apps/debugint/../CAN.c:67: val = val | 0x80; 0065 78r00 1079 mov r0,#_write_can_reg_PARM_2 0067 74 80 1080 mov a,#0x80 0069 4A 1081 orl a,r2 006A F2 1082 movx @r0,a 006B 1083 C$CAN.c$68$1$1 ==. 1084 ; apps/debugint/../CAN.c:68: write_can_reg(0x0F,val); // set CAN CTRL in config mode 006B 75 82 0F 1085 mov dpl,#0x0F 006E 1086 C$CAN.c$69$1$1 ==. 006E 1087 XG$Can_setconfigmode$0$0 ==. 006E 02s00rEF 1088 ljmp _write_can_reg 1089 ;------------------------------------------------------------ 1090 ;Allocation info for local variables in function 'Can_reset' 1091 ;------------------------------------------------------------ 1092 ;------------------------------------------------------------ 0071 1093 G$Can_reset$0$0 ==. 0071 1094 C$CAN.c$74$1$1 ==. 1095 ; apps/debugint/../CAN.c:74: void Can_reset(){ 1096 ; ----------------------------------------- 1097 ; function Can_reset 1098 ; ----------------------------------------- 0071 1099 _Can_reset: 0071 1100 C$CAN.c$75$1$1 ==. 1101 ; apps/debugint/../CAN.c:75: txdata[0] = 0xC0; 0071 90s00r1C 1102 mov dptr,#_txdata 0074 74 C0 1103 mov a,#0xC0 0076 F0 1104 movx @dptr,a 0077 1105 C$CAN.c$76$1$1 ==. 1106 ; apps/debugint/../CAN.c:76: CSlow; 0077 C2 F0 1107 clr b[0] 0079 85 F0*00 1108 mov bits,b 007C 75 82 04 1109 mov dpl,#0x04 007F 12s00r00 1110 lcall _setDigitalOutput 0082 1111 C$CAN.c$77$1$1 ==. 1112 ; apps/debugint/../CAN.c:77: spiCANMasterTransfer(txdata,rxdata,1); 0082 78r00 1113 mov r0,#_spi0MasterTransfer_PARM_2 0084 74r0E 1114 mov a,#_rxdata 0086 F2 1115 movx @r0,a 0087 08 1116 inc r0 0088 74s00 1117 mov a,#(_rxdata >> 8) 008A F2 1118 movx @r0,a 008B 78r00 1119 mov r0,#_spi0MasterTransfer_PARM_3 008D 74 01 1120 mov a,#0x01 008F F2 1121 movx @r0,a 0090 08 1122 inc r0 0091 E4 1123 clr a 0092 F2 1124 movx @r0,a 0093 90s00r1C 1125 mov dptr,#_txdata 0096 12s00r00 1126 lcall _spi0MasterTransfer 0099 1127 C$CAN.c$78$1$1 ==. 1128 ; apps/debugint/../CAN.c:78: while(spiCANMasterBusy()){ } 0099 1129 00101$: 0099 12s00r00 1130 lcall _spi0MasterBusy 009C 40 FB 1131 jc 00101$ 009E 1132 C$CAN.c$79$1$1 ==. 1133 ; apps/debugint/../CAN.c:79: CShigh; 009E D2 F0 1134 setb b[0] 00A0 85 F0*00 1135 mov bits,b 00A3 75 82 04 1136 mov dpl,#0x04 00A6 1137 C$CAN.c$80$1$1 ==. 00A6 1138 XG$Can_reset$0$0 ==. 00A6 02s00r00 1139 ljmp _setDigitalOutput 1140 ;------------------------------------------------------------ 1141 ;Allocation info for local variables in function 'read_can_reg' 1142 ;------------------------------------------------------------ 1143 ;------------------------------------------------------------ 00A9 1144 G$read_can_reg$0$0 ==. 00A9 1145 C$CAN.c$82$1$1 ==. 1146 ; apps/debugint/../CAN.c:82: uint8 read_can_reg(uint8 addr){ 1147 ; ----------------------------------------- 1148 ; function read_can_reg 1149 ; ----------------------------------------- 00A9 1150 _read_can_reg: 00A9 AA 82 1151 mov r2,dpl 00AB 1152 C$CAN.c$84$1$1 ==. 1153 ; apps/debugint/../CAN.c:84: txdata[0] = 0x03; // read instruction 00AB 90s00r1C 1154 mov dptr,#_txdata 00AE 74 03 1155 mov a,#0x03 00B0 F0 1156 movx @dptr,a 00B1 1157 C$CAN.c$85$1$1 ==. 1158 ; apps/debugint/../CAN.c:85: txdata[1] = addr; // read reg at address 00B1 90s00r1D 1159 mov dptr,#(_txdata + 0x0001) 00B4 EA 1160 mov a,r2 00B5 F0 1161 movx @dptr,a 00B6 1162 C$CAN.c$86$1$1 ==. 1163 ; apps/debugint/../CAN.c:86: CSlow; 00B6 C2 F0 1164 clr b[0] 00B8 85 F0*00 1165 mov bits,b 00BB 75 82 04 1166 mov dpl,#0x04 00BE 12s00r00 1167 lcall _setDigitalOutput 00C1 1168 C$CAN.c$87$1$1 ==. 1169 ; apps/debugint/../CAN.c:87: spiCANMasterTransfer(txdata,rxdata,3); 00C1 78r00 1170 mov r0,#_spi0MasterTransfer_PARM_2 00C3 74r0E 1171 mov a,#_rxdata 00C5 F2 1172 movx @r0,a 00C6 08 1173 inc r0 00C7 74s00 1174 mov a,#(_rxdata >> 8) 00C9 F2 1175 movx @r0,a 00CA 78r00 1176 mov r0,#_spi0MasterTransfer_PARM_3 00CC 74 03 1177 mov a,#0x03 00CE F2 1178 movx @r0,a 00CF 08 1179 inc r0 00D0 E4 1180 clr a 00D1 F2 1181 movx @r0,a 00D2 90s00r1C 1182 mov dptr,#_txdata 00D5 12s00r00 1183 lcall _spi0MasterTransfer 00D8 1184 C$CAN.c$88$1$1 ==. 1185 ; apps/debugint/../CAN.c:88: while(spiCANMasterBusy()){ } 00D8 1186 00101$: 00D8 12s00r00 1187 lcall _spi0MasterBusy 00DB 40 FB 1188 jc 00101$ 00DD 1189 C$CAN.c$89$1$1 ==. 1190 ; apps/debugint/../CAN.c:89: CShigh; 00DD D2 F0 1191 setb b[0] 00DF 85 F0*00 1192 mov bits,b 00E2 75 82 04 1193 mov dpl,#0x04 00E5 12s00r00 1194 lcall _setDigitalOutput 00E8 1195 C$CAN.c$90$1$1 ==. 1196 ; apps/debugint/../CAN.c:90: return rxdata[2]; 00E8 90s00r10 1197 mov dptr,#(_rxdata + 0x0002) 00EB E0 1198 movx a,@dptr 00EC 1199 C$CAN.c$91$1$1 ==. 00EC 1200 XG$read_can_reg$0$0 ==. 00EC F5 82 1201 mov dpl,a 00EE 22 1202 ret 1203 ;------------------------------------------------------------ 1204 ;Allocation info for local variables in function 'write_can_reg' 1205 ;------------------------------------------------------------ 1206 ;------------------------------------------------------------ 00EF 1207 G$write_can_reg$0$0 ==. 00EF 1208 C$CAN.c$93$1$1 ==. 1209 ; apps/debugint/../CAN.c:93: void write_can_reg(uint8 addr,uint8 val){ 1210 ; ----------------------------------------- 1211 ; function write_can_reg 1212 ; ----------------------------------------- 00EF 1213 _write_can_reg: 00EF AA 82 1214 mov r2,dpl 00F1 1215 C$CAN.c$94$1$1 ==. 1216 ; apps/debugint/../CAN.c:94: txdata[0] = 0x02; // write instruction 00F1 90s00r1C 1217 mov dptr,#_txdata 00F4 74 02 1218 mov a,#0x02 00F6 F0 1219 movx @dptr,a 00F7 1220 C$CAN.c$95$1$1 ==. 1221 ; apps/debugint/../CAN.c:95: txdata[1] = addr; // write to addr 00F7 90s00r1D 1222 mov dptr,#(_txdata + 0x0001) 00FA EA 1223 mov a,r2 00FB F0 1224 movx @dptr,a 00FC 1225 C$CAN.c$96$1$1 ==. 1226 ; apps/debugint/../CAN.c:96: txdata[2] = val; // write val 00FC 90s00r1E 1227 mov dptr,#(_txdata + 0x0002) 00FF 78r00 1228 mov r0,#_write_can_reg_PARM_2 0101 E2 1229 movx a,@r0 0102 F0 1230 movx @dptr,a 0103 1231 C$CAN.c$97$1$1 ==. 1232 ; apps/debugint/../CAN.c:97: CSlow; 0103 C2 F0 1233 clr b[0] 0105 85 F0*00 1234 mov bits,b 0108 75 82 04 1235 mov dpl,#0x04 010B 12s00r00 1236 lcall _setDigitalOutput 010E 1237 C$CAN.c$98$1$1 ==. 1238 ; apps/debugint/../CAN.c:98: spiCANMasterTransfer(txdata,rxdata,3); 010E 78r00 1239 mov r0,#_spi0MasterTransfer_PARM_2 0110 74r0E 1240 mov a,#_rxdata 0112 F2 1241 movx @r0,a 0113 08 1242 inc r0 0114 74s00 1243 mov a,#(_rxdata >> 8) 0116 F2 1244 movx @r0,a 0117 78r00 1245 mov r0,#_spi0MasterTransfer_PARM_3 0119 74 03 1246 mov a,#0x03 011B F2 1247 movx @r0,a 011C 08 1248 inc r0 011D E4 1249 clr a 011E F2 1250 movx @r0,a 011F 90s00r1C 1251 mov dptr,#_txdata 0122 12s00r00 1252 lcall _spi0MasterTransfer 0125 1253 C$CAN.c$99$1$1 ==. 1254 ; apps/debugint/../CAN.c:99: while(spiCANMasterBusy()){ } 0125 1255 00101$: 0125 12s00r00 1256 lcall _spi0MasterBusy 0128 40 FB 1257 jc 00101$ 012A 1258 C$CAN.c$100$1$1 ==. 1259 ; apps/debugint/../CAN.c:100: CShigh; 012A D2 F0 1260 setb b[0] 012C 85 F0*00 1261 mov bits,b 012F 75 82 04 1262 mov dpl,#0x04 0132 1263 C$CAN.c$101$1$1 ==. 0132 1264 XG$write_can_reg$0$0 ==. 0132 02s00r00 1265 ljmp _setDigitalOutput 1266 ;------------------------------------------------------------ 1267 ;Allocation info for local variables in function 'buf0ovfbuf1' 1268 ;------------------------------------------------------------ 1269 ;------------------------------------------------------------ 0135 1270 G$buf0ovfbuf1$0$0 ==. 0135 1271 C$CAN.c$105$1$1 ==. 1272 ; apps/debugint/../CAN.c:105: void buf0ovfbuf1(uint8 stat){ 1273 ; ----------------------------------------- 1274 ; function buf0ovfbuf1 1275 ; ----------------------------------------- 0135 1276 _buf0ovfbuf1: 0135 AA 82 1277 mov r2,dpl 0137 1278 C$CAN.c$106$1$1 ==. 1279 ; apps/debugint/../CAN.c:106: uint8 val = read_can_reg(0x60); 0137 75 82 60 1280 mov dpl,#0x60 013A C0 02 1281 push ar2 013C 12s00rA9 1282 lcall _read_can_reg 013F AB 82 1283 mov r3,dpl 0141 D0 02 1284 pop ar2 0143 1285 C$CAN.c$107$1$1 ==. 1286 ; apps/debugint/../CAN.c:107: if(stat){ 0143 EA 1287 mov a,r2 0144 60 0D 1288 jz 00102$ 0146 1289 C$CAN.c$108$2$2 ==. 1290 ; apps/debugint/../CAN.c:108: val = val | (1<<2); // Write to BUKT 0146 43 03 04 1291 orl ar3,#0x04 0149 1292 C$CAN.c$109$2$2 ==. 1293 ; apps/debugint/../CAN.c:109: write_can_reg(0x60,val); 0149 78r00 1294 mov r0,#_write_can_reg_PARM_2 014B EB 1295 mov a,r3 014C F2 1296 movx @r0,a 014D 75 82 60 1297 mov dpl,#0x60 0150 02s00rEF 1298 ljmp _write_can_reg 0153 1299 00102$: 0153 1300 C$CAN.c$111$2$3 ==. 1301 ; apps/debugint/../CAN.c:111: val = val & (0xFB); // Write to BUKT 0153 78r00 1302 mov r0,#_write_can_reg_PARM_2 0155 74 FB 1303 mov a,#0xFB 0157 5B 1304 anl a,r3 0158 F2 1305 movx @r0,a 0159 1306 C$CAN.c$112$2$3 ==. 1307 ; apps/debugint/../CAN.c:112: write_can_reg(0x60,val); 0159 75 82 60 1308 mov dpl,#0x60 015C 1309 C$CAN.c$114$1$1 ==. 015C 1310 XG$buf0ovfbuf1$0$0 ==. 015C 02s00rEF 1311 ljmp _write_can_reg 1312 ;------------------------------------------------------------ 1313 ;Allocation info for local variables in function 'setmask0' 1314 ;------------------------------------------------------------ 1315 ;------------------------------------------------------------ 015F 1316 G$setmask0$0$0 ==. 015F 1317 C$CAN.c$116$1$1 ==. 1318 ; apps/debugint/../CAN.c:116: void setmask0(uint16 mask){ 1319 ; ----------------------------------------- 1320 ; function setmask0 1321 ; ----------------------------------------- 015F 1322 _setmask0: 015F AA 82 1323 mov r2,dpl 0161 AB 83 1324 mov r3,dph 0163 1325 C$CAN.c$117$1$1 ==. 1326 ; apps/debugint/../CAN.c:117: write_can_reg(0x20,(uint8) (mask>>3)); 0163 8A 04 1327 mov ar4,r2 0165 EB 1328 mov a,r3 0166 C4 1329 swap a 0167 23 1330 rl a 0168 CC 1331 xch a,r4 0169 C4 1332 swap a 016A 23 1333 rl a 016B 54 1F 1334 anl a,#0x1f 016D 6C 1335 xrl a,r4 016E CC 1336 xch a,r4 016F 54 1F 1337 anl a,#0x1f 0171 CC 1338 xch a,r4 0172 6C 1339 xrl a,r4 0173 CC 1340 xch a,r4 0174 78r00 1341 mov r0,#_write_can_reg_PARM_2 0176 EC 1342 mov a,r4 0177 F2 1343 movx @r0,a 0178 75 82 20 1344 mov dpl,#0x20 017B C0 02 1345 push ar2 017D C0 03 1346 push ar3 017F 12s00rEF 1347 lcall _write_can_reg 0182 D0 03 1348 pop ar3 0184 D0 02 1349 pop ar2 0186 1350 C$CAN.c$118$1$1 ==. 1351 ; apps/debugint/../CAN.c:118: write_can_reg(0x21,(uint8) (mask<<5)); 0186 78r00 1352 mov r0,#_write_can_reg_PARM_2 0188 EA 1353 mov a,r2 0189 C4 1354 swap a 018A 23 1355 rl a 018B 54 E0 1356 anl a,#0xe0 018D F2 1357 movx @r0,a 018E 75 82 21 1358 mov dpl,#0x21 0191 1359 C$CAN.c$119$1$1 ==. 0191 1360 XG$setmask0$0$0 ==. 0191 02s00rEF 1361 ljmp _write_can_reg 1362 ;------------------------------------------------------------ 1363 ;Allocation info for local variables in function 'setrxfil0' 1364 ;------------------------------------------------------------ 1365 ;------------------------------------------------------------ 0194 1366 G$setrxfil0$0$0 ==. 0194 1367 C$CAN.c$121$1$1 ==. 1368 ; apps/debugint/../CAN.c:121: void setrxfil0(uint16 fil){ 1369 ; ----------------------------------------- 1370 ; function setrxfil0 1371 ; ----------------------------------------- 0194 1372 _setrxfil0: 0194 AA 82 1373 mov r2,dpl 0196 AB 83 1374 mov r3,dph 0198 1375 C$CAN.c$122$1$1 ==. 1376 ; apps/debugint/../CAN.c:122: write_can_reg(0x00,(uint8) (fil>>3)); 0198 8A 04 1377 mov ar4,r2 019A EB 1378 mov a,r3 019B C4 1379 swap a 019C 23 1380 rl a 019D CC 1381 xch a,r4 019E C4 1382 swap a 019F 23 1383 rl a 01A0 54 1F 1384 anl a,#0x1f 01A2 6C 1385 xrl a,r4 01A3 CC 1386 xch a,r4 01A4 54 1F 1387 anl a,#0x1f 01A6 CC 1388 xch a,r4 01A7 6C 1389 xrl a,r4 01A8 CC 1390 xch a,r4 01A9 78r00 1391 mov r0,#_write_can_reg_PARM_2 01AB EC 1392 mov a,r4 01AC F2 1393 movx @r0,a 01AD 75 82 00 1394 mov dpl,#0x00 01B0 C0 02 1395 push ar2 01B2 C0 03 1396 push ar3 01B4 12s00rEF 1397 lcall _write_can_reg 01B7 D0 03 1398 pop ar3 01B9 D0 02 1399 pop ar2 01BB 1400 C$CAN.c$123$1$1 ==. 1401 ; apps/debugint/../CAN.c:123: write_can_reg(0x01,(uint8) (fil<<5)); 01BB 78r00 1402 mov r0,#_write_can_reg_PARM_2 01BD EA 1403 mov a,r2 01BE C4 1404 swap a 01BF 23 1405 rl a 01C0 54 E0 1406 anl a,#0xe0 01C2 F2 1407 movx @r0,a 01C3 75 82 01 1408 mov dpl,#0x01 01C6 1409 C$CAN.c$124$1$1 ==. 01C6 1410 XG$setrxfil0$0$0 ==. 01C6 02s00rEF 1411 ljmp _write_can_reg 1412 ;------------------------------------------------------------ 1413 ;Allocation info for local variables in function 'setrxfil1' 1414 ;------------------------------------------------------------ 1415 ;------------------------------------------------------------ 01C9 1416 G$setrxfil1$0$0 ==. 01C9 1417 C$CAN.c$126$1$1 ==. 1418 ; apps/debugint/../CAN.c:126: void setrxfil1(uint16 fil){ 1419 ; ----------------------------------------- 1420 ; function setrxfil1 1421 ; ----------------------------------------- 01C9 1422 _setrxfil1: 01C9 AA 82 1423 mov r2,dpl 01CB AB 83 1424 mov r3,dph 01CD 1425 C$CAN.c$127$1$1 ==. 1426 ; apps/debugint/../CAN.c:127: write_can_reg(0x04,(uint8) (fil>>3)); 01CD 8A 04 1427 mov ar4,r2 01CF EB 1428 mov a,r3 01D0 C4 1429 swap a 01D1 23 1430 rl a 01D2 CC 1431 xch a,r4 01D3 C4 1432 swap a 01D4 23 1433 rl a 01D5 54 1F 1434 anl a,#0x1f 01D7 6C 1435 xrl a,r4 01D8 CC 1436 xch a,r4 01D9 54 1F 1437 anl a,#0x1f 01DB CC 1438 xch a,r4 01DC 6C 1439 xrl a,r4 01DD CC 1440 xch a,r4 01DE 78r00 1441 mov r0,#_write_can_reg_PARM_2 01E0 EC 1442 mov a,r4 01E1 F2 1443 movx @r0,a 01E2 75 82 04 1444 mov dpl,#0x04 01E5 C0 02 1445 push ar2 01E7 C0 03 1446 push ar3 01E9 12s00rEF 1447 lcall _write_can_reg 01EC D0 03 1448 pop ar3 01EE D0 02 1449 pop ar2 01F0 1450 C$CAN.c$128$1$1 ==. 1451 ; apps/debugint/../CAN.c:128: write_can_reg(0x05,(uint8) (fil<<5)); 01F0 78r00 1452 mov r0,#_write_can_reg_PARM_2 01F2 EA 1453 mov a,r2 01F3 C4 1454 swap a 01F4 23 1455 rl a 01F5 54 E0 1456 anl a,#0xe0 01F7 F2 1457 movx @r0,a 01F8 75 82 05 1458 mov dpl,#0x05 01FB 1459 C$CAN.c$129$1$1 ==. 01FB 1460 XG$setrxfil1$0$0 ==. 01FB 02s00rEF 1461 ljmp _write_can_reg 1462 ;------------------------------------------------------------ 1463 ;Allocation info for local variables in function 'set_Can_baudrate' 1464 ;------------------------------------------------------------ 1465 ;------------------------------------------------------------ 01FE 1466 G$set_Can_baudrate$0$0 ==. 01FE 1467 C$CAN.c$134$1$1 ==. 1468 ; apps/debugint/../CAN.c:134: void set_Can_baudrate(uint8 A){ 1469 ; ----------------------------------------- 1470 ; function set_Can_baudrate 1471 ; ----------------------------------------- 01FE 1472 _set_Can_baudrate: 01FE AA 82 1473 mov r2,dpl 0200 1474 C$CAN.c$135$1$1 ==. 1475 ; apps/debugint/../CAN.c:135: switch(A){ 0200 BA 01 02 1476 cjne r2,#0x01,00109$ 0203 80 05 1477 sjmp 00101$ 0205 1478 00109$: 0205 1479 C$CAN.c$136$2$2 ==. 1480 ; apps/debugint/../CAN.c:136: case 1: //125kbit/s BRP = 04h 0205 BA 02 44 1481 cjne r2,#0x02,00103$ 0208 80 21 1482 sjmp 00102$ 020A 1483 00101$: 020A 1484 C$CAN.c$138$2$2 ==. 1485 ; apps/debugint/../CAN.c:138: write_can_reg(0x2A,0x04); // write to CNF1 020A 78r00 1486 mov r0,#_write_can_reg_PARM_2 020C 74 04 1487 mov a,#0x04 020E F2 1488 movx @r0,a 020F 75 82 2A 1489 mov dpl,#0x2A 0212 12s00rEF 1490 lcall _write_can_reg 0215 1491 C$CAN.c$139$2$2 ==. 1492 ; apps/debugint/../CAN.c:139: write_can_reg(0x29,0xB1); // write to CNF2 0215 78r00 1493 mov r0,#_write_can_reg_PARM_2 0217 74 B1 1494 mov a,#0xB1 0219 F2 1495 movx @r0,a 021A 75 82 29 1496 mov dpl,#0x29 021D 12s00rEF 1497 lcall _write_can_reg 0220 1498 C$CAN.c$140$2$2 ==. 1499 ; apps/debugint/../CAN.c:140: write_can_reg(0x28,0x05); // write to CNF3 0220 78r00 1500 mov r0,#_write_can_reg_PARM_2 0222 74 05 1501 mov a,#0x05 0224 F2 1502 movx @r0,a 0225 75 82 28 1503 mov dpl,#0x28 0228 1504 C$CAN.c$141$2$2 ==. 1505 ; apps/debugint/../CAN.c:141: break; 0228 1506 C$CAN.c$142$2$2 ==. 1507 ; apps/debugint/../CAN.c:142: case 2: 0228 02s00rEF 1508 ljmp _write_can_reg 022B 1509 00102$: 022B 1510 C$CAN.c$145$2$2 ==. 1511 ; apps/debugint/../CAN.c:145: write_can_reg(0x2A,0x03); // write to CNF1 022B 78r00 1512 mov r0,#_write_can_reg_PARM_2 022D 74 03 1513 mov a,#0x03 022F F2 1514 movx @r0,a 0230 75 82 2A 1515 mov dpl,#0x2A 0233 12s00rEF 1516 lcall _write_can_reg 0236 1517 C$CAN.c$146$2$2 ==. 1518 ; apps/debugint/../CAN.c:146: write_can_reg(0x29,0x91); // write to CNF2 0236 78r00 1519 mov r0,#_write_can_reg_PARM_2 0238 74 91 1520 mov a,#0x91 023A F2 1521 movx @r0,a 023B 75 82 29 1522 mov dpl,#0x29 023E 12s00rEF 1523 lcall _write_can_reg 0241 1524 C$CAN.c$147$2$2 ==. 1525 ; apps/debugint/../CAN.c:147: write_can_reg(0x28,0x03); // write to CNF3 0241 78r00 1526 mov r0,#_write_can_reg_PARM_2 0243 74 03 1527 mov a,#0x03 0245 F2 1528 movx @r0,a 0246 75 82 28 1529 mov dpl,#0x28 0249 1530 C$CAN.c$148$2$2 ==. 1531 ; apps/debugint/../CAN.c:148: break; 0249 1532 C$CAN.c$149$2$2 ==. 1533 ; apps/debugint/../CAN.c:149: default: 0249 02s00rEF 1534 ljmp _write_can_reg 024C 1535 00103$: 024C 1536 C$CAN.c$152$2$2 ==. 1537 ; apps/debugint/../CAN.c:152: write_can_reg(0x2A,0x03); // write to CNF1 024C 78r00 1538 mov r0,#_write_can_reg_PARM_2 024E 74 03 1539 mov a,#0x03 0250 F2 1540 movx @r0,a 0251 75 82 2A 1541 mov dpl,#0x2A 0254 12s00rEF 1542 lcall _write_can_reg 0257 1543 C$CAN.c$153$2$2 ==. 1544 ; apps/debugint/../CAN.c:153: write_can_reg(0x29,0x91); // write to CNF2 0257 78r00 1545 mov r0,#_write_can_reg_PARM_2 0259 74 91 1546 mov a,#0x91 025B F2 1547 movx @r0,a 025C 75 82 29 1548 mov dpl,#0x29 025F 12s00rEF 1549 lcall _write_can_reg 0262 1550 C$CAN.c$154$2$2 ==. 1551 ; apps/debugint/../CAN.c:154: write_can_reg(0x28,0x03); // write to CNF3 0262 78r00 1552 mov r0,#_write_can_reg_PARM_2 0264 74 03 1553 mov a,#0x03 0266 F2 1554 movx @r0,a 0267 75 82 28 1555 mov dpl,#0x28 026A 1556 C$CAN.c$156$1$1 ==. 1557 ; apps/debugint/../CAN.c:156: } 026A 1558 C$CAN.c$157$1$1 ==. 026A 1559 XG$set_Can_baudrate$0$0 ==. 026A 02s00rEF 1560 ljmp _write_can_reg 1561 ;------------------------------------------------------------ 1562 ;Allocation info for local variables in function 'load_can_txbuf0' 1563 ;------------------------------------------------------------ 1564 ;------------------------------------------------------------ 026D 1565 G$load_can_txbuf0$0$0 ==. 026D 1566 C$CAN.c$161$1$1 ==. 1567 ; apps/debugint/../CAN.c:161: void load_can_txbuf0(){ 1568 ; ----------------------------------------- 1569 ; function load_can_txbuf0 1570 ; ----------------------------------------- 026D 1571 _load_can_txbuf0: 026D 1572 C$CAN.c$162$1$1 ==. 1573 ; apps/debugint/../CAN.c:162: CSlow; 026D C2 F0 1574 clr b[0] 026F 85 F0*00 1575 mov bits,b 0272 75 82 04 1576 mov dpl,#0x04 0275 12s00r00 1577 lcall _setDigitalOutput 0278 1578 C$CAN.c$163$1$1 ==. 1579 ; apps/debugint/../CAN.c:163: txdata[0] = 0x40; //tx buffer0 SIDH 0278 90s00r1C 1580 mov dptr,#_txdata 027B 74 40 1581 mov a,#0x40 027D F0 1582 movx @dptr,a 027E 1583 C$CAN.c$165$1$1 ==. 1584 ; apps/debugint/../CAN.c:165: spiCANMasterTransfer(txdata2,rxdata,14); 027E 78r00 1585 mov r0,#_spi0MasterTransfer_PARM_2 0280 74r0E 1586 mov a,#_rxdata 0282 F2 1587 movx @r0,a 0283 08 1588 inc r0 0284 74s00 1589 mov a,#(_rxdata >> 8) 0286 F2 1590 movx @r0,a 0287 78r00 1591 mov r0,#_spi0MasterTransfer_PARM_3 0289 74 0E 1592 mov a,#0x0E 028B F2 1593 movx @r0,a 028C 08 1594 inc r0 028D E4 1595 clr a 028E F2 1596 movx @r0,a 028F 90s00r00 1597 mov dptr,#_txdata2 0292 12s00r00 1598 lcall _spi0MasterTransfer 0295 1599 C$CAN.c$166$1$1 ==. 1600 ; apps/debugint/../CAN.c:166: while(spiCANMasterBusy()){ } 0295 1601 00101$: 0295 12s00r00 1602 lcall _spi0MasterBusy 0298 40 FB 1603 jc 00101$ 029A 1604 C$CAN.c$167$1$1 ==. 1605 ; apps/debugint/../CAN.c:167: CShigh; 029A D2 F0 1606 setb b[0] 029C 85 F0*00 1607 mov bits,b 029F 75 82 04 1608 mov dpl,#0x04 02A2 1609 C$CAN.c$168$1$1 ==. 02A2 1610 XG$load_can_txbuf0$0$0 ==. 02A2 02s00r00 1611 ljmp _setDigitalOutput 1612 ;------------------------------------------------------------ 1613 ;Allocation info for local variables in function 'load_can_txbuf1' 1614 ;------------------------------------------------------------ 1615 ;------------------------------------------------------------ 02A5 1616 G$load_can_txbuf1$0$0 ==. 02A5 1617 C$CAN.c$170$1$1 ==. 1618 ; apps/debugint/../CAN.c:170: void load_can_txbuf1(){ 1619 ; ----------------------------------------- 1620 ; function load_can_txbuf1 1621 ; ----------------------------------------- 02A5 1622 _load_can_txbuf1: 02A5 1623 C$CAN.c$171$1$1 ==. 1624 ; apps/debugint/../CAN.c:171: CSlow; 02A5 C2 F0 1625 clr b[0] 02A7 85 F0*00 1626 mov bits,b 02AA 75 82 04 1627 mov dpl,#0x04 02AD 12s00r00 1628 lcall _setDigitalOutput 02B0 1629 C$CAN.c$172$1$1 ==. 1630 ; apps/debugint/../CAN.c:172: txdata2[0] = 0x42; //tx buffer1 SIDH 02B0 90s00r00 1631 mov dptr,#_txdata2 02B3 74 42 1632 mov a,#0x42 02B5 F0 1633 movx @dptr,a 02B6 1634 C$CAN.c$173$1$1 ==. 1635 ; apps/debugint/../CAN.c:173: spiCANMasterTransfer(txdata2,rxdata,14); 02B6 78r00 1636 mov r0,#_spi0MasterTransfer_PARM_2 02B8 74r0E 1637 mov a,#_rxdata 02BA F2 1638 movx @r0,a 02BB 08 1639 inc r0 02BC 74s00 1640 mov a,#(_rxdata >> 8) 02BE F2 1641 movx @r0,a 02BF 78r00 1642 mov r0,#_spi0MasterTransfer_PARM_3 02C1 74 0E 1643 mov a,#0x0E 02C3 F2 1644 movx @r0,a 02C4 08 1645 inc r0 02C5 E4 1646 clr a 02C6 F2 1647 movx @r0,a 02C7 90s00r00 1648 mov dptr,#_txdata2 02CA 12s00r00 1649 lcall _spi0MasterTransfer 02CD 1650 C$CAN.c$174$1$1 ==. 1651 ; apps/debugint/../CAN.c:174: while(spiCANMasterBusy()){ } 02CD 1652 00101$: 02CD 12s00r00 1653 lcall _spi0MasterBusy 02D0 40 FB 1654 jc 00101$ 02D2 1655 C$CAN.c$175$1$1 ==. 1656 ; apps/debugint/../CAN.c:175: CShigh; 02D2 D2 F0 1657 setb b[0] 02D4 85 F0*00 1658 mov bits,b 02D7 75 82 04 1659 mov dpl,#0x04 02DA 1660 C$CAN.c$176$1$1 ==. 02DA 1661 XG$load_can_txbuf1$0$0 ==. 02DA 02s00r00 1662 ljmp _setDigitalOutput 1663 ;------------------------------------------------------------ 1664 ;Allocation info for local variables in function 'load_can_txbuf2' 1665 ;------------------------------------------------------------ 1666 ;------------------------------------------------------------ 02DD 1667 G$load_can_txbuf2$0$0 ==. 02DD 1668 C$CAN.c$178$1$1 ==. 1669 ; apps/debugint/../CAN.c:178: void load_can_txbuf2(){ 1670 ; ----------------------------------------- 1671 ; function load_can_txbuf2 1672 ; ----------------------------------------- 02DD 1673 _load_can_txbuf2: 02DD 1674 C$CAN.c$179$1$1 ==. 1675 ; apps/debugint/../CAN.c:179: CSlow; 02DD C2 F0 1676 clr b[0] 02DF 85 F0*00 1677 mov bits,b 02E2 75 82 04 1678 mov dpl,#0x04 02E5 12s00r00 1679 lcall _setDigitalOutput 02E8 1680 C$CAN.c$180$1$1 ==. 1681 ; apps/debugint/../CAN.c:180: txdata2[0] = 0x44; //tx buffer2 SIDH 02E8 90s00r00 1682 mov dptr,#_txdata2 02EB 74 44 1683 mov a,#0x44 02ED F0 1684 movx @dptr,a 02EE 1685 C$CAN.c$181$1$1 ==. 1686 ; apps/debugint/../CAN.c:181: spiCANMasterTransfer(txdata2,rxdata,14); 02EE 78r00 1687 mov r0,#_spi0MasterTransfer_PARM_2 02F0 74r0E 1688 mov a,#_rxdata 02F2 F2 1689 movx @r0,a 02F3 08 1690 inc r0 02F4 74s00 1691 mov a,#(_rxdata >> 8) 02F6 F2 1692 movx @r0,a 02F7 78r00 1693 mov r0,#_spi0MasterTransfer_PARM_3 02F9 74 0E 1694 mov a,#0x0E 02FB F2 1695 movx @r0,a 02FC 08 1696 inc r0 02FD E4 1697 clr a 02FE F2 1698 movx @r0,a 02FF 90s00r00 1699 mov dptr,#_txdata2 0302 12s00r00 1700 lcall _spi0MasterTransfer 0305 1701 C$CAN.c$182$1$1 ==. 1702 ; apps/debugint/../CAN.c:182: while(spiCANMasterBusy()){ } 0305 1703 00101$: 0305 12s00r00 1704 lcall _spi0MasterBusy 0308 40 FB 1705 jc 00101$ 030A 1706 C$CAN.c$183$1$1 ==. 1707 ; apps/debugint/../CAN.c:183: CShigh; 030A D2 F0 1708 setb b[0] 030C 85 F0*00 1709 mov bits,b 030F 75 82 04 1710 mov dpl,#0x04 0312 1711 C$CAN.c$184$1$1 ==. 0312 1712 XG$load_can_txbuf2$0$0 ==. 0312 02s00r00 1713 ljmp _setDigitalOutput 1714 ;------------------------------------------------------------ 1715 ;Allocation info for local variables in function 'read_rxbuf0' 1716 ;------------------------------------------------------------ 1717 ;------------------------------------------------------------ 0315 1718 G$read_rxbuf0$0$0 ==. 0315 1719 C$CAN.c$186$1$1 ==. 1720 ; apps/debugint/../CAN.c:186: void read_rxbuf0(){ 1721 ; ----------------------------------------- 1722 ; function read_rxbuf0 1723 ; ----------------------------------------- 0315 1724 _read_rxbuf0: 0315 1725 C$CAN.c$188$1$1 ==. 1726 ; apps/debugint/../CAN.c:188: txdata2[0] = 0x90; // receive buffer0 starting with SIDH 0315 90s00r00 1727 mov dptr,#_txdata2 0318 74 90 1728 mov a,#0x90 031A F0 1729 movx @dptr,a 031B 1730 C$CAN.c$189$1$1 ==. 1731 ; apps/debugint/../CAN.c:189: CSlow; 031B C2 F0 1732 clr b[0] 031D 85 F0*00 1733 mov bits,b 0320 75 82 04 1734 mov dpl,#0x04 0323 12s00r00 1735 lcall _setDigitalOutput 0326 1736 C$CAN.c$190$1$1 ==. 1737 ; apps/debugint/../CAN.c:190: spiCANMasterTransfer(txdata2,rxdata,14); 0326 78r00 1738 mov r0,#_spi0MasterTransfer_PARM_2 0328 74r0E 1739 mov a,#_rxdata 032A F2 1740 movx @r0,a 032B 08 1741 inc r0 032C 74s00 1742 mov a,#(_rxdata >> 8) 032E F2 1743 movx @r0,a 032F 78r00 1744 mov r0,#_spi0MasterTransfer_PARM_3 0331 74 0E 1745 mov a,#0x0E 0333 F2 1746 movx @r0,a 0334 08 1747 inc r0 0335 E4 1748 clr a 0336 F2 1749 movx @r0,a 0337 90s00r00 1750 mov dptr,#_txdata2 033A 12s00r00 1751 lcall _spi0MasterTransfer 033D 1752 C$CAN.c$191$1$1 ==. 1753 ; apps/debugint/../CAN.c:191: while(spiCANMasterBusy()){ } 033D 1754 00101$: 033D 12s00r00 1755 lcall _spi0MasterBusy 0340 40 FB 1756 jc 00101$ 0342 1757 C$CAN.c$192$1$1 ==. 1758 ; apps/debugint/../CAN.c:192: CShigh; 0342 D2 F0 1759 setb b[0] 0344 85 F0*00 1760 mov bits,b 0347 75 82 04 1761 mov dpl,#0x04 034A 1762 C$CAN.c$193$1$1 ==. 034A 1763 XG$read_rxbuf0$0$0 ==. 034A 02s00r00 1764 ljmp _setDigitalOutput 1765 ;------------------------------------------------------------ 1766 ;Allocation info for local variables in function 'send_Canmsg_wait' 1767 ;------------------------------------------------------------ 1768 ;sloc0 Allocated with name '_send_Canmsg_wait_sloc0_1_0' 1769 ;------------------------------------------------------------ 034D 1770 G$send_Canmsg_wait$0$0 ==. 034D 1771 C$CAN.c$199$1$1 ==. 1772 ; apps/debugint/../CAN.c:199: void send_Canmsg_wait(Can_msg *msg){ 1773 ; ----------------------------------------- 1774 ; function send_Canmsg_wait 1775 ; ----------------------------------------- 034D 1776 _send_Canmsg_wait: 034D AA F0 1777 mov r2,b 034F AB 83 1778 mov r3,dph 0351 E5 82 1779 mov a,dpl 0353 78r01 1780 mov r0,#_send_Canmsg_wait_msg_1_1 0355 F2 1781 movx @r0,a 0356 08 1782 inc r0 0357 EB 1783 mov a,r3 0358 F2 1784 movx @r0,a 0359 08 1785 inc r0 035A EA 1786 mov a,r2 035B F2 1787 movx @r0,a 035C 1788 C$CAN.c$201$1$1 ==. 1789 ; apps/debugint/../CAN.c:201: uint8 sent=0; 035C 78r06 1790 mov r0,#_send_Canmsg_wait_sent_1_1 035E E4 1791 clr a 035F F2 1792 movx @r0,a 0360 1793 C$CAN.c$203$1$1 ==. 1794 ; apps/debugint/../CAN.c:203: txdata2[1] =(uint8) (msg->id >> 3); 0360 78r01 1795 mov r0,#_send_Canmsg_wait_msg_1_1 0362 E2 1796 movx a,@r0 0363 F5 82 1797 mov dpl,a 0365 08 1798 inc r0 0366 E2 1799 movx a,@r0 0367 F5 83 1800 mov dph,a 0369 08 1801 inc r0 036A E2 1802 movx a,@r0 036B F5 F0 1803 mov b,a 036D 12s00r00 1804 lcall __gptrget 0370 FE 1805 mov r6,a 0371 A3 1806 inc dptr 0372 12s00r00 1807 lcall __gptrget 0375 FF 1808 mov r7,a 0376 8E 05 1809 mov ar5,r6 0378 C4 1810 swap a 0379 23 1811 rl a 037A CD 1812 xch a,r5 037B C4 1813 swap a 037C 23 1814 rl a 037D 54 1F 1815 anl a,#0x1f 037F 6D 1816 xrl a,r5 0380 CD 1817 xch a,r5 0381 54 1F 1818 anl a,#0x1f 0383 CD 1819 xch a,r5 0384 6D 1820 xrl a,r5 0385 CD 1821 xch a,r5 0386 90s00r01 1822 mov dptr,#(_txdata2 + 0x0001) 0389 ED 1823 mov a,r5 038A F0 1824 movx @dptr,a 038B 1825 C$CAN.c$204$1$1 ==. 1826 ; apps/debugint/../CAN.c:204: txdata2[2] = (uint8) (msg->id << 5); 038B EE 1827 mov a,r6 038C C4 1828 swap a 038D 23 1829 rl a 038E 54 E0 1830 anl a,#0xe0 0390 FE 1831 mov r6,a 0391 90s00r02 1832 mov dptr,#(_txdata2 + 0x0002) 0394 F0 1833 movx @dptr,a 0395 1834 C$CAN.c$206$1$1 ==. 1835 ; apps/debugint/../CAN.c:206: txdata2[5] = msg->len;// data len 0395 78r01 1836 mov r0,#_send_Canmsg_wait_msg_1_1 0397 E2 1837 movx a,@r0 0398 24 02 1838 add a,#0x02 039A FA 1839 mov r2,a 039B 08 1840 inc r0 039C E2 1841 movx a,@r0 039D 34 00 1842 addc a,#0x00 039F FB 1843 mov r3,a 03A0 08 1844 inc r0 03A1 E2 1845 movx a,@r0 03A2 FC 1846 mov r4,a 03A3 8A 82 1847 mov dpl,r2 03A5 8B 83 1848 mov dph,r3 03A7 8C F0 1849 mov b,r4 03A9 12s00r00 1850 lcall __gptrget 03AC FA 1851 mov r2,a 03AD 90s00r05 1852 mov dptr,#(_txdata2 + 0x0005) 03B0 F0 1853 movx @dptr,a 03B1 1854 C$CAN.c$207$2$2 ==. 1855 ; apps/debugint/../CAN.c:207: for(i = 0;i < msg->len; i++){ 03B1 78r01 1856 mov r0,#_send_Canmsg_wait_msg_1_1 03B3 E2 1857 movx a,@r0 03B4 24 03 1858 add a,#0x03 03B6 FB 1859 mov r3,a 03B7 08 1860 inc r0 03B8 E2 1861 movx a,@r0 03B9 34 00 1862 addc a,#0x00 03BB FC 1863 mov r4,a 03BC 08 1864 inc r0 03BD E2 1865 movx a,@r0 03BE FD 1866 mov r5,a 03BF 78r04 1867 mov r0,#_send_Canmsg_wait_i_1_1 03C1 E4 1868 clr a 03C2 F2 1869 movx @r0,a 03C3 08 1870 inc r0 03C4 F2 1871 movx @r0,a 03C5 1872 00112$: 03C5 C0 03 1873 push ar3 03C7 C0 04 1874 push ar4 03C9 C0 05 1875 push ar5 03CB 8A 03 1876 mov ar3,r2 03CD 7C 00 1877 mov r4,#0x00 03CF 78r04 1878 mov r0,#_send_Canmsg_wait_i_1_1 03D1 C3 1879 clr c 03D2 E2 1880 movx a,@r0 03D3 9B 1881 subb a,r3 03D4 08 1882 inc r0 03D5 E2 1883 movx a,@r0 03D6 64 80 1884 xrl a,#0x80 03D8 8C F0 1885 mov b,r4 03DA 63 F0 80 1886 xrl b,#0x80 03DD 95 F0 1887 subb a,b 03DF D0 05 1888 pop ar5 03E1 D0 04 1889 pop ar4 03E3 D0 03 1890 pop ar3 03E5 50 3B 1891 jnc 00109$ 03E7 1892 C$CAN.c$208$1$1 ==. 1893 ; apps/debugint/../CAN.c:208: txdata2[6+i] = msg->dat[i]; 03E7 C0 02 1894 push ar2 03E9 78r04 1895 mov r0,#_send_Canmsg_wait_i_1_1 03EB E2 1896 movx a,@r0 03EC 24 06 1897 add a,#0x06 03EE 24r00 1898 add a,#_txdata2 03F0 F5*00 1899 mov _send_Canmsg_wait_sloc0_1_0,a 03F2 E4 1900 clr a 03F3 34s00 1901 addc a,#(_txdata2 >> 8) 03F5 F5*01 1902 mov (_send_Canmsg_wait_sloc0_1_0 + 1),a 03F7 78r04 1903 mov r0,#_send_Canmsg_wait_i_1_1 03F9 E2 1904 movx a,@r0 03FA 2B 1905 add a,r3 03FB FF 1906 mov r7,a 03FC 08 1907 inc r0 03FD E2 1908 movx a,@r0 03FE 3C 1909 addc a,r4 03FF FA 1910 mov r2,a 0400 8D 06 1911 mov ar6,r5 0402 8F 82 1912 mov dpl,r7 0404 8A 83 1913 mov dph,r2 0406 8E F0 1914 mov b,r6 0408 12s00r00 1915 lcall __gptrget 040B FF 1916 mov r7,a 040C 85*00 82 1917 mov dpl,_send_Canmsg_wait_sloc0_1_0 040F 85*01 83 1918 mov dph,(_send_Canmsg_wait_sloc0_1_0 + 1) 0412 F0 1919 movx @dptr,a 0413 1920 C$CAN.c$207$1$1 ==. 1921 ; apps/debugint/../CAN.c:207: for(i = 0;i < msg->len; i++){ 0413 78r04 1922 mov r0,#_send_Canmsg_wait_i_1_1 0415 E2 1923 movx a,@r0 0416 24 01 1924 add a,#0x01 0418 F2 1925 movx @r0,a 0419 08 1926 inc r0 041A E2 1927 movx a,@r0 041B 34 00 1928 addc a,#0x00 041D F2 1929 movx @r0,a 041E D0 02 1930 pop ar2 0420 1931 C$CAN.c$211$1$1 ==. 1932 ; apps/debugint/../CAN.c:211: while(!sent){ 0420 80 A3 1933 sjmp 00112$ 0422 1934 00109$: 0422 78r06 1935 mov r0,#_send_Canmsg_wait_sent_1_1 0424 E2 1936 movx a,@r0 0425 70 56 1937 jnz 00116$ 0427 1938 C$CAN.c$212$2$3 ==. 1939 ; apps/debugint/../CAN.c:212: if((read_can_reg(0x30) & (1<<3)) == 0){ // check if message in txbuf0 is pending transmission 0427 75 82 30 1940 mov dpl,#0x30 042A 12s00rA9 1941 lcall _read_can_reg 042D E5 82 1942 mov a,dpl 042F 20 E3 10 1943 jb acc.3,00107$ 0432 1944 C$CAN.c$213$3$4 ==. 1945 ; apps/debugint/../CAN.c:213: load_can_txbuf0(); 0432 12s02r6D 1946 lcall _load_can_txbuf0 0435 1947 C$CAN.c$214$3$4 ==. 1948 ; apps/debugint/../CAN.c:214: write_can_reg(0x30,0x0B);// initiate tx from txbuf0 0435 78r00 1949 mov r0,#_write_can_reg_PARM_2 0437 74 0B 1950 mov a,#0x0B 0439 F2 1951 movx @r0,a 043A 75 82 30 1952 mov dpl,#0x30 043D 12s00rEF 1953 lcall _write_can_reg 0440 1954 C$CAN.c$215$2$3 ==. 1955 ; apps/debugint/../CAN.c:215: sent=1; 0440 80 34 1956 sjmp 00108$ 0442 1957 00107$: 0442 1958 C$CAN.c$216$2$3 ==. 1959 ; apps/debugint/../CAN.c:216: }else if((read_can_reg(0x40) & (1<<3)) == 0){ // check if message in txbuf1 is pending transmission 0442 75 82 40 1960 mov dpl,#0x40 0445 12s00rA9 1961 lcall _read_can_reg 0448 E5 82 1962 mov a,dpl 044A 20 E3 10 1963 jb acc.3,00104$ 044D 1964 C$CAN.c$217$3$5 ==. 1965 ; apps/debugint/../CAN.c:217: load_can_txbuf1(); 044D 12s02rA5 1966 lcall _load_can_txbuf1 0450 1967 C$CAN.c$218$3$5 ==. 1968 ; apps/debugint/../CAN.c:218: write_can_reg(0x40,0x0B);// initiate tx from txbuf1 0450 78r00 1969 mov r0,#_write_can_reg_PARM_2 0452 74 0B 1970 mov a,#0x0B 0454 F2 1971 movx @r0,a 0455 75 82 40 1972 mov dpl,#0x40 0458 12s00rEF 1973 lcall _write_can_reg 045B 1974 C$CAN.c$219$2$3 ==. 1975 ; apps/debugint/../CAN.c:219: sent=1; 045B 80 19 1976 sjmp 00108$ 045D 1977 00104$: 045D 1978 C$CAN.c$220$2$3 ==. 1979 ; apps/debugint/../CAN.c:220: }else if((read_can_reg(0x50) & (1<<3)) == 0){// check if message in txbuf2 is pending transmission 045D 75 82 50 1980 mov dpl,#0x50 0460 12s00rA9 1981 lcall _read_can_reg 0463 E5 82 1982 mov a,dpl 0465 20 E3 0E 1983 jb acc.3,00108$ 0468 1984 C$CAN.c$221$3$6 ==. 1985 ; apps/debugint/../CAN.c:221: load_can_txbuf2(); 0468 12s02rDD 1986 lcall _load_can_txbuf2 046B 1987 C$CAN.c$222$3$6 ==. 1988 ; apps/debugint/../CAN.c:222: write_can_reg(0x50,0x0B);// initiate tx from txbuf2 046B 78r00 1989 mov r0,#_write_can_reg_PARM_2 046D 74 0B 1990 mov a,#0x0B 046F F2 1991 movx @r0,a 0470 75 82 50 1992 mov dpl,#0x50 0473 12s00rEF 1993 lcall _write_can_reg 0476 1994 C$CAN.c$223$2$3 ==. 1995 ; apps/debugint/../CAN.c:223: sent=1; 0476 1996 00108$: 0476 1997 C$CAN.c$225$2$3 ==. 1998 ; apps/debugint/../CAN.c:225: sent = 1; 0476 78r06 1999 mov r0,#_send_Canmsg_wait_sent_1_1 0478 74 01 2000 mov a,#0x01 047A F2 2001 movx @r0,a 047B 80 A5 2002 sjmp 00109$ 047D 2003 00116$: 047D 2004 C$CAN.c$227$1$1 ==. 047D 2005 XG$send_Canmsg_wait$0$0 ==. 047D 22 2006 ret 2007 ;------------------------------------------------------------ 2008 ;Allocation info for local variables in function 'get_Canmsg' 2009 ;------------------------------------------------------------ 2010 ;sloc0 Allocated with name '_get_Canmsg_sloc0_1_0' 2011 ;sloc1 Allocated with name '_get_Canmsg_sloc1_1_0' 2012 ;sloc2 Allocated with name '_get_Canmsg_sloc2_1_0' 2013 ;sloc3 Allocated with name '_get_Canmsg_sloc3_1_0' 2014 ;sloc4 Allocated with name '_get_Canmsg_sloc4_1_0' 2015 ;sloc5 Allocated with name '_get_Canmsg_sloc5_1_0' 2016 ;------------------------------------------------------------ 047E 2017 G$get_Canmsg$0$0 ==. 047E 2018 C$CAN.c$231$1$1 ==. 2019 ; apps/debugint/../CAN.c:231: uint8 get_Canmsg(Can_msg *msg){ 2020 ; ----------------------------------------- 2021 ; function get_Canmsg 2022 ; ----------------------------------------- 047E 2023 _get_Canmsg: 047E AA F0 2024 mov r2,b 0480 AB 83 2025 mov r3,dph 0482 E5 82 2026 mov a,dpl 0484 78r07 2027 mov r0,#_get_Canmsg_msg_1_1 0486 F2 2028 movx @r0,a 0487 08 2029 inc r0 0488 EB 2030 mov a,r3 0489 F2 2031 movx @r0,a 048A 08 2032 inc r0 048B EA 2033 mov a,r2 048C F2 2034 movx @r0,a 048D 2035 C$CAN.c$232$1$1 ==. 2036 ; apps/debugint/../CAN.c:232: uint8 nmsg = 0,i; 048D 7D 00 2037 mov r5,#0x00 048F 2038 C$CAN.c$233$1$1 ==. 2039 ; apps/debugint/../CAN.c:233: if((read_can_reg(0x2c) & 1) == 1){ // rxbuf0 is full 048F 75 82 2C 2040 mov dpl,#0x2C 0492 C0 05 2041 push ar5 0494 12s00rA9 2042 lcall _read_can_reg 0497 E5 82 2043 mov a,dpl 0499 D0 05 2044 pop ar5 049B 54 01 2045 anl a,#0x01 049D FE 2046 mov r6,a 049E BE 01 02 2047 cjne r6,#0x01,00113$ 04A1 80 03 2048 sjmp 00114$ 04A3 2049 00113$: 04A3 02s05r63 2050 ljmp 00102$ 04A6 2051 00114$: 04A6 2052 C$CAN.c$234$2$2 ==. 2053 ; apps/debugint/../CAN.c:234: read_rxbuf0(); //takes care of clearing interrupt 04A6 12s03r15 2054 lcall _read_rxbuf0 04A9 2055 C$CAN.c$235$2$2 ==. 2056 ; apps/debugint/../CAN.c:235: msg->len = rxdata[5] & 0x0F; 04A9 78r07 2057 mov r0,#_get_Canmsg_msg_1_1 04AB E2 2058 movx a,@r0 04AC 24 02 2059 add a,#0x02 04AE F5*02 2060 mov _get_Canmsg_sloc0_1_0,a 04B0 08 2061 inc r0 04B1 E2 2062 movx a,@r0 04B2 34 00 2063 addc a,#0x00 04B4 F5*03 2064 mov (_get_Canmsg_sloc0_1_0 + 1),a 04B6 08 2065 inc r0 04B7 E2 2066 movx a,@r0 04B8 F5*04 2067 mov (_get_Canmsg_sloc0_1_0 + 2),a 04BA 90s00r13 2068 mov dptr,#(_rxdata + 0x0005) 04BD E0 2069 movx a,@dptr 04BE F5*05 2070 mov _get_Canmsg_sloc1_1_0,a 04C0 74 0F 2071 mov a,#0x0F 04C2 55*05 2072 anl a,_get_Canmsg_sloc1_1_0 04C4 F5*06 2073 mov _get_Canmsg_sloc2_1_0,a 04C6 85*02 82 2074 mov dpl,_get_Canmsg_sloc0_1_0 04C9 85*03 83 2075 mov dph,(_get_Canmsg_sloc0_1_0 + 1) 04CC 85*04 F0 2076 mov b,(_get_Canmsg_sloc0_1_0 + 2) 04CF 12s00r00 2077 lcall __gptrput 04D2 2078 C$CAN.c$236$2$2 ==. 2079 ; apps/debugint/../CAN.c:236: msg->id = (rxdata[1] << 3) + (rxdata[2] >> 5); 04D2 90s00r0F 2080 mov dptr,#(_rxdata + 0x0001) 04D5 E0 2081 movx a,@dptr 04D6 F5*07 2082 mov _get_Canmsg_sloc3_1_0,a 04D8 85*07*08 2083 mov _get_Canmsg_sloc4_1_0,_get_Canmsg_sloc3_1_0 04DB 75*09 00 2084 mov (_get_Canmsg_sloc4_1_0 + 1),#0x00 04DE AB*08 2085 mov r3,_get_Canmsg_sloc4_1_0 04E0 E5*09 2086 mov a,(_get_Canmsg_sloc4_1_0 + 1) 04E2 C4 2087 swap a 04E3 03 2088 rr a 04E4 54 F8 2089 anl a,#0xf8 04E6 CB 2090 xch a,r3 04E7 C4 2091 swap a 04E8 03 2092 rr a 04E9 CB 2093 xch a,r3 04EA 6B 2094 xrl a,r3 04EB CB 2095 xch a,r3 04EC 54 F8 2096 anl a,#0xf8 04EE CB 2097 xch a,r3 04EF 6B 2098 xrl a,r3 04F0 FC 2099 mov r4,a 04F1 90s00r10 2100 mov dptr,#(_rxdata + 0x0002) 04F4 E0 2101 movx a,@dptr 04F5 C4 2102 swap a 04F6 03 2103 rr a 04F7 54 07 2104 anl a,#0x07 04F9 FE 2105 mov r6,a 04FA 7F 00 2106 mov r7,#0x00 04FC 2B 2107 add a,r3 04FD FB 2108 mov r3,a 04FE EF 2109 mov a,r7 04FF 3C 2110 addc a,r4 0500 FC 2111 mov r4,a 0501 78r07 2112 mov r0,#_get_Canmsg_msg_1_1 0503 E2 2113 movx a,@r0 0504 F5 82 2114 mov dpl,a 0506 08 2115 inc r0 0507 E2 2116 movx a,@r0 0508 F5 83 2117 mov dph,a 050A 08 2118 inc r0 050B E2 2119 movx a,@r0 050C F5 F0 2120 mov b,a 050E EB 2121 mov a,r3 050F 12s00r00 2122 lcall __gptrput 0512 A3 2123 inc dptr 0513 EC 2124 mov a,r4 0514 12s00r00 2125 lcall __gptrput 0517 2126 C$CAN.c$237$3$3 ==. 2127 ; apps/debugint/../CAN.c:237: for( i = 0;ilen;i++){ 0517 78r07 2128 mov r0,#_get_Canmsg_msg_1_1 0519 E2 2129 movx a,@r0 051A 24 03 2130 add a,#0x03 051C F5*0A 2131 mov _get_Canmsg_sloc5_1_0,a 051E 08 2132 inc r0 051F E2 2133 movx a,@r0 0520 34 00 2134 addc a,#0x00 0522 F5*0B 2135 mov (_get_Canmsg_sloc5_1_0 + 1),a 0524 08 2136 inc r0 0525 E2 2137 movx a,@r0 0526 F5*0C 2138 mov (_get_Canmsg_sloc5_1_0 + 2),a 0528 7A 00 2139 mov r2,#0x00 052A 2140 00103$: 052A 85*02 82 2141 mov dpl,_get_Canmsg_sloc0_1_0 052D 85*03 83 2142 mov dph,(_get_Canmsg_sloc0_1_0 + 1) 0530 85*04 F0 2143 mov b,(_get_Canmsg_sloc0_1_0 + 2) 0533 12s00r00 2144 lcall __gptrget 0536 FB 2145 mov r3,a 0537 EA 2146 mov a,r2 0538 B5 03 00 2147 cjne a,ar3,00115$ 053B 2148 00115$: 053B 50 24 2149 jnc 00106$ 053D 2150 C$CAN.c$238$3$3 ==. 2151 ; apps/debugint/../CAN.c:238: msg->dat[i] = rxdata[6+i]; 053D EA 2152 mov a,r2 053E 25*0A 2153 add a,_get_Canmsg_sloc5_1_0 0540 FF 2154 mov r7,a 0541 E4 2155 clr a 0542 35*0B 2156 addc a,(_get_Canmsg_sloc5_1_0 + 1) 0544 FB 2157 mov r3,a 0545 AC*0C 2158 mov r4,(_get_Canmsg_sloc5_1_0 + 2) 0547 74 06 2159 mov a,#0x06 0549 2A 2160 add a,r2 054A 24r0E 2161 add a,#_rxdata 054C F5 82 2162 mov dpl,a 054E E4 2163 clr a 054F 34s00 2164 addc a,#(_rxdata >> 8) 0551 F5 83 2165 mov dph,a 0553 E0 2166 movx a,@dptr 0554 FE 2167 mov r6,a 0555 8F 82 2168 mov dpl,r7 0557 8B 83 2169 mov dph,r3 0559 8C F0 2170 mov b,r4 055B 12s00r00 2171 lcall __gptrput 055E 2172 C$CAN.c$237$2$2 ==. 2173 ; apps/debugint/../CAN.c:237: for( i = 0;ilen;i++){ 055E 0A 2174 inc r2 055F 80 C9 2175 sjmp 00103$ 0561 2176 00106$: 0561 2177 C$CAN.c$240$2$2 ==. 2178 ; apps/debugint/../CAN.c:240: nmsg += 1; 0561 7D 01 2179 mov r5,#0x01 0563 2180 00102$: 0563 2181 C$CAN.c$244$1$1 ==. 2182 ; apps/debugint/../CAN.c:244: return nmsg; 0563 8D 82 2183 mov dpl,r5 0565 2184 C$CAN.c$245$1$1 ==. 0565 2185 XG$get_Canmsg$0$0 ==. 0565 22 2186 ret 2187 ;------------------------------------------------------------ 2188 ;Allocation info for local variables in function 'rxbuf0_full' 2189 ;------------------------------------------------------------ 2190 ;------------------------------------------------------------ 0566 2191 G$rxbuf0_full$0$0 ==. 0566 2192 C$CAN.c$247$1$1 ==. 2193 ; apps/debugint/../CAN.c:247: uint8 rxbuf0_full() 2194 ; ----------------------------------------- 2195 ; function rxbuf0_full 2196 ; ----------------------------------------- 0566 2197 _rxbuf0_full: 0566 2198 C$CAN.c$249$1$1 ==. 2199 ; apps/debugint/../CAN.c:249: if((read_can_reg(0x2c) & 1) == 1){ 0566 75 82 2C 2200 mov dpl,#0x2C 0569 12s00rA9 2201 lcall _read_can_reg 056C E5 82 2202 mov a,dpl 056E 54 01 2203 anl a,#0x01 0570 FA 2204 mov r2,a 0571 BA 01 04 2205 cjne r2,#0x01,00102$ 0574 2206 C$CAN.c$250$2$2 ==. 2207 ; apps/debugint/../CAN.c:250: return 1; 0574 75 82 01 2208 mov dpl,#0x01 0577 2209 C$CAN.c$252$1$1 ==. 2210 ; apps/debugint/../CAN.c:252: return 0; 0577 2211 C$CAN.c$253$1$1 ==. 0577 2212 XG$rxbuf0_full$0$0 ==. 0577 22 2213 ret 0578 2214 00102$: 0578 75 82 00 2215 mov dpl,#0x00 057B 22 2216 ret 2217 ;------------------------------------------------------------ 2218 ;Allocation info for local variables in function 'testfun' 2219 ;------------------------------------------------------------ 2220 ;------------------------------------------------------------ 057C 2221 G$testfun$0$0 ==. 057C 2222 C$CAN.c$255$1$1 ==. 2223 ; apps/debugint/../CAN.c:255: uint8 testfun(){ 2224 ; ----------------------------------------- 2225 ; function testfun 2226 ; ----------------------------------------- 057C 2227 _testfun: 057C 2228 C$CAN.c$256$1$1 ==. 2229 ; apps/debugint/../CAN.c:256: return 88; 057C 75 82 58 2230 mov dpl,#0x58 057F 2231 C$CAN.c$257$1$1 ==. 057F 2232 XG$testfun$0$0 ==. 057F 22 2233 ret 2234 ;------------------------------------------------------------ 2235 ;Allocation info for local variables in function 'spi_UM6_init' 2236 ;------------------------------------------------------------ 2237 ;------------------------------------------------------------ 0580 2238 G$spi_UM6_init$0$0 ==. 0580 2239 C$UM6.c$108$1$1 ==. 2240 ; apps/debugint/../UM6.c:108: void spi_UM6_init(){ 2241 ; ----------------------------------------- 2242 ; function spi_UM6_init 2243 ; ----------------------------------------- 0580 2244 _spi_UM6_init: 0580 2245 C$UM6.c$109$1$1 ==. 2246 ; apps/debugint/../UM6.c:109: spi_UM6MasterInit(); 0580 12s00r00 2247 lcall _spi1MasterInit 0583 2248 C$UM6.c$110$1$1 ==. 2249 ; apps/debugint/../UM6.c:110: spi_UM6MasterSetFrequency(230400); 0583 90 84 00 2250 mov dptr,#0x8400 0586 75 F0 03 2251 mov b,#0x03 0589 E4 2252 clr a 058A 12s00r00 2253 lcall _spi1MasterSetFrequency 058D 2254 C$UM6.c$111$1$1 ==. 2255 ; apps/debugint/../UM6.c:111: spi_UM6MasterSetClockPolarity(SPI_POLARITY_IDLE_LOW); // SCK LOW when no data is being transmitted 058D C2*00 2256 clr _spi1MasterSetClockPolarity_PARM_1 058F 12s00r00 2257 lcall _spi1MasterSetClockPolarity 0592 2258 C$UM6.c$112$1$1 ==. 2259 ; apps/debugint/../UM6.c:112: spi_UM6MasterSetClockPhase(SPI_PHASE_EDGE_LEADING); // data sampled when clock goes from active to idle 0592 C2*00 2260 clr _spi1MasterSetClockPhase_PARM_1 0594 12s00r00 2261 lcall _spi1MasterSetClockPhase 0597 2262 C$UM6.c$113$1$1 ==. 2263 ; apps/debugint/../UM6.c:113: spi_UM6MasterSetBitOrder(SPI_BIT_ORDER_MSB_FIRST); 0597 C2*00 2264 clr _spi1MasterSetBitOrder_PARM_1 0599 2265 C$UM6.c$114$1$1 ==. 0599 2266 XG$spi_UM6_init$0$0 ==. 0599 02s00r00 2267 ljmp _spi1MasterSetBitOrder 2268 ;------------------------------------------------------------ 2269 ;Allocation info for local variables in function 'write_UM6comm' 2270 ;------------------------------------------------------------ 2271 ;------------------------------------------------------------ 059C 2272 G$write_UM6comm$0$0 ==. 059C 2273 C$UM6.c$187$1$1 ==. 2274 ; apps/debugint/../UM6.c:187: void write_UM6comm(){ 2275 ; ----------------------------------------- 2276 ; function write_UM6comm 2277 ; ----------------------------------------- 059C 2278 _write_UM6comm: 059C 2279 C$UM6.c$188$1$1 ==. 2280 ; apps/debugint/../UM6.c:188: IMU_txdata[0] =0x01; // write command 059C 90s00r2A 2281 mov dptr,#_IMU_txdata 059F 74 01 2282 mov a,#0x01 05A1 F0 2283 movx @dptr,a 05A2 2284 C$UM6.c$189$1$1 ==. 2285 ; apps/debugint/../UM6.c:189: IMU_txdata[1]=0x00; // address of the UM6_Comm register 05A2 90s00r2B 2286 mov dptr,#(_IMU_txdata + 0x0001) 05A5 E4 2287 clr a 05A6 F0 2288 movx @dptr,a 05A7 2289 C$UM6.c$190$1$1 ==. 2290 ; apps/debugint/../UM6.c:190: IMU_txdata[2] = 0x38; //Byte4 05A7 90s00r2C 2291 mov dptr,#(_IMU_txdata + 0x0002) 05AA 74 38 2292 mov a,#0x38 05AC F0 2293 movx @dptr,a 05AD 2294 C$UM6.c$191$1$1 ==. 2295 ; apps/debugint/../UM6.c:191: IMU_txdata[3] = 0x40; // Byte3 05AD 90s00r2D 2296 mov dptr,#(_IMU_txdata + 0x0003) 05B0 74 40 2297 mov a,#0x40 05B2 F0 2298 movx @dptr,a 05B3 2299 C$UM6.c$192$1$1 ==. 2300 ; apps/debugint/../UM6.c:192: IMU_txdata[4]= 0x05; //Byte2 05B3 90s00r2E 2301 mov dptr,#(_IMU_txdata + 0x0004) 05B6 74 05 2302 mov a,#0x05 05B8 F0 2303 movx @dptr,a 05B9 2304 C$UM6.c$193$1$1 ==. 2305 ; apps/debugint/../UM6.c:193: IMU_txdata[5] = 0x00; //Byte1 05B9 90s00r2F 2306 mov dptr,#(_IMU_txdata + 0x0005) 05BC E4 2307 clr a 05BD F0 2308 movx @dptr,a 05BE 2309 C$UM6.c$194$1$1 ==. 2310 ; apps/debugint/../UM6.c:194: IMU_CSlow; 05BE C2 F0 2311 clr b[0] 05C0 85 F0*00 2312 mov bits,b 05C3 75 82 0E 2313 mov dpl,#0x0E 05C6 12s00r00 2314 lcall _setDigitalOutput 05C9 2315 C$UM6.c$195$1$1 ==. 2316 ; apps/debugint/../UM6.c:195: spi_UM6MasterTransfer(IMU_txdata,IMU_rxdata,6); 05C9 78r00 2317 mov r0,#_spi1MasterTransfer_PARM_2 05CB 74r32 2318 mov a,#_IMU_rxdata 05CD F2 2319 movx @r0,a 05CE 08 2320 inc r0 05CF 74s00 2321 mov a,#(_IMU_rxdata >> 8) 05D1 F2 2322 movx @r0,a 05D2 78r00 2323 mov r0,#_spi1MasterTransfer_PARM_3 05D4 74 06 2324 mov a,#0x06 05D6 F2 2325 movx @r0,a 05D7 08 2326 inc r0 05D8 E4 2327 clr a 05D9 F2 2328 movx @r0,a 05DA 90s00r2A 2329 mov dptr,#_IMU_txdata 05DD 12s00r00 2330 lcall _spi1MasterTransfer 05E0 2331 C$UM6.c$196$1$1 ==. 2332 ; apps/debugint/../UM6.c:196: while(spi_UM6MasterBusy()){ } 05E0 2333 00101$: 05E0 12s00r00 2334 lcall _spi1MasterBusy 05E3 40 FB 2335 jc 00101$ 05E5 2336 C$UM6.c$197$1$1 ==. 2337 ; apps/debugint/../UM6.c:197: IMU_CShigh; 05E5 D2 F0 2338 setb b[0] 05E7 85 F0*00 2339 mov bits,b 05EA 75 82 0E 2340 mov dpl,#0x0E 05ED 2341 C$UM6.c$198$1$1 ==. 05ED 2342 XG$write_UM6comm$0$0 ==. 05ED 02s00r00 2343 ljmp _setDigitalOutput 2344 ;------------------------------------------------------------ 2345 ;Allocation info for local variables in function 'Zero_Gyros' 2346 ;------------------------------------------------------------ 2347 ;------------------------------------------------------------ 05F0 2348 G$Zero_Gyros$0$0 ==. 05F0 2349 C$UM6.c$203$1$1 ==. 2350 ; apps/debugint/../UM6.c:203: void Zero_Gyros(){ 2351 ; ----------------------------------------- 2352 ; function Zero_Gyros 2353 ; ----------------------------------------- 05F0 2354 _Zero_Gyros: 05F0 2355 C$UM6.c$204$1$1 ==. 2356 ; apps/debugint/../UM6.c:204: IMU_rxdata[0] =0x01; // write command 05F0 90s00r32 2357 mov dptr,#_IMU_rxdata 05F3 74 01 2358 mov a,#0x01 05F5 F0 2359 movx @dptr,a 05F6 2360 C$UM6.c$205$1$1 ==. 2361 ; apps/debugint/../UM6.c:205: IMU_rxdata[1]=0xAC; // command byte to determine gyro biases 05F6 90s00r33 2362 mov dptr,#(_IMU_rxdata + 0x0001) 05F9 74 AC 2363 mov a,#0xAC 05FB F0 2364 movx @dptr,a 05FC 2365 C$UM6.c$206$1$1 ==. 2366 ; apps/debugint/../UM6.c:206: IMU_CSlow; 05FC C2 F0 2367 clr b[0] 05FE 85 F0*00 2368 mov bits,b 0601 75 82 0E 2369 mov dpl,#0x0E 0604 12s00r00 2370 lcall _setDigitalOutput 0607 2371 C$UM6.c$207$1$1 ==. 2372 ; apps/debugint/../UM6.c:207: spi_UM6MasterTransfer(IMU_rxdata,IMU_rxdata,6); 0607 78r00 2373 mov r0,#_spi1MasterTransfer_PARM_2 0609 74r32 2374 mov a,#_IMU_rxdata 060B F2 2375 movx @r0,a 060C 08 2376 inc r0 060D 74s00 2377 mov a,#(_IMU_rxdata >> 8) 060F F2 2378 movx @r0,a 0610 78r00 2379 mov r0,#_spi1MasterTransfer_PARM_3 0612 74 06 2380 mov a,#0x06 0614 F2 2381 movx @r0,a 0615 08 2382 inc r0 0616 E4 2383 clr a 0617 F2 2384 movx @r0,a 0618 90s00r32 2385 mov dptr,#_IMU_rxdata 061B 12s00r00 2386 lcall _spi1MasterTransfer 061E 2387 C$UM6.c$208$1$1 ==. 2388 ; apps/debugint/../UM6.c:208: while(spi_UM6MasterBusy()){ } 061E 2389 00101$: 061E 12s00r00 2390 lcall _spi1MasterBusy 0621 40 FB 2391 jc 00101$ 0623 2392 C$UM6.c$209$1$1 ==. 2393 ; apps/debugint/../UM6.c:209: IMU_CShigh; 0623 D2 F0 2394 setb b[0] 0625 85 F0*00 2395 mov bits,b 0628 75 82 0E 2396 mov dpl,#0x0E 062B 2397 C$UM6.c$210$1$1 ==. 062B 2398 XG$Zero_Gyros$0$0 ==. 062B 02s00r00 2399 ljmp _setDigitalOutput 2400 ;------------------------------------------------------------ 2401 ;Allocation info for local variables in function 'write_UM6_Miscconfig' 2402 ;------------------------------------------------------------ 2403 ;------------------------------------------------------------ 062E 2404 G$write_UM6_Miscconfig$0$0 ==. 062E 2405 C$UM6.c$214$1$1 ==. 2406 ; apps/debugint/../UM6.c:214: void write_UM6_Miscconfig(){ 2407 ; ----------------------------------------- 2408 ; function write_UM6_Miscconfig 2409 ; ----------------------------------------- 062E 2410 _write_UM6_Miscconfig: 062E 2411 C$UM6.c$215$1$1 ==. 2412 ; apps/debugint/../UM6.c:215: IMU_rxdata[0] =0x01; // write command 062E 90s00r32 2413 mov dptr,#_IMU_rxdata 0631 74 01 2414 mov a,#0x01 0633 F0 2415 movx @dptr,a 0634 2416 C$UM6.c$216$1$1 ==. 2417 ; apps/debugint/../UM6.c:216: IMU_rxdata[1]=0x01; // Address of MISC_CONFIG register 0634 90s00r33 2418 mov dptr,#(_IMU_rxdata + 0x0001) 0637 74 01 2419 mov a,#0x01 0639 F0 2420 movx @dptr,a 063A 2421 C$UM6.c$217$1$1 ==. 2422 ; apps/debugint/../UM6.c:217: IMU_rxdata[2] = 0x50; 063A 90s00r34 2423 mov dptr,#(_IMU_rxdata + 0x0002) 063D 74 50 2424 mov a,#0x50 063F F0 2425 movx @dptr,a 0640 2426 C$UM6.c$218$1$1 ==. 2427 ; apps/debugint/../UM6.c:218: IMU_rxdata[3] = 0x0; 0640 90s00r35 2428 mov dptr,#(_IMU_rxdata + 0x0003) 0643 2429 C$UM6.c$219$1$1 ==. 2430 ; apps/debugint/../UM6.c:219: IMU_rxdata[4]= 0x0; 0643 2431 C$UM6.c$220$1$1 ==. 2432 ; apps/debugint/../UM6.c:220: IMU_rxdata[5] = 0x0; 0643 E4 2433 clr a 0644 F0 2434 movx @dptr,a 0645 90s00r36 2435 mov dptr,#(_IMU_rxdata + 0x0004) 0648 F0 2436 movx @dptr,a 0649 90s00r37 2437 mov dptr,#(_IMU_rxdata + 0x0005) 064C F0 2438 movx @dptr,a 064D 2439 C$UM6.c$221$1$1 ==. 2440 ; apps/debugint/../UM6.c:221: IMU_CSlow; 064D C2 F0 2441 clr b[0] 064F 85 F0*00 2442 mov bits,b 0652 75 82 0E 2443 mov dpl,#0x0E 0655 12s00r00 2444 lcall _setDigitalOutput 0658 2445 C$UM6.c$222$1$1 ==. 2446 ; apps/debugint/../UM6.c:222: spi_UM6MasterTransfer(IMU_txdata,IMU_rxdata,6); 0658 78r00 2447 mov r0,#_spi1MasterTransfer_PARM_2 065A 74r32 2448 mov a,#_IMU_rxdata 065C F2 2449 movx @r0,a 065D 08 2450 inc r0 065E 74s00 2451 mov a,#(_IMU_rxdata >> 8) 0660 F2 2452 movx @r0,a 0661 78r00 2453 mov r0,#_spi1MasterTransfer_PARM_3 0663 74 06 2454 mov a,#0x06 0665 F2 2455 movx @r0,a 0666 08 2456 inc r0 0667 E4 2457 clr a 0668 F2 2458 movx @r0,a 0669 90s00r2A 2459 mov dptr,#_IMU_txdata 066C 12s00r00 2460 lcall _spi1MasterTransfer 066F 2461 C$UM6.c$223$1$1 ==. 2462 ; apps/debugint/../UM6.c:223: while(spi_UM6MasterBusy()){ } 066F 2463 00101$: 066F 12s00r00 2464 lcall _spi1MasterBusy 0672 40 FB 2465 jc 00101$ 0674 2466 C$UM6.c$224$1$1 ==. 2467 ; apps/debugint/../UM6.c:224: IMU_CShigh; 0674 D2 F0 2468 setb b[0] 0676 85 F0*00 2469 mov bits,b 0679 75 82 0E 2470 mov dpl,#0x0E 067C 2471 C$UM6.c$225$1$1 ==. 067C 2472 XG$write_UM6_Miscconfig$0$0 ==. 067C 02s00r00 2473 ljmp _setDigitalOutput 2474 ;------------------------------------------------------------ 2475 ;Allocation info for local variables in function 'read_accel_rawZ' 2476 ;------------------------------------------------------------ 2477 ;------------------------------------------------------------ 067F 2478 G$read_accel_rawZ$0$0 ==. 067F 2479 C$UM6.c$229$1$1 ==. 2480 ; apps/debugint/../UM6.c:229: void read_accel_rawZ(){ 2481 ; ----------------------------------------- 2482 ; function read_accel_rawZ 2483 ; ----------------------------------------- 067F 2484 _read_accel_rawZ: 067F 2485 C$UM6.c$230$1$1 ==. 2486 ; apps/debugint/../UM6.c:230: IMU_txdata[0] = 0; //read command 067F 90s00r2A 2487 mov dptr,#_IMU_txdata 0682 E4 2488 clr a 0683 F0 2489 movx @dptr,a 0684 2490 C$UM6.c$231$1$1 ==. 2491 ; apps/debugint/../UM6.c:231: IMU_txdata[1] = 0x5b; // address of accelrawZ 0684 90s00r2B 2492 mov dptr,#(_IMU_txdata + 0x0001) 0687 74 5B 2493 mov a,#0x5B 0689 F0 2494 movx @dptr,a 068A 2495 C$UM6.c$232$1$1 ==. 2496 ; apps/debugint/../UM6.c:232: IMU_CSlow; 068A C2 F0 2497 clr b[0] 068C 85 F0*00 2498 mov bits,b 068F 75 82 0E 2499 mov dpl,#0x0E 0692 12s00r00 2500 lcall _setDigitalOutput 0695 2501 C$UM6.c$233$1$1 ==. 2502 ; apps/debugint/../UM6.c:233: spi_UM6MasterTransfer(IMU_txdata,IMU_rxdata,6); 0695 78r00 2503 mov r0,#_spi1MasterTransfer_PARM_2 0697 74r32 2504 mov a,#_IMU_rxdata 0699 F2 2505 movx @r0,a 069A 08 2506 inc r0 069B 74s00 2507 mov a,#(_IMU_rxdata >> 8) 069D F2 2508 movx @r0,a 069E 78r00 2509 mov r0,#_spi1MasterTransfer_PARM_3 06A0 74 06 2510 mov a,#0x06 06A2 F2 2511 movx @r0,a 06A3 08 2512 inc r0 06A4 E4 2513 clr a 06A5 F2 2514 movx @r0,a 06A6 90s00r2A 2515 mov dptr,#_IMU_txdata 06A9 12s00r00 2516 lcall _spi1MasterTransfer 06AC 2517 C$UM6.c$234$1$1 ==. 2518 ; apps/debugint/../UM6.c:234: while(spi_UM6MasterBusy()){ } 06AC 2519 00101$: 06AC 12s00r00 2520 lcall _spi1MasterBusy 06AF 40 FB 2521 jc 00101$ 06B1 2522 C$UM6.c$235$1$1 ==. 2523 ; apps/debugint/../UM6.c:235: IMU_CShigh; 06B1 D2 F0 2524 setb b[0] 06B3 85 F0*00 2525 mov bits,b 06B6 75 82 0E 2526 mov dpl,#0x0E 06B9 12s00r00 2527 lcall _setDigitalOutput 06BC 2528 C$UM6.c$236$1$1 ==. 2529 ; apps/debugint/../UM6.c:236: accelrawZ.temp[0] = IMU_rxdata[3]; 06BC 90s00r35 2530 mov dptr,#(_IMU_rxdata + 0x0003) 06BF E0 2531 movx a,@dptr 06C0 FA 2532 mov r2,a 06C1 78r14 2533 mov r0,#_accelrawZ 06C3 EA 2534 mov a,r2 06C4 F2 2535 movx @r0,a 06C5 2536 C$UM6.c$237$1$1 ==. 2537 ; apps/debugint/../UM6.c:237: accelrawZ.temp[1] = IMU_rxdata[2]; 06C5 90s00r34 2538 mov dptr,#(_IMU_rxdata + 0x0002) 06C8 E0 2539 movx a,@dptr 06C9 FA 2540 mov r2,a 06CA 78r15 2541 mov r0,#(_accelrawZ + 0x0001) 06CC EA 2542 mov a,r2 06CD F2 2543 movx @r0,a 06CE 2544 C$UM6.c$239$1$1 ==. 06CE 2545 XG$read_accel_rawZ$0$0 ==. 06CE 22 2546 ret 2547 ;------------------------------------------------------------ 2548 ;Allocation info for local variables in function 'read_euler_psi' 2549 ;------------------------------------------------------------ 2550 ;------------------------------------------------------------ 06CF 2551 G$read_euler_psi$0$0 ==. 06CF 2552 C$UM6.c$243$1$1 ==. 2553 ; apps/debugint/../UM6.c:243: void read_euler_psi(){ 2554 ; ----------------------------------------- 2555 ; function read_euler_psi 2556 ; ----------------------------------------- 06CF 2557 _read_euler_psi: 06CF 2558 C$UM6.c$244$1$1 ==. 2559 ; apps/debugint/../UM6.c:244: IMU_txdata[0] = 0; //read command 06CF 90s00r2A 2560 mov dptr,#_IMU_txdata 06D2 E4 2561 clr a 06D3 F0 2562 movx @dptr,a 06D4 2563 C$UM6.c$245$1$1 ==. 2564 ; apps/debugint/../UM6.c:245: IMU_txdata[1] = 0x63; // address = accelrawz 06D4 90s00r2B 2565 mov dptr,#(_IMU_txdata + 0x0001) 06D7 74 63 2566 mov a,#0x63 06D9 F0 2567 movx @dptr,a 06DA 2568 C$UM6.c$246$1$1 ==. 2569 ; apps/debugint/../UM6.c:246: IMU_CSlow; 06DA C2 F0 2570 clr b[0] 06DC 85 F0*00 2571 mov bits,b 06DF 75 82 0E 2572 mov dpl,#0x0E 06E2 12s00r00 2573 lcall _setDigitalOutput 06E5 2574 C$UM6.c$247$1$1 ==. 2575 ; apps/debugint/../UM6.c:247: spi_UM6MasterTransfer(IMU_txdata,IMU_rxdata,6); 06E5 78r00 2576 mov r0,#_spi1MasterTransfer_PARM_2 06E7 74r32 2577 mov a,#_IMU_rxdata 06E9 F2 2578 movx @r0,a 06EA 08 2579 inc r0 06EB 74s00 2580 mov a,#(_IMU_rxdata >> 8) 06ED F2 2581 movx @r0,a 06EE 78r00 2582 mov r0,#_spi1MasterTransfer_PARM_3 06F0 74 06 2583 mov a,#0x06 06F2 F2 2584 movx @r0,a 06F3 08 2585 inc r0 06F4 E4 2586 clr a 06F5 F2 2587 movx @r0,a 06F6 90s00r2A 2588 mov dptr,#_IMU_txdata 06F9 12s00r00 2589 lcall _spi1MasterTransfer 06FC 2590 C$UM6.c$248$1$1 ==. 2591 ; apps/debugint/../UM6.c:248: while(spi_UM6MasterBusy()){ } 06FC 2592 00101$: 06FC 12s00r00 2593 lcall _spi1MasterBusy 06FF 40 FB 2594 jc 00101$ 0701 2595 C$UM6.c$249$1$1 ==. 2596 ; apps/debugint/../UM6.c:249: IMU_CShigh; 0701 D2 F0 2597 setb b[0] 0703 85 F0*00 2598 mov bits,b 0706 75 82 0E 2599 mov dpl,#0x0E 0709 12s00r00 2600 lcall _setDigitalOutput 070C 2601 C$UM6.c$250$1$1 ==. 2602 ; apps/debugint/../UM6.c:250: euler_psi.temp[0] = IMU_rxdata[3]; 070C 90s00r35 2603 mov dptr,#(_IMU_rxdata + 0x0003) 070F E0 2604 movx a,@dptr 0710 FA 2605 mov r2,a 0711 78r16 2606 mov r0,#_euler_psi 0713 EA 2607 mov a,r2 0714 F2 2608 movx @r0,a 0715 2609 C$UM6.c$251$1$1 ==. 2610 ; apps/debugint/../UM6.c:251: euler_psi.temp[1] = IMU_rxdata[2]; 0715 90s00r34 2611 mov dptr,#(_IMU_rxdata + 0x0002) 0718 E0 2612 movx a,@dptr 0719 FA 2613 mov r2,a 071A 78r17 2614 mov r0,#(_euler_psi + 0x0001) 071C EA 2615 mov a,r2 071D F2 2616 movx @r0,a 071E 2617 C$UM6.c$253$1$1 ==. 071E 2618 XG$read_euler_psi$0$0 ==. 071E 22 2619 ret 2620 ;------------------------------------------------------------ 2621 ;Allocation info for local variables in function 'read_euler_phi_theta' 2622 ;------------------------------------------------------------ 2623 ;------------------------------------------------------------ 071F 2624 G$read_euler_phi_theta$0$0 ==. 071F 2625 C$UM6.c$258$1$1 ==. 2626 ; apps/debugint/../UM6.c:258: void read_euler_phi_theta(){ 2627 ; ----------------------------------------- 2628 ; function read_euler_phi_theta 2629 ; ----------------------------------------- 071F 2630 _read_euler_phi_theta: 071F 2631 C$UM6.c$259$1$1 ==. 2632 ; apps/debugint/../UM6.c:259: IMU_txdata[0] = 0; //read command 071F 90s00r2A 2633 mov dptr,#_IMU_txdata 0722 E4 2634 clr a 0723 F0 2635 movx @dptr,a 0724 2636 C$UM6.c$260$1$1 ==. 2637 ; apps/debugint/../UM6.c:260: IMU_txdata[1] = 0x62; // address = accelrawz 0724 90s00r2B 2638 mov dptr,#(_IMU_txdata + 0x0001) 0727 74 62 2639 mov a,#0x62 0729 F0 2640 movx @dptr,a 072A 2641 C$UM6.c$261$1$1 ==. 2642 ; apps/debugint/../UM6.c:261: IMU_CSlow; 072A C2 F0 2643 clr b[0] 072C 85 F0*00 2644 mov bits,b 072F 75 82 0E 2645 mov dpl,#0x0E 0732 12s00r00 2646 lcall _setDigitalOutput 0735 2647 C$UM6.c$262$1$1 ==. 2648 ; apps/debugint/../UM6.c:262: spi_UM6MasterTransfer(IMU_txdata,IMU_rxdata,6); 0735 78r00 2649 mov r0,#_spi1MasterTransfer_PARM_2 0737 74r32 2650 mov a,#_IMU_rxdata 0739 F2 2651 movx @r0,a 073A 08 2652 inc r0 073B 74s00 2653 mov a,#(_IMU_rxdata >> 8) 073D F2 2654 movx @r0,a 073E 78r00 2655 mov r0,#_spi1MasterTransfer_PARM_3 0740 74 06 2656 mov a,#0x06 0742 F2 2657 movx @r0,a 0743 08 2658 inc r0 0744 E4 2659 clr a 0745 F2 2660 movx @r0,a 0746 90s00r2A 2661 mov dptr,#_IMU_txdata 0749 12s00r00 2662 lcall _spi1MasterTransfer 074C 2663 C$UM6.c$263$1$1 ==. 2664 ; apps/debugint/../UM6.c:263: while(spi_UM6MasterBusy()){ } 074C 2665 00101$: 074C 12s00r00 2666 lcall _spi1MasterBusy 074F 40 FB 2667 jc 00101$ 0751 2668 C$UM6.c$264$1$1 ==. 2669 ; apps/debugint/../UM6.c:264: IMU_CShigh; 0751 D2 F0 2670 setb b[0] 0753 85 F0*00 2671 mov bits,b 0756 75 82 0E 2672 mov dpl,#0x0E 0759 12s00r00 2673 lcall _setDigitalOutput 075C 2674 C$UM6.c$265$1$1 ==. 2675 ; apps/debugint/../UM6.c:265: euler_phi.temp[0] = IMU_rxdata[3]; 075C 90s00r35 2676 mov dptr,#(_IMU_rxdata + 0x0003) 075F E0 2677 movx a,@dptr 0760 FA 2678 mov r2,a 0761 78r18 2679 mov r0,#_euler_phi 0763 EA 2680 mov a,r2 0764 F2 2681 movx @r0,a 0765 2682 C$UM6.c$266$1$1 ==. 2683 ; apps/debugint/../UM6.c:266: euler_phi.temp[1] = IMU_rxdata[2]; 0765 90s00r34 2684 mov dptr,#(_IMU_rxdata + 0x0002) 0768 E0 2685 movx a,@dptr 0769 FA 2686 mov r2,a 076A 78r19 2687 mov r0,#(_euler_phi + 0x0001) 076C EA 2688 mov a,r2 076D F2 2689 movx @r0,a 076E 2690 C$UM6.c$267$1$1 ==. 2691 ; apps/debugint/../UM6.c:267: euler_theta.temp[0] = IMU_rxdata[5]; 076E 90s00r37 2692 mov dptr,#(_IMU_rxdata + 0x0005) 0771 E0 2693 movx a,@dptr 0772 FA 2694 mov r2,a 0773 78r1A 2695 mov r0,#_euler_theta 0775 EA 2696 mov a,r2 0776 F2 2697 movx @r0,a 0777 2698 C$UM6.c$268$1$1 ==. 2699 ; apps/debugint/../UM6.c:268: euler_theta.temp[1] = IMU_rxdata[4]; 0777 90s00r36 2700 mov dptr,#(_IMU_rxdata + 0x0004) 077A E0 2701 movx a,@dptr 077B FA 2702 mov r2,a 077C 78r1B 2703 mov r0,#(_euler_theta + 0x0001) 077E EA 2704 mov a,r2 077F F2 2705 movx @r0,a 0780 2706 C$UM6.c$270$1$1 ==. 0780 2707 XG$read_euler_phi_theta$0$0 ==. 0780 22 2708 ret 2709 ;------------------------------------------------------------ 2710 ;Allocation info for local variables in function 'read_accel_procZ' 2711 ;------------------------------------------------------------ 2712 ;------------------------------------------------------------ 0781 2713 G$read_accel_procZ$0$0 ==. 0781 2714 C$UM6.c$274$1$1 ==. 2715 ; apps/debugint/../UM6.c:274: void read_accel_procZ(){ 2716 ; ----------------------------------------- 2717 ; function read_accel_procZ 2718 ; ----------------------------------------- 0781 2719 _read_accel_procZ: 0781 2720 C$UM6.c$275$1$1 ==. 2721 ; apps/debugint/../UM6.c:275: IMU_txdata[0] = 0; //read command 0781 90s00r2A 2722 mov dptr,#_IMU_txdata 0784 E4 2723 clr a 0785 F0 2724 movx @dptr,a 0786 2725 C$UM6.c$276$1$1 ==. 2726 ; apps/debugint/../UM6.c:276: IMU_txdata[1] = 0x5f; // address of processed accelZ register 0786 90s00r2B 2727 mov dptr,#(_IMU_txdata + 0x0001) 0789 74 5F 2728 mov a,#0x5F 078B F0 2729 movx @dptr,a 078C 2730 C$UM6.c$277$1$1 ==. 2731 ; apps/debugint/../UM6.c:277: IMU_CSlow; 078C C2 F0 2732 clr b[0] 078E 85 F0*00 2733 mov bits,b 0791 75 82 0E 2734 mov dpl,#0x0E 0794 12s00r00 2735 lcall _setDigitalOutput 0797 2736 C$UM6.c$278$1$1 ==. 2737 ; apps/debugint/../UM6.c:278: spi_UM6MasterTransfer(IMU_txdata,IMU_rxdata,6); 0797 78r00 2738 mov r0,#_spi1MasterTransfer_PARM_2 0799 74r32 2739 mov a,#_IMU_rxdata 079B F2 2740 movx @r0,a 079C 08 2741 inc r0 079D 74s00 2742 mov a,#(_IMU_rxdata >> 8) 079F F2 2743 movx @r0,a 07A0 78r00 2744 mov r0,#_spi1MasterTransfer_PARM_3 07A2 74 06 2745 mov a,#0x06 07A4 F2 2746 movx @r0,a 07A5 08 2747 inc r0 07A6 E4 2748 clr a 07A7 F2 2749 movx @r0,a 07A8 90s00r2A 2750 mov dptr,#_IMU_txdata 07AB 12s00r00 2751 lcall _spi1MasterTransfer 07AE 2752 C$UM6.c$279$1$1 ==. 2753 ; apps/debugint/../UM6.c:279: while(spi_UM6MasterBusy()){ } 07AE 2754 00101$: 07AE 12s00r00 2755 lcall _spi1MasterBusy 07B1 40 FB 2756 jc 00101$ 07B3 2757 C$UM6.c$280$1$1 ==. 2758 ; apps/debugint/../UM6.c:280: IMU_CShigh; 07B3 D2 F0 2759 setb b[0] 07B5 85 F0*00 2760 mov bits,b 07B8 75 82 0E 2761 mov dpl,#0x0E 07BB 12s00r00 2762 lcall _setDigitalOutput 07BE 2763 C$UM6.c$282$1$1 ==. 2764 ; apps/debugint/../UM6.c:282: accelprocZ.temp[0] = IMU_rxdata[3]; 07BE 90s00r35 2765 mov dptr,#(_IMU_rxdata + 0x0003) 07C1 E0 2766 movx a,@dptr 07C2 FA 2767 mov r2,a 07C3 78r0E 2768 mov r0,#_accelprocZ 07C5 EA 2769 mov a,r2 07C6 F2 2770 movx @r0,a 07C7 2771 C$UM6.c$283$1$1 ==. 2772 ; apps/debugint/../UM6.c:283: accelprocZ.temp[1] = IMU_rxdata[2]; 07C7 90s00r34 2773 mov dptr,#(_IMU_rxdata + 0x0002) 07CA E0 2774 movx a,@dptr 07CB FA 2775 mov r2,a 07CC 78r0F 2776 mov r0,#(_accelprocZ + 0x0001) 07CE EA 2777 mov a,r2 07CF F2 2778 movx @r0,a 07D0 2779 C$UM6.c$285$1$1 ==. 07D0 2780 XG$read_accel_procZ$0$0 ==. 07D0 22 2781 ret 2782 ;------------------------------------------------------------ 2783 ;Allocation info for local variables in function 'read_gyro_procZ' 2784 ;------------------------------------------------------------ 2785 ;------------------------------------------------------------ 07D1 2786 G$read_gyro_procZ$0$0 ==. 07D1 2787 C$UM6.c$289$1$1 ==. 2788 ; apps/debugint/../UM6.c:289: void read_gyro_procZ(){ 2789 ; ----------------------------------------- 2790 ; function read_gyro_procZ 2791 ; ----------------------------------------- 07D1 2792 _read_gyro_procZ: 07D1 2793 C$UM6.c$290$1$1 ==. 2794 ; apps/debugint/../UM6.c:290: IMU_txdata[0] = 0; //read command 07D1 90s00r2A 2795 mov dptr,#_IMU_txdata 07D4 E4 2796 clr a 07D5 F0 2797 movx @dptr,a 07D6 2798 C$UM6.c$291$1$1 ==. 2799 ; apps/debugint/../UM6.c:291: IMU_txdata[1] = 0x5d; // address of processed gyroZ register 07D6 90s00r2B 2800 mov dptr,#(_IMU_txdata + 0x0001) 07D9 74 5D 2801 mov a,#0x5D 07DB F0 2802 movx @dptr,a 07DC 2803 C$UM6.c$292$1$1 ==. 2804 ; apps/debugint/../UM6.c:292: IMU_CSlow; 07DC C2 F0 2805 clr b[0] 07DE 85 F0*00 2806 mov bits,b 07E1 75 82 0E 2807 mov dpl,#0x0E 07E4 12s00r00 2808 lcall _setDigitalOutput 07E7 2809 C$UM6.c$293$1$1 ==. 2810 ; apps/debugint/../UM6.c:293: spi_UM6MasterTransfer(IMU_txdata,IMU_rxdata,6); 07E7 78r00 2811 mov r0,#_spi1MasterTransfer_PARM_2 07E9 74r32 2812 mov a,#_IMU_rxdata 07EB F2 2813 movx @r0,a 07EC 08 2814 inc r0 07ED 74s00 2815 mov a,#(_IMU_rxdata >> 8) 07EF F2 2816 movx @r0,a 07F0 78r00 2817 mov r0,#_spi1MasterTransfer_PARM_3 07F2 74 06 2818 mov a,#0x06 07F4 F2 2819 movx @r0,a 07F5 08 2820 inc r0 07F6 E4 2821 clr a 07F7 F2 2822 movx @r0,a 07F8 90s00r2A 2823 mov dptr,#_IMU_txdata 07FB 12s00r00 2824 lcall _spi1MasterTransfer 07FE 2825 C$UM6.c$294$1$1 ==. 2826 ; apps/debugint/../UM6.c:294: while(spi_UM6MasterBusy()){ } 07FE 2827 00101$: 07FE 12s00r00 2828 lcall _spi1MasterBusy 0801 40 FB 2829 jc 00101$ 0803 2830 C$UM6.c$295$1$1 ==. 2831 ; apps/debugint/../UM6.c:295: IMU_CShigh; 0803 D2 F0 2832 setb b[0] 0805 85 F0*00 2833 mov bits,b 0808 75 82 0E 2834 mov dpl,#0x0E 080B 12s00r00 2835 lcall _setDigitalOutput 080E 2836 C$UM6.c$297$1$1 ==. 2837 ; apps/debugint/../UM6.c:297: gyroprocZ.temp[0] = IMU_rxdata[3]; 080E 90s00r35 2838 mov dptr,#(_IMU_rxdata + 0x0003) 0811 E0 2839 movx a,@dptr 0812 FA 2840 mov r2,a 0813 78r20 2841 mov r0,#_gyroprocZ 0815 EA 2842 mov a,r2 0816 F2 2843 movx @r0,a 0817 2844 C$UM6.c$298$1$1 ==. 2845 ; apps/debugint/../UM6.c:298: gyroprocZ.temp[1] = IMU_rxdata[2]; 0817 90s00r34 2846 mov dptr,#(_IMU_rxdata + 0x0002) 081A E0 2847 movx a,@dptr 081B FA 2848 mov r2,a 081C 78r21 2849 mov r0,#(_gyroprocZ + 0x0001) 081E EA 2850 mov a,r2 081F F2 2851 movx @r0,a 0820 2852 C$UM6.c$300$1$1 ==. 0820 2853 XG$read_gyro_procZ$0$0 ==. 0820 22 2854 ret 2855 ;------------------------------------------------------------ 2856 ;Allocation info for local variables in function 'read_accel_procXY' 2857 ;------------------------------------------------------------ 2858 ;------------------------------------------------------------ 0821 2859 G$read_accel_procXY$0$0 ==. 0821 2860 C$UM6.c$304$1$1 ==. 2861 ; apps/debugint/../UM6.c:304: void read_accel_procXY(){ 2862 ; ----------------------------------------- 2863 ; function read_accel_procXY 2864 ; ----------------------------------------- 0821 2865 _read_accel_procXY: 0821 2866 C$UM6.c$305$1$1 ==. 2867 ; apps/debugint/../UM6.c:305: IMU_txdata[0] = 0; //read command 0821 90s00r2A 2868 mov dptr,#_IMU_txdata 0824 E4 2869 clr a 0825 F0 2870 movx @dptr,a 0826 2871 C$UM6.c$306$1$1 ==. 2872 ; apps/debugint/../UM6.c:306: IMU_txdata[1] = 0x5E; // address = accelprocxy 0826 90s00r2B 2873 mov dptr,#(_IMU_txdata + 0x0001) 0829 74 5E 2874 mov a,#0x5E 082B F0 2875 movx @dptr,a 082C 2876 C$UM6.c$307$1$1 ==. 2877 ; apps/debugint/../UM6.c:307: IMU_CSlow; 082C C2 F0 2878 clr b[0] 082E 85 F0*00 2879 mov bits,b 0831 75 82 0E 2880 mov dpl,#0x0E 0834 12s00r00 2881 lcall _setDigitalOutput 0837 2882 C$UM6.c$308$1$1 ==. 2883 ; apps/debugint/../UM6.c:308: spi_UM6MasterTransfer(IMU_txdata,IMU_rxdata,6); 0837 78r00 2884 mov r0,#_spi1MasterTransfer_PARM_2 0839 74r32 2885 mov a,#_IMU_rxdata 083B F2 2886 movx @r0,a 083C 08 2887 inc r0 083D 74s00 2888 mov a,#(_IMU_rxdata >> 8) 083F F2 2889 movx @r0,a 0840 78r00 2890 mov r0,#_spi1MasterTransfer_PARM_3 0842 74 06 2891 mov a,#0x06 0844 F2 2892 movx @r0,a 0845 08 2893 inc r0 0846 E4 2894 clr a 0847 F2 2895 movx @r0,a 0848 90s00r2A 2896 mov dptr,#_IMU_txdata 084B 12s00r00 2897 lcall _spi1MasterTransfer 084E 2898 C$UM6.c$309$1$1 ==. 2899 ; apps/debugint/../UM6.c:309: while(spi_UM6MasterBusy()){ } 084E 2900 00101$: 084E 12s00r00 2901 lcall _spi1MasterBusy 0851 40 FB 2902 jc 00101$ 0853 2903 C$UM6.c$310$1$1 ==. 2904 ; apps/debugint/../UM6.c:310: IMU_CShigh; 0853 D2 F0 2905 setb b[0] 0855 85 F0*00 2906 mov bits,b 0858 75 82 0E 2907 mov dpl,#0x0E 085B 12s00r00 2908 lcall _setDigitalOutput 085E 2909 C$UM6.c$312$1$1 ==. 2910 ; apps/debugint/../UM6.c:312: accelprocX.temp[0] = IMU_rxdata[3]; 085E 90s00r35 2911 mov dptr,#(_IMU_rxdata + 0x0003) 0861 E0 2912 movx a,@dptr 0862 FA 2913 mov r2,a 0863 78r0C 2914 mov r0,#_accelprocX 0865 EA 2915 mov a,r2 0866 F2 2916 movx @r0,a 0867 2917 C$UM6.c$313$1$1 ==. 2918 ; apps/debugint/../UM6.c:313: accelprocX.temp[1] = IMU_rxdata[2]; 0867 90s00r34 2919 mov dptr,#(_IMU_rxdata + 0x0002) 086A E0 2920 movx a,@dptr 086B FA 2921 mov r2,a 086C 78r0D 2922 mov r0,#(_accelprocX + 0x0001) 086E EA 2923 mov a,r2 086F F2 2924 movx @r0,a 0870 2925 C$UM6.c$314$1$1 ==. 2926 ; apps/debugint/../UM6.c:314: accelprocY.temp[0] = IMU_rxdata[5]; 0870 90s00r37 2927 mov dptr,#(_IMU_rxdata + 0x0005) 0873 E0 2928 movx a,@dptr 0874 FA 2929 mov r2,a 0875 78r0A 2930 mov r0,#_accelprocY 0877 EA 2931 mov a,r2 0878 F2 2932 movx @r0,a 0879 2933 C$UM6.c$315$1$1 ==. 2934 ; apps/debugint/../UM6.c:315: accelprocY.temp[1] = IMU_rxdata[4]; 0879 90s00r36 2935 mov dptr,#(_IMU_rxdata + 0x0004) 087C E0 2936 movx a,@dptr 087D FA 2937 mov r2,a 087E 78r0B 2938 mov r0,#(_accelprocY + 0x0001) 0880 EA 2939 mov a,r2 0881 F2 2940 movx @r0,a 0882 2941 C$UM6.c$318$1$1 ==. 0882 2942 XG$read_accel_procXY$0$0 ==. 0882 22 2943 ret 2944 ;------------------------------------------------------------ 2945 ;Allocation info for local variables in function 'read_gyro_procXY' 2946 ;------------------------------------------------------------ 2947 ;------------------------------------------------------------ 0883 2948 G$read_gyro_procXY$0$0 ==. 0883 2949 C$UM6.c$322$1$1 ==. 2950 ; apps/debugint/../UM6.c:322: void read_gyro_procXY(){ 2951 ; ----------------------------------------- 2952 ; function read_gyro_procXY 2953 ; ----------------------------------------- 0883 2954 _read_gyro_procXY: 0883 2955 C$UM6.c$323$1$1 ==. 2956 ; apps/debugint/../UM6.c:323: IMU_txdata[0] = 0; //read command 0883 90s00r2A 2957 mov dptr,#_IMU_txdata 0886 E4 2958 clr a 0887 F0 2959 movx @dptr,a 0888 2960 C$UM6.c$324$1$1 ==. 2961 ; apps/debugint/../UM6.c:324: IMU_txdata[1] = 0x5C; // address = accelprocxy 0888 90s00r2B 2962 mov dptr,#(_IMU_txdata + 0x0001) 088B 74 5C 2963 mov a,#0x5C 088D F0 2964 movx @dptr,a 088E 2965 C$UM6.c$325$1$1 ==. 2966 ; apps/debugint/../UM6.c:325: IMU_CSlow; 088E C2 F0 2967 clr b[0] 0890 85 F0*00 2968 mov bits,b 0893 75 82 0E 2969 mov dpl,#0x0E 0896 12s00r00 2970 lcall _setDigitalOutput 0899 2971 C$UM6.c$326$1$1 ==. 2972 ; apps/debugint/../UM6.c:326: spi_UM6MasterTransfer(IMU_txdata,IMU_rxdata,6); 0899 78r00 2973 mov r0,#_spi1MasterTransfer_PARM_2 089B 74r32 2974 mov a,#_IMU_rxdata 089D F2 2975 movx @r0,a 089E 08 2976 inc r0 089F 74s00 2977 mov a,#(_IMU_rxdata >> 8) 08A1 F2 2978 movx @r0,a 08A2 78r00 2979 mov r0,#_spi1MasterTransfer_PARM_3 08A4 74 06 2980 mov a,#0x06 08A6 F2 2981 movx @r0,a 08A7 08 2982 inc r0 08A8 E4 2983 clr a 08A9 F2 2984 movx @r0,a 08AA 90s00r2A 2985 mov dptr,#_IMU_txdata 08AD 12s00r00 2986 lcall _spi1MasterTransfer 08B0 2987 C$UM6.c$327$1$1 ==. 2988 ; apps/debugint/../UM6.c:327: while(spi_UM6MasterBusy()){ } 08B0 2989 00101$: 08B0 12s00r00 2990 lcall _spi1MasterBusy 08B3 40 FB 2991 jc 00101$ 08B5 2992 C$UM6.c$328$1$1 ==. 2993 ; apps/debugint/../UM6.c:328: IMU_CShigh; 08B5 D2 F0 2994 setb b[0] 08B7 85 F0*00 2995 mov bits,b 08BA 75 82 0E 2996 mov dpl,#0x0E 08BD 12s00r00 2997 lcall _setDigitalOutput 08C0 2998 C$UM6.c$330$1$1 ==. 2999 ; apps/debugint/../UM6.c:330: gyroprocX.temp[0] = IMU_rxdata[3]; 08C0 90s00r35 3000 mov dptr,#(_IMU_rxdata + 0x0003) 08C3 E0 3001 movx a,@dptr 08C4 FA 3002 mov r2,a 08C5 78r1E 3003 mov r0,#_gyroprocX 08C7 EA 3004 mov a,r2 08C8 F2 3005 movx @r0,a 08C9 3006 C$UM6.c$331$1$1 ==. 3007 ; apps/debugint/../UM6.c:331: gyroprocX.temp[1] = IMU_rxdata[2]; 08C9 90s00r34 3008 mov dptr,#(_IMU_rxdata + 0x0002) 08CC E0 3009 movx a,@dptr 08CD FA 3010 mov r2,a 08CE 78r1F 3011 mov r0,#(_gyroprocX + 0x0001) 08D0 EA 3012 mov a,r2 08D1 F2 3013 movx @r0,a 08D2 3014 C$UM6.c$332$1$1 ==. 3015 ; apps/debugint/../UM6.c:332: gyroprocY.temp[0] = IMU_rxdata[5]; 08D2 90s00r37 3016 mov dptr,#(_IMU_rxdata + 0x0005) 08D5 E0 3017 movx a,@dptr 08D6 FA 3018 mov r2,a 08D7 78r1C 3019 mov r0,#_gyroprocY 08D9 EA 3020 mov a,r2 08DA F2 3021 movx @r0,a 08DB 3022 C$UM6.c$333$1$1 ==. 3023 ; apps/debugint/../UM6.c:333: gyroprocY.temp[1] = IMU_rxdata[4]; 08DB 90s00r36 3024 mov dptr,#(_IMU_rxdata + 0x0004) 08DE E0 3025 movx a,@dptr 08DF FA 3026 mov r2,a 08E0 78r1D 3027 mov r0,#(_gyroprocY + 0x0001) 08E2 EA 3028 mov a,r2 08E3 F2 3029 movx @r0,a 08E4 3030 C$UM6.c$336$1$1 ==. 08E4 3031 XG$read_gyro_procXY$0$0 ==. 08E4 22 3032 ret 3033 ;------------------------------------------------------------ 3034 ;Allocation info for local variables in function 'UM6_flash_commit' 3035 ;------------------------------------------------------------ 3036 ;------------------------------------------------------------ 08E5 3037 G$UM6_flash_commit$0$0 ==. 08E5 3038 C$UM6.c$341$1$1 ==. 3039 ; apps/debugint/../UM6.c:341: void UM6_flash_commit(){ 3040 ; ----------------------------------------- 3041 ; function UM6_flash_commit 3042 ; ----------------------------------------- 08E5 3043 _UM6_flash_commit: 08E5 3044 C$UM6.c$342$1$1 ==. 3045 ; apps/debugint/../UM6.c:342: IMU_txdata[0] = 1; //write command 08E5 90s00r2A 3046 mov dptr,#_IMU_txdata 08E8 74 01 3047 mov a,#0x01 08EA F0 3048 movx @dptr,a 08EB 3049 C$UM6.c$343$1$1 ==. 3050 ; apps/debugint/../UM6.c:343: IMU_txdata[1] = 0xAB; // UM6_Flash_commit command (nothing is written to the register) 08EB 90s00r2B 3051 mov dptr,#(_IMU_txdata + 0x0001) 08EE 74 AB 3052 mov a,#0xAB 08F0 F0 3053 movx @dptr,a 08F1 3054 C$UM6.c$344$1$1 ==. 3055 ; apps/debugint/../UM6.c:344: IMU_CSlow; 08F1 C2 F0 3056 clr b[0] 08F3 85 F0*00 3057 mov bits,b 08F6 75 82 0E 3058 mov dpl,#0x0E 08F9 12s00r00 3059 lcall _setDigitalOutput 08FC 3060 C$UM6.c$345$1$1 ==. 3061 ; apps/debugint/../UM6.c:345: spi_UM6MasterTransfer(IMU_txdata,IMU_rxdata,6); 08FC 78r00 3062 mov r0,#_spi1MasterTransfer_PARM_2 08FE 74r32 3063 mov a,#_IMU_rxdata 0900 F2 3064 movx @r0,a 0901 08 3065 inc r0 0902 74s00 3066 mov a,#(_IMU_rxdata >> 8) 0904 F2 3067 movx @r0,a 0905 78r00 3068 mov r0,#_spi1MasterTransfer_PARM_3 0907 74 06 3069 mov a,#0x06 0909 F2 3070 movx @r0,a 090A 08 3071 inc r0 090B E4 3072 clr a 090C F2 3073 movx @r0,a 090D 90s00r2A 3074 mov dptr,#_IMU_txdata 0910 12s00r00 3075 lcall _spi1MasterTransfer 0913 3076 C$UM6.c$346$1$1 ==. 3077 ; apps/debugint/../UM6.c:346: while(spi_UM6MasterBusy()){ } 0913 3078 00101$: 0913 12s00r00 3079 lcall _spi1MasterBusy 0916 40 FB 3080 jc 00101$ 0918 3081 C$UM6.c$347$1$1 ==. 3082 ; apps/debugint/../UM6.c:347: IMU_CShigh; 0918 D2 F0 3083 setb b[0] 091A 85 F0*00 3084 mov bits,b 091D 75 82 0E 3085 mov dpl,#0x0E 0920 3086 C$UM6.c$348$1$1 ==. 0920 3087 XG$UM6_flash_commit$0$0 ==. 0920 02s00r00 3088 ljmp _setDigitalOutput 3089 ;------------------------------------------------------------ 3090 ;Allocation info for local variables in function 'main' 3091 ;------------------------------------------------------------ 3092 ;sloc0 Allocated with name '_main_sloc0_1_0' 3093 ;sloc1 Allocated with name '_main_sloc1_1_0' 3094 ;sloc2 Allocated with name '_main_sloc2_1_0' 3095 ;------------------------------------------------------------ 0923 3096 G$main$0$0 ==. 0923 3097 C$debugint.c$18$1$1 ==. 3098 ; apps/debugint/debugint.c:18: void main(){ 3099 ; ----------------------------------------- 3100 ; function main 3101 ; ----------------------------------------- 0923 3102 _main: 0923 3103 C$debugint.c$21$1$1 ==. 3104 ; apps/debugint/debugint.c:21: uint32 lastReport= 0; 0923 E4 3105 clr a 0924 F5*19 3106 mov _main_sloc1_1_0,a 0926 F5*1A 3107 mov (_main_sloc1_1_0 + 1),a 0928 F5*1B 3108 mov (_main_sloc1_1_0 + 2),a 092A F5*1C 3109 mov (_main_sloc1_1_0 + 3),a 092C 3110 C$debugint.c$22$1$1 ==. 3111 ; apps/debugint/debugint.c:22: msg2.id = 0x222; 092C 75*0D 22 3112 mov (_msg2 + 0),#0x22 092F 75*0E 02 3113 mov (_msg2 + 1),#0x02 0932 3114 C$debugint.c$23$1$1 ==. 3115 ; apps/debugint/debugint.c:23: msg2.len = 2; 0932 75*0F 02 3116 mov (_msg2 + 0x0002),#0x02 0935 3117 C$debugint.c$25$1$1 ==. 3118 ; apps/debugint/debugint.c:25: systemInit(); 0935 12s00r00 3119 lcall _systemInit 0938 3120 C$debugint.c$26$1$1 ==. 3121 ; apps/debugint/debugint.c:26: usbInit(); 0938 12s00r00 3122 lcall _usbInit 093B 3123 C$debugint.c$27$1$1 ==. 3124 ; apps/debugint/debugint.c:27: Can_init(2); // Initialize CAN at 250kbps and set in normal mode 093B 75 82 02 3125 mov dpl,#0x02 093E 12s00r00 3126 lcall _Can_init 0941 3127 C$debugint.c$28$1$1 ==. 3128 ; apps/debugint/debugint.c:28: spi_UM6_init(); // Initialize SPI for communicating with UM6 0941 12s05r80 3129 lcall _spi_UM6_init 0944 3130 C$debugint.c$29$1$1 ==. 3131 ; apps/debugint/debugint.c:29: Zero_Gyros(); // zero the gyro readings 0944 12s05rF0 3132 lcall _Zero_Gyros 0947 3133 C$debugint.c$31$1$1 ==. 3134 ; apps/debugint/debugint.c:31: radioLinkInit(); 0947 12s00r00 3135 lcall _radioLinkInit 094A 3136 C$debugint.c$32$1$1 ==. 3137 ; apps/debugint/debugint.c:32: while(!radioLinkConnected()){ 094A 3138 00101$: 094A 12s00r00 3139 lcall _radioLinkConnected 094D 40 0B 3140 jc 00103$ 094F 3141 C$debugint.c$33$2$2 ==. 3142 ; apps/debugint/debugint.c:33: boardService(); 094F 12s00r00 3143 lcall _boardService 0952 3144 C$debugint.c$34$2$2 ==. 3145 ; apps/debugint/debugint.c:34: usbComService(); 0952 12s00r00 3146 lcall _usbComService 0955 3147 C$debugint.c$35$3$3 ==. 3148 ; apps/debugint/debugint.c:35: LED_RED(1); 0955 43 FF 02 3149 orl _P2DIR,#0x02 0958 80 F0 3150 sjmp 00101$ 095A 3151 00103$: 095A 3152 C$debugint.c$37$2$4 ==. 3153 ; apps/debugint/debugint.c:37: LED_RED(0); 095A 53 FF FD 3154 anl _P2DIR,#0xFD 095D 3155 C$debugint.c$42$1$1 ==. 3156 ; apps/debugint/debugint.c:42: while(1){ 095D 3157 00117$: 095D 3158 C$debugint.c$43$2$5 ==. 3159 ; apps/debugint/debugint.c:43: usbComService(); 095D 12s00r00 3160 lcall _usbComService 0960 3161 C$debugint.c$44$2$5 ==. 3162 ; apps/debugint/debugint.c:44: boardService(); 0960 12s00r00 3163 lcall _boardService 0963 3164 C$debugint.c$45$2$5 ==. 3165 ; apps/debugint/debugint.c:45: if(rxbuf0_full()){ // check if rxbuf0 has msg 0963 12s05r66 3166 lcall _rxbuf0_full 0966 E5 82 3167 mov a,dpl 0968 70 03 3168 jnz 00138$ 096A 02s09rE8 3169 ljmp 00109$ 096D 3170 00138$: 096D 3171 C$debugint.c$46$3$6 ==. 3172 ; apps/debugint/debugint.c:46: get_Canmsg(&msg2); 096D 90s00r0D 3173 mov dptr,#_msg2 0970 75 F0 40 3174 mov b,#0x40 0973 12s04r7E 3175 lcall _get_Canmsg 0976 3176 C$debugint.c$47$3$6 ==. 3177 ; apps/debugint/debugint.c:47: if(radioLinkTxAvailable()){ 0976 12s00r00 3178 lcall _radioLinkTxAvailable 0979 E5 82 3179 mov a,dpl 097B 60 6B 3180 jz 00109$ 097D 3181 C$debugint.c$48$4$7 ==. 3182 ; apps/debugint/debugint.c:48: txpkt = radioLinkTxCurrentPacket(); 097D 12s00r00 3183 lcall _radioLinkTxCurrentPacket 0980 AE 82 3184 mov r6,dpl 0982 AF 83 3185 mov r7,dph 0984 78r22 3186 mov r0,#_txpkt 0986 EE 3187 mov a,r6 0987 F2 3188 movx @r0,a 0988 08 3189 inc r0 0989 EF 3190 mov a,r7 098A F2 3191 movx @r0,a 098B 3192 C$debugint.c$50$4$7 ==. 3193 ; apps/debugint/debugint.c:50: if(txpkt != 0){ 098B EE 3194 mov a,r6 098C 4F 3195 orl a,r7 098D 60 50 3196 jz 00105$ 098F 3197 C$debugint.c$51$1$1 ==. 3198 ; apps/debugint/debugint.c:51: txpkt[0]=3 + msg2.len; 098F 85*0F*18 3199 mov _main_sloc0_1_0,(_msg2 + 0x0002) 0992 74 03 3200 mov a,#0x03 0994 25*18 3201 add a,_main_sloc0_1_0 0996 8E 82 3202 mov dpl,r6 0998 8F 83 3203 mov dph,r7 099A F0 3204 movx @dptr,a 099B 3205 C$debugint.c$52$5$8 ==. 3206 ; apps/debugint/debugint.c:52: txpkt[1] = (uint8) msg2.id; 099B 8E 82 3207 mov dpl,r6 099D 8F 83 3208 mov dph,r7 099F A3 3209 inc dptr 09A0 E5*0D 3210 mov a,_msg2 09A2 F0 3211 movx @dptr,a 09A3 3212 C$debugint.c$53$5$8 ==. 3213 ; apps/debugint/debugint.c:53: txpkt[2] = (uint8) (msg2.id >> 8); 09A3 8E 82 3214 mov dpl,r6 09A5 8F 83 3215 mov dph,r7 09A7 A3 3216 inc dptr 09A8 A3 3217 inc dptr 09A9 E5*0E 3218 mov a,(_msg2 + 1) 09AB FA 3219 mov r2,a 09AC F0 3220 movx @dptr,a 09AD 3221 C$debugint.c$54$5$8 ==. 3222 ; apps/debugint/debugint.c:54: txpkt[3] = msg2.len; 09AD 8E 82 3223 mov dpl,r6 09AF 8F 83 3224 mov dph,r7 09B1 A3 3225 inc dptr 09B2 A3 3226 inc dptr 09B3 A3 3227 inc dptr 09B4 E5*18 3228 mov a,_main_sloc0_1_0 09B6 F0 3229 movx @dptr,a 09B7 3230 C$debugint.c$87$1$1 ==. 3231 ; apps/debugint/debugint.c:87: LED_RED_TOGGLE(); 09B7 3232 C$debugint.c$55$6$9 ==. 3233 ; apps/debugint/debugint.c:55: for(i=0;i= 100) // read the UM6 09E8 12s00r00 3279 lcall _getMs 09EB AE 82 3280 mov r6,dpl 09ED AF 83 3281 mov r7,dph 09EF AA F0 3282 mov r2,b 09F1 FB 3283 mov r3,a 09F2 EE 3284 mov a,r6 09F3 C3 3285 clr c 09F4 95*19 3286 subb a,_main_sloc1_1_0 09F6 FE 3287 mov r6,a 09F7 EF 3288 mov a,r7 09F8 95*1A 3289 subb a,(_main_sloc1_1_0 + 1) 09FA FF 3290 mov r7,a 09FB EA 3291 mov a,r2 09FC 95*1B 3292 subb a,(_main_sloc1_1_0 + 2) 09FE FA 3293 mov r2,a 09FF EB 3294 mov a,r3 0A00 95*1C 3295 subb a,(_main_sloc1_1_0 + 3) 0A02 FB 3296 mov r3,a 0A03 C3 3297 clr c 0A04 EE 3298 mov a,r6 0A05 94 64 3299 subb a,#0x64 0A07 EF 3300 mov a,r7 0A08 94 00 3301 subb a,#0x00 0A0A EA 3302 mov a,r2 0A0B 94 00 3303 subb a,#0x00 0A0D EB 3304 mov a,r3 0A0E 94 00 3305 subb a,#0x00 0A10 50 03 3306 jnc 00143$ 0A12 02s09r5D 3307 ljmp 00117$ 0A15 3308 00143$: 0A15 3309 C$debugint.c$69$3$11 ==. 3310 ; apps/debugint/debugint.c:69: lastReport = getMs(); 0A15 12s00r00 3311 lcall _getMs 0A18 85 82*19 3312 mov _main_sloc1_1_0,dpl 0A1B 85 83*1A 3313 mov (_main_sloc1_1_0 + 1),dph 0A1E 85 F0*1B 3314 mov (_main_sloc1_1_0 + 2),b 0A21 F5*1C 3315 mov (_main_sloc1_1_0 + 3),a 0A23 3316 C$debugint.c$70$3$11 ==. 3317 ; apps/debugint/debugint.c:70: read_accel_procZ(); 0A23 12s07r81 3318 lcall _read_accel_procZ 0A26 3319 C$debugint.c$71$3$11 ==. 3320 ; apps/debugint/debugint.c:71: read_accel_procXY(); 0A26 12s08r21 3321 lcall _read_accel_procXY 0A29 3322 C$debugint.c$73$3$11 ==. 3323 ; apps/debugint/debugint.c:73: if(radioLinkTxAvailable()){ 0A29 12s00r00 3324 lcall _radioLinkTxAvailable 0A2C E5 82 3325 mov a,dpl 0A2E 70 03 3326 jnz 00144$ 0A30 02s09r5D 3327 ljmp 00117$ 0A33 3328 00144$: 0A33 3329 C$debugint.c$74$4$12 ==. 3330 ; apps/debugint/debugint.c:74: txpkt = radioLinkTxCurrentPacket(); 0A33 12s00r00 3331 lcall _radioLinkTxCurrentPacket 0A36 AA 82 3332 mov r2,dpl 0A38 AB 83 3333 mov r3,dph 0A3A 78r22 3334 mov r0,#_txpkt 0A3C EA 3335 mov a,r2 0A3D F2 3336 movx @r0,a 0A3E 08 3337 inc r0 0A3F EB 3338 mov a,r3 0A40 F2 3339 movx @r0,a 0A41 3340 C$debugint.c$76$4$12 ==. 3341 ; apps/debugint/debugint.c:76: if(txpkt != 0){ 0A41 EA 3342 mov a,r2 0A42 4B 3343 orl a,r3 0A43 70 03 3344 jnz 00145$ 0A45 02s0ArCA 3345 ljmp 00111$ 0A48 3346 00145$: 0A48 3347 C$debugint.c$77$5$13 ==. 3348 ; apps/debugint/debugint.c:77: txpkt[0]=6; 0A48 8A 82 3349 mov dpl,r2 0A4A 8B 83 3350 mov dph,r3 0A4C 74 06 3351 mov a,#0x06 0A4E F0 3352 movx @dptr,a 0A4F 3353 C$debugint.c$78$5$13 ==. 3354 ; apps/debugint/debugint.c:78: txpkt[1] = (uint8) accelprocX.val; 0A4F 74 01 3355 mov a,#0x01 0A51 2A 3356 add a,r2 0A52 F5*1D 3357 mov _main_sloc2_1_0,a 0A54 E4 3358 clr a 0A55 3B 3359 addc a,r3 0A56 F5*1E 3360 mov (_main_sloc2_1_0 + 1),a 0A58 78r0C 3361 mov r0,#_accelprocX 0A5A E2 3362 movx a,@r0 0A5B FE 3363 mov r6,a 0A5C 08 3364 inc r0 0A5D E2 3365 movx a,@r0 0A5E FF 3366 mov r7,a 0A5F 8E 04 3367 mov ar4,r6 0A61 85*1D 82 3368 mov dpl,_main_sloc2_1_0 0A64 85*1E 83 3369 mov dph,(_main_sloc2_1_0 + 1) 0A67 EC 3370 mov a,r4 0A68 F0 3371 movx @dptr,a 0A69 3372 C$debugint.c$79$5$13 ==. 3373 ; apps/debugint/debugint.c:79: txpkt[2] = (uint8) (accelprocX.val >> 8); 0A69 74 02 3374 mov a,#0x02 0A6B 2A 3375 add a,r2 0A6C FC 3376 mov r4,a 0A6D E4 3377 clr a 0A6E 3B 3378 addc a,r3 0A6F FD 3379 mov r5,a 0A70 8F 06 3380 mov ar6,r7 0A72 8C 82 3381 mov dpl,r4 0A74 8D 83 3382 mov dph,r5 0A76 EE 3383 mov a,r6 0A77 F0 3384 movx @dptr,a 0A78 3385 C$debugint.c$80$5$13 ==. 3386 ; apps/debugint/debugint.c:80: txpkt[3] = (uint8) accelprocY.val; 0A78 74 03 3387 mov a,#0x03 0A7A 2A 3388 add a,r2 0A7B F5*1D 3389 mov _main_sloc2_1_0,a 0A7D E4 3390 clr a 0A7E 3B 3391 addc a,r3 0A7F F5*1E 3392 mov (_main_sloc2_1_0 + 1),a 0A81 78r0A 3393 mov r0,#_accelprocY 0A83 E2 3394 movx a,@r0 0A84 FE 3395 mov r6,a 0A85 08 3396 inc r0 0A86 E2 3397 movx a,@r0 0A87 FF 3398 mov r7,a 0A88 8E 04 3399 mov ar4,r6 0A8A 85*1D 82 3400 mov dpl,_main_sloc2_1_0 0A8D 85*1E 83 3401 mov dph,(_main_sloc2_1_0 + 1) 0A90 EC 3402 mov a,r4 0A91 F0 3403 movx @dptr,a 0A92 3404 C$debugint.c$81$5$13 ==. 3405 ; apps/debugint/debugint.c:81: txpkt[4] = (uint8) (accelprocY.val >> 8); 0A92 74 04 3406 mov a,#0x04 0A94 2A 3407 add a,r2 0A95 FC 3408 mov r4,a 0A96 E4 3409 clr a 0A97 3B 3410 addc a,r3 0A98 FD 3411 mov r5,a 0A99 8F 06 3412 mov ar6,r7 0A9B 8C 82 3413 mov dpl,r4 0A9D 8D 83 3414 mov dph,r5 0A9F EE 3415 mov a,r6 0AA0 F0 3416 movx @dptr,a 0AA1 3417 C$debugint.c$82$5$13 ==. 3418 ; apps/debugint/debugint.c:82: txpkt[5] = (uint8) accelprocZ.val; 0AA1 74 05 3419 mov a,#0x05 0AA3 2A 3420 add a,r2 0AA4 F5*1D 3421 mov _main_sloc2_1_0,a 0AA6 E4 3422 clr a 0AA7 3B 3423 addc a,r3 0AA8 F5*1E 3424 mov (_main_sloc2_1_0 + 1),a 0AAA 78r0E 3425 mov r0,#_accelprocZ 0AAC E2 3426 movx a,@r0 0AAD FE 3427 mov r6,a 0AAE 08 3428 inc r0 0AAF E2 3429 movx a,@r0 0AB0 FF 3430 mov r7,a 0AB1 8E 04 3431 mov ar4,r6 0AB3 85*1D 82 3432 mov dpl,_main_sloc2_1_0 0AB6 85*1E 83 3433 mov dph,(_main_sloc2_1_0 + 1) 0AB9 EC 3434 mov a,r4 0ABA F0 3435 movx @dptr,a 0ABB 3436 C$debugint.c$83$5$13 ==. 3437 ; apps/debugint/debugint.c:83: txpkt[6] = (uint8) (accelprocZ.val >> 8); 0ABB 74 06 3438 mov a,#0x06 0ABD 2A 3439 add a,r2 0ABE FA 3440 mov r2,a 0ABF E4 3441 clr a 0AC0 3B 3442 addc a,r3 0AC1 FB 3443 mov r3,a 0AC2 8F 06 3444 mov ar6,r7 0AC4 8A 82 3445 mov dpl,r2 0AC6 8B 83 3446 mov dph,r3 0AC8 EE 3447 mov a,r6 0AC9 F0 3448 movx @dptr,a 0ACA 3449 00111$: 0ACA 3450 C$debugint.c$86$4$12 ==. 3451 ; apps/debugint/debugint.c:86: radioLinkTxSendPacket(1); 0ACA 75 82 01 3452 mov dpl,#0x01 0ACD 12s00r00 3453 lcall _radioLinkTxSendPacket 0AD0 3454 C$debugint.c$87$5$14 ==. 3455 ; apps/debugint/debugint.c:87: LED_RED_TOGGLE(); 0AD0 63 FF 02 3456 xrl _P2DIR,#0x02 0AD3 3457 C$debugint.c$91$1$1 ==. 0AD3 3458 XG$main$0$0 ==. 0AD3 02s09r5D 3459 ljmp 00117$ 3460 .area CSEG (CODE) 3461 .area CONST (CODE) 3462 .area XINIT (CODE) 0000 3463 Fdebugint$__xinit_txdata2$0$0 == . 0000 3464 __xinit__txdata2: 0000 40 3465 .db #0x40 ; 64 0001 20 3466 .db #0x20 ; 32 0002 20 3467 .db #0x20 ; 32 0003 00 3468 .db #0x00 ; 0 0004 00 3469 .db #0x00 ; 0 0005 04 3470 .db #0x04 ; 4 0006 01 3471 .db #0x01 ; 1 0007 02 3472 .db #0x02 ; 2 0008 03 3473 .db #0x03 ; 3 0009 04 3474 .db #0x04 ; 4 000A 00 3475 .db #0x00 ; 0 000B 00 3476 .db #0x00 ; 0 000C 00 3477 .db #0x00 ; 0 000D 00 3478 .db #0x00 ; 0 000E 3479 Fdebugint$__xinit_rxdata$0$0 == . 000E 3480 __xinit__rxdata: 000E 00 3481 .db #0x00 ; 0 000F 00 3482 .db 0x00 0010 00 3483 .db 0x00 0011 00 3484 .db 0x00 0012 00 3485 .db 0x00 0013 00 3486 .db 0x00 0014 00 3487 .db 0x00 0015 00 3488 .db 0x00 0016 00 3489 .db 0x00 0017 00 3490 .db 0x00 0018 00 3491 .db 0x00 0019 00 3492 .db 0x00 001A 00 3493 .db 0x00 001B 00 3494 .db 0x00 001C 3495 Fdebugint$__xinit_txdata$0$0 == . 001C 3496 __xinit__txdata: 001C 40 3497 .db #0x40 ; 64 001D 20 3498 .db #0x20 ; 32 001E 20 3499 .db #0x20 ; 32 001F 00 3500 .db #0x00 ; 0 0020 00 3501 .db #0x00 ; 0 0021 04 3502 .db #0x04 ; 4 0022 01 3503 .db #0x01 ; 1 0023 02 3504 .db #0x02 ; 2 0024 03 3505 .db #0x03 ; 3 0025 04 3506 .db #0x04 ; 4 0026 00 3507 .db #0x00 ; 0 0027 00 3508 .db #0x00 ; 0 0028 00 3509 .db #0x00 ; 0 0029 00 3510 .db #0x00 ; 0 002A 3511 Fdebugint$__xinit_IMU_txdata$0$0 == . 002A 3512 __xinit__IMU_txdata: 002A 00 3513 .db #0x00 ; 0 002B 00 3514 .db 0x00 002C 00 3515 .db 0x00 002D 00 3516 .db 0x00 002E 00 3517 .db 0x00 002F 00 3518 .db 0x00 0030 00 3519 .db 0x00 0031 00 3520 .db 0x00 0032 3521 Fdebugint$__xinit_IMU_rxdata$0$0 == . 0032 3522 __xinit__IMU_rxdata: 0032 01 3523 .db #0x01 ; 1 0033 01 3524 .db #0x01 ; 1 0034 01 3525 .db #0x01 ; 1 0035 01 3526 .db #0x01 ; 1 0036 01 3527 .db #0x01 ; 1 0037 01 3528 .db #0x01 ; 1 0038 01 3529 .db #0x01 ; 1 0039 01 3530 .db #0x01 ; 1 3531 .area CABS (ABS,CODE)