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

📄 pmc.lst

📁 Tried to make CAN logger on AT91sam7X-ek, but have no idea how to implement FATFs... -( I m just a
💻 LST
📖 第 1 页 / 共 3 页
字号:
###############################################################################
#                                                                             #
#                                                       25/May/2009  02:53:23 #
# IAR ANSI C/C++ Compiler V5.20.0.20892/W32 EVALUATION for ARM                #
# Copyright 1999-2008 IAR Systems AB.                                         #
#                                                                             #
#    Cpu mode     =  arm                                                      #
#    Endian       =  little                                                   #
#    Source file  =  F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91lib\peripherals\pmc\pmc.c               #
#    Command line =  F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91lib\peripherals\pmc\pmc.c -D            #
#                    at91sam7x256 -D flash -D TRACE_LEVEL=4 -lC               #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
#                    91sam7x256_flash\List\ --remarks --diag_suppress         #
#                    Pe826,Pe1375 -o F:\Diplomovka\IARprojects\Diplomovka\25. #
#                    4.2009\getting-started-project-at91sam7x-ek-iar\getting- #
#                    started-project-at91sam7x-ek\at91sam7x-ek\getting-starte #
#                    d-project\ewp\at91sam7x256_flash\Obj\ --no_cse           #
#                    --no_unroll --no_inline --no_code_motion --no_tbaa       #
#                    --no_clustering --no_scheduling --debug --endian=little  #
#                    --cpu=ARM7TDMI -e --fpu=None --dlib_config "C:\Program   #
#                    Files (x86)\IAR Systems\Embedded Workbench 5.0           #
#                    Evaluation\ARM\INC\DLib_Config_Full.h" -I                #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
#                    \..\..\at91lib/peripherals\ -I                           #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
#                    \..\..\at91lib\ -I F:\Diplomovka\IARprojects\Diplomovka\ #
#                    25.4.2009\getting-started-project-at91sam7x-ek-iar\getti #
#                    ng-started-project-at91sam7x-ek\at91sam7x-ek\getting-sta #
#                    rted-project\ewp\..\..\..\at91lib\memories\sdmmc\ -I     #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
#                    \..\..\at91lib/components\ -I                            #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
#                    \..\..\at91lib/boards/at91sam7x-ek\ -I                   #
#                    F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
#                    \..\..\external_libs/crc\ -I "C:\Program Files           #
#                    (x86)\IAR Systems\Embedded Workbench 5.0                 #
#                    Evaluation\ARM\INC\" --interwork --cpu_mode arm -Oh      #
#    List file    =  F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
#                    91sam7x256_flash\List\pmc.lst                            #
#    Object file  =  F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
#                    tarted-project-at91sam7x-ek-iar\getting-started-project- #
#                    at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
#                    91sam7x256_flash\Obj\pmc.o                               #
#                                                                             #
#                                                                             #
###############################################################################

F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-started-project-at91sam7x-ek-iar\getting-started-project-at91sam7x-ek\at91lib\peripherals\pmc\pmc.c
      1          /* ----------------------------------------------------------------------------
      2           *         ATMEL Microcontroller Software Support 
      3           * ----------------------------------------------------------------------------
      4           * Copyright (c) 2008, Atmel Corporation
      5           *
      6           * All rights reserved.
      7           *
      8           * Redistribution and use in source and binary forms, with or without
      9           * modification, are permitted provided that the following conditions are met:
     10           *
     11           * - Redistributions of source code must retain the above copyright notice,
     12           * this list of conditions and the disclaimer below.
     13           *
     14           * Atmel's name may not be used to endorse or promote products derived from
     15           * this software without specific prior written permission.
     16           *
     17           * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
     18           * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     19           * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
     20           * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
     21           * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     22           * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
     23           * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     24           * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     25           * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     26           * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27           * ----------------------------------------------------------------------------
     28           */
     29          
     30          //------------------------------------------------------------------------------
     31          //         Headers
     32          //------------------------------------------------------------------------------
     33          
     34          #include "pmc.h"
     35          #include <board.h>
     36          #include <utility/assert.h>
     37          #include <utility/trace.h>
     38          
     39          #ifdef CP15_PRESENT
     40          #include <cp15/cp15.h>
     41          #endif
     42          
     43          #define MASK_STATUS 0x3FFFFFFC
     44          
     45          //------------------------------------------------------------------------------
     46          //         Global functions
     47          //------------------------------------------------------------------------------
     48          
     49          #if defined(at91sam7l64) || defined(at91sam7l128)
     50          //------------------------------------------------------------------------------
     51          /// Sets the fast wake-up inputs that can get the device out of Wait mode.
     52          /// \param inputs  Fast wake-up inputs to enable.
     53          //------------------------------------------------------------------------------
     54          void PMC_SetFastWakeUpInputs(unsigned int inputs)
     55          {
     56              SANITY_CHECK((inputs & ~0xFF) == 0);
     57              AT91C_BASE_PMC->PMC_FSMR = inputs;
     58          }
     59          
     60          #if !defined(__ICCARM__)
     61          __attribute__ ((section (".ramfunc"))) // GCC
     62          #endif
     63          //------------------------------------------------------------------------------
     64          /// Disables the main oscillator, making the device enter Wait mode.
     65          //------------------------------------------------------------------------------
     66          void PMC_DisableMainOscillatorForWaitMode(void)
     67          {
     68              AT91C_BASE_PMC->PMC_MOR = 0x37 << 16;
     69              while ((AT91C_BASE_PMC->PMC_MOR & AT91C_PMC_MAINSELS) != AT91C_PMC_MAINSELS);
     70          }
     71          
     72          #endif
     73          
     74          #if defined(at91sam7l)
     75          //------------------------------------------------------------------------------
     76          /// Disables the main oscillator when NOT running on it.
     77          //------------------------------------------------------------------------------
     78          void PMC_DisableMainOscillator(void)
     79          {
     80              AT91C_BASE_PMC->PMC_MOR = 0x37 << 16;
     81              while ((AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MAINSELS) == AT91C_PMC_MAINSELS);
     82          }
     83          #endif
     84          
     85          //------------------------------------------------------------------------------
     86          /// Disables the processor clock
     87          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
     88          void PMC_DisableProcessorClock(void)
     89          {    
     90              AT91C_BASE_PMC->PMC_SCDR = AT91C_PMC_PCK;   
   \                     PMC_DisableProcessorClock:
   \   00000000   FB00E0E3           MVN      R0,#+251
   \   00000004   C00FC0E3           BIC      R0,R0,#0x300
   \   00000008   0110A0E3           MOV      R1,#+1
   \   0000000C   001080E5           STR      R1,[R0, #+0]
     91              while ((AT91C_BASE_PMC->PMC_SCSR & AT91C_PMC_PCK) != AT91C_PMC_PCK); 
   \                     ??PMC_DisableProcessorClock_0:
   \   00000010   F700E0E3           MVN      R0,#+247
   \   00000014   C00FC0E3           BIC      R0,R0,#0x300
   \   00000018   000090E5           LDR      R0,[R0, #+0]
   \   0000001C   010010E3           TST      R0,#0x1
   \   00000020   FAFFFF0A           BEQ      ??PMC_DisableProcessorClock_0
     92          }
   \   00000024   1EFF2FE1           BX       LR               ;; return
     93          
     94          //------------------------------------------------------------------------------
     95          /// Enables the clock of a peripheral. The peripheral ID (AT91C_ID_xxx) is used
     96          /// to identify which peripheral is targetted.
     97          /// Note that the ID must NOT be shifted (i.e. 1 << AT91C_ID_xxx).
     98          /// \param id  Peripheral ID (AT91C_ID_xxx).
     99          //------------------------------------------------------------------------------

   \                                 In section .text, align 4, keep-with-next
    100          void PMC_EnablePeripheral(unsigned int id)
    101          {
   \                     PMC_EnablePeripheral:
   \   00000000   00502DE9           PUSH     {R12,LR}
    102              SANITY_CHECK(id < 32);
   \   00000004   200050E3           CMP      R0,#+32
   \   00000008   0600003A           BCC      ??PMC_EnablePeripheral_0
   \   0000000C   ........           LDR      R0,??DataTable3  ;; `?<Constant "-F- ASSERT: ">`
   \   00000010   ........           BL       printf

⌨️ 快捷键说明

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