📄 stm32f10x_can.lst
字号:
266 }
267
268 /* At this step, return the status of initialization */
269 return InitStatus;
\ ??CAN_Init_3:
\ 00000112 C0B2 UXTB R0,R0 ;; ZeroExt R0,R0,#+24,#+24
\ 00000114 30BC POP {R4,R5}
\ 00000116 7047 BX LR ;; return
270 }
271
272 /**
273 * @brief Initializes the CAN peripheral according to the specified
274 * parameters in the CAN_FilterInitStruct.
275 * @param CAN_FilterInitStruct: pointer to a CAN_FilterInitTypeDef
276 * structure that contains the configuration information.
277 * @retval None.
278 */
\ In section .text, align 2, keep-with-next
279 void CAN_FilterInit(CAN_FilterInitTypeDef* CAN_FilterInitStruct)
280 {
\ CAN_FilterInit:
\ 00000000 10B4 PUSH {R4}
281 uint32_t filter_number_bit_pos = 0;
\ 00000002 0021 MOVS R1,#+0
282 /* Check the parameters */
283 assert_param(IS_CAN_FILTER_NUMBER(CAN_FilterInitStruct->CAN_FilterNumber));
284 assert_param(IS_CAN_FILTER_MODE(CAN_FilterInitStruct->CAN_FilterMode));
285 assert_param(IS_CAN_FILTER_SCALE(CAN_FilterInitStruct->CAN_FilterScale));
286 assert_param(IS_CAN_FILTER_FIFO(CAN_FilterInitStruct->CAN_FilterFIFOAssignment));
287 assert_param(IS_FUNCTIONAL_STATE(CAN_FilterInitStruct->CAN_FilterActivation));
288
289 filter_number_bit_pos = ((uint32_t)0x00000001) << CAN_FilterInitStruct->CAN_FilterNumber;
\ 00000004 0122 MOVS R2,#+1
\ 00000006 837A LDRB R3,[R0, #+10]
\ 00000008 9A40 LSLS R2,R2,R3
\ 0000000A 1100 MOVS R1,R2
290
291 /* Initialisation mode for the filter */
292 CAN1->FMR |= FMR_FINIT;
\ 0000000C ........ LDR.W R2,??DataTable5_1 ;; 0x40006600
\ 00000010 1268 LDR R2,[R2, #+0]
\ 00000012 52F00102 ORRS R2,R2,#0x1
\ 00000016 ........ LDR.W R3,??DataTable5_1 ;; 0x40006600
\ 0000001A 1A60 STR R2,[R3, #+0]
293
294 /* Filter Deactivation */
295 CAN1->FA1R &= ~(uint32_t)filter_number_bit_pos;
\ 0000001C ........ LDR.W R2,??DataTable5_2 ;; 0x4000661c
\ 00000020 1268 LDR R2,[R2, #+0]
\ 00000022 8A43 BICS R2,R2,R1
\ 00000024 ........ LDR.W R3,??DataTable5_2 ;; 0x4000661c
\ 00000028 1A60 STR R2,[R3, #+0]
296
297 /* Filter Scale */
298 if (CAN_FilterInitStruct->CAN_FilterScale == CAN_FilterScale_16bit)
\ 0000002A 027B LDRB R2,[R0, #+12]
\ 0000002C 002A CMP R2,#+0
\ 0000002E 19D1 BNE.N ??CAN_FilterInit_0
299 {
300 /* 16-bit scale for the filter */
301 CAN1->FS1R &= ~(uint32_t)filter_number_bit_pos;
\ 00000030 ........ LDR.W R2,??DataTable5_3 ;; 0x4000660c
\ 00000034 1268 LDR R2,[R2, #+0]
\ 00000036 8A43 BICS R2,R2,R1
\ 00000038 ........ LDR.W R3,??DataTable5_3 ;; 0x4000660c
\ 0000003C 1A60 STR R2,[R3, #+0]
302
303 /* First 16-bit identifier and First 16-bit mask */
304 /* Or First 16-bit identifier and Second 16-bit identifier */
305 CAN1->sFilterRegister[CAN_FilterInitStruct->CAN_FilterNumber].FR1 =
306 ((0x0000FFFF & (uint32_t)CAN_FilterInitStruct->CAN_FilterMaskIdLow) << 16) |
307 (0x0000FFFF & (uint32_t)CAN_FilterInitStruct->CAN_FilterIdLow);
\ 0000003E C288 LDRH R2,[R0, #+6]
\ 00000040 4388 LDRH R3,[R0, #+2]
\ 00000042 53EA0242 ORRS R2,R3,R2, LSL #+16
\ 00000046 837A LDRB R3,[R0, #+10]
\ 00000048 ........ LDR.W R4,??DataTable5_4 ;; 0x40006640
\ 0000004C 44F83320 STR R2,[R4, R3, LSL #+3]
308
309 /* Second 16-bit identifier and Second 16-bit mask */
310 /* Or Third 16-bit identifier and Fourth 16-bit identifier */
311 CAN1->sFilterRegister[CAN_FilterInitStruct->CAN_FilterNumber].FR2 =
312 ((0x0000FFFF & (uint32_t)CAN_FilterInitStruct->CAN_FilterMaskIdHigh) << 16) |
313 (0x0000FFFF & (uint32_t)CAN_FilterInitStruct->CAN_FilterIdHigh);
\ 00000050 827A LDRB R2,[R0, #+10]
\ 00000052 ........ LDR.W R3,??DataTable5_4 ;; 0x40006640
\ 00000056 13EBC202 ADDS R2,R3,R2, LSL #+3
\ 0000005A 8388 LDRH R3,[R0, #+4]
\ 0000005C 0488 LDRH R4,[R0, #+0]
\ 0000005E 54EA0343 ORRS R3,R4,R3, LSL #+16
\ 00000062 5360 STR R3,[R2, #+4]
314 }
315
316 if (CAN_FilterInitStruct->CAN_FilterScale == CAN_FilterScale_32bit)
\ ??CAN_FilterInit_0:
\ 00000064 027B LDRB R2,[R0, #+12]
\ 00000066 012A CMP R2,#+1
\ 00000068 19D1 BNE.N ??CAN_FilterInit_1
317 {
318 /* 32-bit scale for the filter */
319 CAN1->FS1R |= filter_number_bit_pos;
\ 0000006A ........ LDR.W R2,??DataTable5_3 ;; 0x4000660c
\ 0000006E 1268 LDR R2,[R2, #+0]
\ 00000070 0A43 ORRS R2,R1,R2
\ 00000072 ........ LDR.W R3,??DataTable5_3 ;; 0x4000660c
\ 00000076 1A60 STR R2,[R3, #+0]
320 /* 32-bit identifier or First 32-bit identifier */
321 CAN1->sFilterRegister[CAN_FilterInitStruct->CAN_FilterNumber].FR1 =
322 ((0x0000FFFF & (uint32_t)CAN_FilterInitStruct->CAN_FilterIdHigh) << 16) |
323 (0x0000FFFF & (uint32_t)CAN_FilterInitStruct->CAN_FilterIdLow);
\ 00000078 0288 LDRH R2,[R0, #+0]
\ 0000007A 4388 LDRH R3,[R0, #+2]
\ 0000007C 53EA0242 ORRS R2,R3,R2, LSL #+16
\ 00000080 837A LDRB R3,[R0, #+10]
\ 00000082 ........ LDR.W R4,??DataTable5_4 ;; 0x40006640
\ 00000086 44F83320 STR R2,[R4, R3, LSL #+3]
324 /* 32-bit mask or Second 32-bit identifier */
325 CAN1->sFilterRegister[CAN_FilterInitStruct->CAN_FilterNumber].FR2 =
326 ((0x0000FFFF & (uint32_t)CAN_FilterInitStruct->CAN_FilterMaskIdHigh) << 16) |
327 (0x0000FFFF & (uint32_t)CAN_FilterInitStruct->CAN_FilterMaskIdLow);
\ 0000008A 827A LDRB R2,[R0, #+10]
\ 0000008C ........ LDR.W R3,??DataTable5_4 ;; 0x40006640
\ 00000090 13EBC202 ADDS R2,R3,R2, LSL #+3
\ 00000094 8388 LDRH R3,[R0, #+4]
\ 00000096 C488 LDRH R4,[R0, #+6]
\ 00000098 54EA0343 ORRS R3,R4,R3, LSL #+16
\ 0000009C 5360 STR R3,[R2, #+4]
328 }
329
330 /* Filter Mode */
331 if (CAN_FilterInitStruct->CAN_FilterMode == CAN_FilterMode_IdMask)
\ ??CAN_FilterInit_1:
\ 0000009E C27A LDRB R2,[R0, #+11]
\ 000000A0 002A CMP R2,#+0
\ 000000A2 07D1 BNE.N ??CAN_FilterInit_2
332 {
333 /*Id/Mask mode for the filter*/
334 CAN1->FM1R &= ~(uint32_t)filter_number_bit_pos;
\ 000000A4 ........ LDR.W R2,??DataTable5_5 ;; 0x40006604
\ 000000A8 1268 LDR R2,[R2, #+0]
\ 000000AA 8A43 BICS R2,R2,R1
\ 000000AC ........ LDR.W R3,??DataTable5_5 ;; 0x40006604
\ 000000B0 1A60 STR R2,[R3, #+0]
\ 000000B2 06E0 B.N ??CAN_FilterInit_3
335 }
336 else /* CAN_FilterInitStruct->CAN_FilterMode == CAN_FilterMode_IdList */
337 {
338 /*Identifier list mode for the filter*/
339 CAN1->FM1R |= (uint32_t)filter_number_bit_pos;
\ ??CAN_FilterInit_2:
\ 000000B4 ........ LDR.W R2,??DataTable5_5 ;; 0x40006604
\ 000000B8 1268 LDR R2,[R2, #+0]
\ 000000BA 0A43 ORRS R2,R1,R2
\ 000000BC ........ LDR.W R3,??DataTable5_5 ;; 0x40006604
\ 000000C0 1A60 STR R2,[R3, #+0]
340 }
341
342 /* Filter FIFO assignment */
343 if (CAN_FilterInitStruct->CAN_FilterFIFOAssignment == CAN_FilterFIFO0)
\ ??CAN_FilterInit_3:
\ 000000C2 0289 LDRH R2,[R0, #+8]
\ 000000C4 002A CMP R2,#+0
\ 000000C6 06D1 BNE.N ??CAN_FilterInit_4
344 {
345 /* FIFO 0 assignation for the filter */
346 CAN1->FFA1R &= ~(uint32_t)filter_number_bit_pos;
\ 000000C8 ........ LDR.W R2,??DataTable5_6 ;; 0x40006614
\ 000000CC 1268 LDR R2,[R2, #+0]
\ 000000CE 8A43 BICS R2,R2,R1
\ 000000D0 ........ LDR.W R3,??DataTable5_6 ;; 0x40006614
\ 000000D4 1A60 STR R2,[R3, #+0]
347 }
348
349 if (CAN_FilterInitStruct->CAN_FilterFIFOAssignment == CAN_FilterFIFO1)
\ ??CAN_FilterInit_4:
\ 000000D6 0289 LDRH R2,[R0, #+8]
\ 000000D8 012A CMP R2,#+1
\ 000000DA 06D1 BNE.N ??CAN_FilterInit_5
350 {
351 /* FIFO 1 assignation for the filter */
352 CAN1->FFA1R |= (uint32_t)filter_number_bit_pos;
\ 000000DC ........ LDR.W R2,??DataTable5_6 ;; 0x40006614
\ 000000E0 1268 LDR R2,[R2, #+0]
\ 000000E2 0A43 ORRS R2,R1,R2
\ 000000E4 ........ LDR.W R3,??DataTable5_6 ;; 0x40006614
\ 000000E8 1A60 STR R2,[R3, #+0]
353 }
354
355 /* Filter activation */
356 if (CAN_FilterInitStruct->CAN_FilterActivation == ENABLE)
\ ??CAN_FilterInit_5:
\ 000000EA 427B LDRB R2,[R0, #+13]
\ 000000EC 012A CMP R2,#+1
\ 000000EE 06D1 BNE.N ??CAN_FilterInit_6
357 {
358 CAN1->FA1R |= filter_number_bit_pos;
\ 000000F0 ........ LDR.W R2,??DataTable5_2 ;; 0x4000661c
\ 000000F4 1268 LDR R2,[R2, #+0]
\ 000000F6 0A43 ORRS R2,R1,R2
\ 000000F8 ........ LDR.W R3,??DataTable5_2 ;; 0x4000661c
\ 000000FC 1A60 STR R2,[R3, #+0]
359 }
360
361 /* Leave the initialisation mode for the filter */
362 CAN1->FMR &= ~FMR_FINIT;
\ ??CAN_FilterInit_6:
\ 000000FE ........ LDR.W R2,??DataTable5_1 ;; 0x40006600
\ 00000102 1268 LDR R2,[R2, #+0]
\ 00000104 5208 LSRS R2,R2,#+1
\ 00000106 5200 LSLS R2,R2,#+1
\ 00000108 ........ LDR.W R3,??DataTable5_1 ;; 0x40006600
\ 0000010C 1A60 STR R2,[R3, #+0]
363 }
\ 0000010E 10BC POP {R4}
\ 00000110 7047 BX LR ;; return
364
365 /**
366 * @brief Fills each CAN_InitStruct member with its default value.
367 * @param CAN_InitStruct: pointer to a CAN_InitTypeDef structure which
368 * will be initialized.
369 * @retval None.
370 */
\ In section .text, align 2, keep-with-next
371 void CAN_StructInit(CAN_InitTypeDef* CAN_InitStruct)
372 {
373 /* Reset CAN init structure parameters values */
374 /* Initialize the time triggered communication mode */
375 CAN_InitStruct->CAN_TTCM = DISABLE;
\ CAN_StructInit:
\ 00000000 0021 MOVS R1,#+0
\ 00000002 8171 STRB R1,[R0, #+6]
376 /* Initialize the automatic bus-off management */
377 CAN_InitStruct->CAN_ABOM = DISABLE;
\ 00000004 0021 MOVS R1,#+0
\ 00000006 C171 STRB R1,[R0, #+7]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -