⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.lst

📁 Tried to make CAN logger on AT91sam7X-ek, but have no idea how to implement FATFs... -( I m just a
💻 LST
📖 第 1 页 / 共 5 页
字号:
   \   00000058   0700001A           BNE      ??ISR_Pwmc_3
    255          
    256                              fadeIn = 0;
   \   0000005C   68009FE5           LDR      R0,??ISR_Pwmc_0+0xC  ;; ??fadeIn
   \   00000060   0020A0E3           MOV      R2,#+0
   \   00000064   030000EA           B        ??ISR_Pwmc_4
    257                          }
    258                      }
    259                      // Fade out
    260                      else {
    261          
    262                          duty--;
   \                     ??ISR_Pwmc_2:
   \   00000068   011050E2           SUBS     R1,R0,#+1
    263                          if (duty == MIN_DUTY_CYCLE) {
   \   0000006C   0200001A           BNE      ??ISR_Pwmc_3
    264          
    265                              fadeIn = 1;
   \   00000070   54009FE5           LDR      R0,??ISR_Pwmc_0+0xC  ;; ??fadeIn
   \   00000074   0120A0E3           MOV      R2,#+1
   \                     ??ISR_Pwmc_4:
   \   00000078   0020C0E5           STRB     R2,[R0, #+0]
   \                     ??ISR_Pwmc_3:
   \   0000007C   44009FE5           LDR      R0,??ISR_Pwmc_0+0x8  ;; ??duty
   \   00000080   001080E5           STR      R1,[R0, #+0]
    266                          }
    267                      }
    268          
    269                      // Set new duty cycle
    270                      count = 0;
   \   00000084   38009FE5           LDR      R0,??ISR_Pwmc_0+0x4  ;; ??count
   \   00000088   0020A0E3           MOV      R2,#+0
   \   0000008C   002080E5           STR      R2,[R0, #+0]
    271                      PWMC_SetDutyCycle(CHANNEL_PWM_LED0, duty);
   \   00000090   0118A0E1           MOV      R1,R1, LSL #+16
   \   00000094   2118A0E1           MOV      R1,R1, LSR #+16
   \   00000098   0100A0E3           MOV      R0,#+1
   \   0000009C   ........           BL       PWMC_SetDutyCycle
    272                      PWMC_SetDutyCycle(CHANNEL_PWM_LED1, duty);
   \   000000A0   20009FE5           LDR      R0,??ISR_Pwmc_0+0x8  ;; ??duty
   \   000000A4   001090E5           LDR      R1,[R0, #+0]
   \   000000A8   0118A0E1           MOV      R1,R1, LSL #+16
   \   000000AC   2118A0E1           MOV      R1,R1, LSR #+16
   \   000000B0   0200A0E3           MOV      R0,#+2
   \   000000B4   ........           BL       PWMC_SetDutyCycle
    273                  }
    274              }
    275          }
   \                     ??ISR_Pwmc_1:
   \   000000B8   0140BDE8           POP      {R0,LR}
   \   000000BC   1EFF2FE1           BX       LR               ;; return
   \                     ??ISR_Pwmc_0:
   \   000000C0   1CC0FCFF           DC32     0xfffcc01c
   \   000000C4   ........           DC32     ??count
   \   000000C8   ........           DC32     ??duty
   \   000000CC   ........           DC32     ??fadeIn

   \                                 In section .bss, align 4
   \                     ??count:
   \   00000000                      DS8 4

   \                                 In section .bss, align 4
   \                     ??duty:
   \   00000000                      DS8 4

   \                                 In section .data, align 1
   \                     ??fadeIn:
   \   00000000   01                 DC8 1
    276          //------------------------------------------------------------------------------
    277          /// Handler for PIT interrupt. Increments the timestamp counter.
    278          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
    279          void ISR_Pit(void)
    280          {
   \                     ISR_Pit:
   \   00000000   00502DE9           PUSH     {R12,LR}
    281              unsigned int status;
    282          
    283              // Read the PIT status register
    284              status = PIT_GetStatus() & AT91C_PITC_PITS;
   \   00000004   ........           BL       PIT_GetStatus
   \   00000008   010010E2           ANDS     R0,R0,#0x1
    285              if (status != 0) {
   \   0000000C   0500000A           BEQ      ??ISR_Pit_0
    286          
    287                  // Read the PIVR to acknowledge interrupt and get number of ticks
    288                  timestamp += (PIT_GetPIVR() >> 20);
   \   00000010   ........           BL       PIT_GetPIVR
   \   00000014   ........           LDR      R1,??DataTable13  ;; timestamp
   \   00000018   001091E5           LDR      R1,[R1, #+0]
   \   0000001C   200A81E0           ADD      R0,R1,R0, LSR #+20
   \   00000020   ........           LDR      R1,??DataTable13  ;; timestamp
   \   00000024   000081E5           STR      R0,[R1, #+0]
    289              }
    290          }
   \                     ??ISR_Pit_0:
   \   00000028   0140BDE8           POP      {R0,LR}
   \   0000002C   1EFF2FE1           BX       LR               ;; return
    291          
    292          //------------------------------------------------------------------------------
    293          /// Configure the periodic interval timer to generate an interrupt every
    294          /// millisecond.
    295          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
    296          void ConfigurePit(void)
    297          {
   \                     ConfigurePit:
   \   00000000   00502DE9           PUSH     {R12,LR}
    298              // Initialize the PIT to the desired frequency
    299              PIT_Init(PIT_PERIOD, BOARD_MCK / 1000000);
   \   00000004   3010A0E3           MOV      R1,#+48
   \   00000008   FA0FA0E3           MOV      R0,#+1000
   \   0000000C   ........           BL       PIT_Init
    300          
    301              // Configure interrupt on PIT
    302              AIC_DisableIT(AT91C_ID_SYS);
   \   00000010   0100A0E3           MOV      R0,#+1
   \   00000014   ........           BL       AIC_DisableIT
    303              AIC_ConfigureIT(AT91C_ID_SYS, AT91C_AIC_PRIOR_LOWEST, ISR_Pit);
   \   00000018   1C209FE5           LDR      R2,??ConfigurePit_0  ;; ISR_Pit
   \   0000001C   0010A0E3           MOV      R1,#+0
   \   00000020   0100A0E3           MOV      R0,#+1
   \   00000024   ........           BL       AIC_ConfigureIT
    304              AIC_EnableIT(AT91C_ID_SYS);
   \   00000028   0100A0E3           MOV      R0,#+1
   \   0000002C   ........           BL       AIC_EnableIT
    305              PIT_EnableIT();
   \   00000030   ........           BL       PIT_EnableIT
    306          
    307              // Enable the pit
    308              PIT_Enable();
   \   00000034   0140BDE8           POP      {R0,LR}
   \   00000038   ........           B        PIT_Enable       ;; tailcall
   \                     ??ConfigurePit_0:
   \   0000003C   ........           DC32     ISR_Pit
    309          }
    310          
    311          //------------------------------------------------------------------------------
    312          /// Interrupt handler for pushbutton\#1. Starts or stops LED\#1.
    313          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
    314          void ISR_Bp1(void)
    315          {
   \                     ISR_Bp1:
   \   00000000   00502DE9           PUSH     {R12,LR}
    316              static unsigned int lastPress = 0;
    317              
    318              // Check if the button has been pressed
    319              if (!PIO_Get(&pinPB1)) {
   \   00000004   ........           LDR      R0,??DataTable11  ;; pinPB1
   \   00000008   ........           BL       PIO_Get
   \   0000000C   000050E3           CMP      R0,#+0
   \   00000010   0F00001A           BNE      ??ISR_Bp1_0
    320          
    321                  if ((timestamp - lastPress) > DEBOUNCE_TIME) {
   \   00000014   ........           LDR      R0,??DataTable13  ;; timestamp
   \   00000018   000090E5           LDR      R0,[R0, #+0]
   \   0000001C   38109FE5           LDR      R1,??ISR_Bp1_1   ;; ??lastPress
   \   00000020   001091E5           LDR      R1,[R1, #+0]
   \   00000024   010040E0           SUB      R0,R0,R1
   \   00000028   F510A0E3           MOV      R1,#+245
   \   0000002C   401F81E3           ORR      R1,R1,#0x100
   \   00000030   010050E1           CMP      R0,R1
   \   00000034   0600003A           BCC      ??ISR_Bp1_0
    322          
    323                      lastPress = timestamp;
   \   00000038   1C009FE5           LDR      R0,??ISR_Bp1_1   ;; ??lastPress
   \   0000003C   ........           LDR      R1,??DataTable13  ;; timestamp
   \   00000040   001091E5           LDR      R1,[R1, #+0]
   \   00000044   001080E5           STR      R1,[R0, #+0]
    324                      
    325                      StopSW = 1;
   \   00000048   ........           LDR      R0,??DataTable30  ;; StopSW
   \   0000004C   0110A0E3           MOV      R1,#+1
   \   00000050   0010C0E5           STRB     R1,[R0, #+0]
    326                  
    327                  }
    328              }
    329          }
   \                     ??ISR_Bp1_0:
   \   00000054   0140BDE8           POP      {R0,LR}
   \   00000058   1EFF2FE1           BX       LR               ;; return
   \                     ??ISR_Bp1_1:
   \   0000005C   ........           DC32     ??lastPress

   \                                 In section .bss, align 4
   \                     ??lastPress:
   \   00000000                      DS8 4
    330          
    331          //------------------------------------------------------------------------------
    332          /// Configures the pushbuttons to generate interrupts when pressed.
    333          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
    334          void ConfigureButtons(void)
    335          {
   \                     ConfigureButtons:
   \   00000000   00502DE9           PUSH     {R12,LR}
    336              // Configure pios
    337              PIO_Configure(&pinPB1, 1);
   \   00000004   0110A0E3           MOV      R1,#+1
   \   00000008   ........           LDR      R0,??DataTable11  ;; pinPB1
   \   0000000C   ........           BL       PIO_Configure
    338          
    339              // Initialize interrupts
    340              PIO_InitializeInterrupts(AT91C_AIC_PRIOR_LOWEST);
   \   00000010   0000A0E3           MOV      R0,#+0
   \   00000014   ........           BL       PIO_InitializeInterrupts
    341              PIO_ConfigureIt(&pinPB1, (void (*)(const Pin *)) ISR_Bp1);
   \   00000018   10109FE5           LDR      R1,??ConfigureButtons_0  ;; ISR_Bp1
   \   0000001C   ........           LDR      R0,??DataTable11  ;; pinPB1
   \   00000020   ........           BL       PIO_ConfigureIt
    342              PIO_EnableIt(&pinPB1);
   \   00000024   ........           LDR      R0,??DataTable11  ;; pinPB1
   \   00000028   0240BDE8           POP      {R1,LR}
   \   0000002C   ........           B        PIO_EnableIt     ;; tailcall
   \                     ??ConfigureButtons_0:
   \   00000030   ........           DC32     ISR_Bp1
    343          
    344          }
    345          
    346          //------------------------------------------------------------------------------
    347          /// Configures LEDs \#1 and \#2 (cleared by default).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -