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

📄 initrandomgenerator.lst

📁 zigbee location examples
💻 LST
字号:
##############################################################################
#                                                                            #
# IAR 8051 C/C++ Compiler V7.20H/W32                   16/Jan/2007  15:30:34 #
# Copyright 2004-2006 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Core               =  plain                                             #
#    Code model         =  banked                                            #
#    Data model         =  large                                             #
#    Calling convention =  xdata reentrant                                   #
#    Constant location  =  data                                              #
#    Dptr setup         =  1,16                                              #
#    Source file        =  E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Engi #
#                          ne\lib\hal\CC2430\initRandomGenerator.c           #
#    Command line       =  -I "C:\Program Files\IAR Systems\Embedded         #
#                          Workbench 4.05 Evaluation version\8051\INC\" -I   #
#                          "C:\Program Files\IAR Systems\Embedded Workbench  #
#                          4.05 Evaluation version\8051\SRC\LIB\" -I         #
#                          "C:\Program Files\IAR Systems\Embedded Workbench  #
#                          4.05 Evaluation version\8051\INC\CLIB\" -I        #
#                          E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Engi #
#                          ne\Test\mac\mac_loc\..\..\..\include\ -I          #
#                          E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Engi #
#                          ne\Test\mac\mac_loc\..\..\..\include\mac\cc2430\  #
#                          -I E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_E #
#                          ngine\Test\mac\mac_loc\..\..\..\include\hal\cc243 #
#                          0\ -I E:\公司产品资料\Zigbee\cc2431\cc2431定位\LO #
#                          C_Engine\Test\mac\mac_loc\..\..\..\apps\ -D       #
#                          CC2430EB -D USE_LED -lCN                          #
#                          E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Engi #
#                          ne\Test\mac\mac_loc\CC2430EB\List\ -lA            #
#                          E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Engi #
#                          ne\Test\mac\mac_loc\CC2430EB\List\ -o             #
#                          E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Engi #
#                          ne\Test\mac\mac_loc\CC2430EB\Obj\ -e -s9 --debug  #
#                          --core=plain --dptr=16,1 --data_model=large       #
#                          --code_model=banked --calling_convention=xdata_re #
#                          entrant --place_constants=data --nr_virtual_regs  #
#                          8 E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_En #
#                          gine\lib\hal\CC2430\initRandomGenerator.c         #
#    List file          =  E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Engi #
#                          ne\Test\mac\mac_loc\CC2430EB\List\initRandomGener #
#                          ator.lst                                          #
#    Object file        =  E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Engi #
#                          ne\Test\mac\mac_loc\CC2430EB\Obj\initRandomGenera #
#                          tor.r51                                           #
#                                                                            #
#                                                                            #
##############################################################################

E:\公司产品资料\Zigbee\cc2431\cc2431定位\LOC_Engine\lib\hal\CC2430\initRandomGenerator.c
      1          /******************************************************************************
      2          *                                                                             *
      3          *        **********                                                           *
      4          *       ************                                                          *
      5          *      ***        ***                                                         *
      6          *     ***    ++    ***                                                        *
      7          *     ***   +  +   ***                      CHIPCON                           *
      8          *     ***   +                                                                 *
      9          *     ***   +  +   ***                                                        *
     10          *     ***    ++    ***                                                        *
     11          *      ***        ***                                                         *
     12          *       ************                                                          *
     13          *        **********                                                           *
     14          *                                                                             *
     15          *******************************************************************************
     16          
     17          Filename:     initRandomGenerator.c
     18          Target:       cc2430
     19          Author:       EFU
     20          Revised:      20/12-2005
     21          Revision:     0.9
     22          ******************************************************************************/
     23          #include"hal.h"

   \                                 In segment SFR_AN, at 0xb4
   \   unsigned char volatile __sfr ADCCON1
   \                     ADCCON1:
   \   000000                DS 1

   \                                 In segment SFR_AN, at 0xbd
   \   unsigned char volatile __sfr RNDH
   \                     RNDH:
   \   000000                DS 1

   \                                 In segment SFR_AN, at 0xbe
   \   unsigned char volatile __sfr SLEEP
   \                     SLEEP:
   \   000000                DS 1

   \                                 In segment SFR_AN, at 0xc6
   \   unsigned char volatile __sfr CLKCON
   \                     CLKCON:
   \   000000                DS 1

   \                                 In segment SFR_AN, at 0xe1
   \   unsigned char volatile __sfr RFST
   \                     RFST:
   \   000000                DS 1
     24          
     25          
     26          #ifndef ADCTSTH
     27          // if ADCTSTH not defined in ioCC2430.h, define it
     28          #define  ADCTSTH ((unsigned char volatile __xdata *) 0)[0xDF3A]
     29          #endif
     30          //-----------------------------------------------------------------------------
     31          // See hal.h for a description of this function.
     32          //-----------------------------------------------------------------------------

   \                                 In segment BANKED_CODE, align 1, keep-with-next
     33          void halInitRandomGenerator(void)
   \                     halInitRandomGenerator:
     34          {
   \   000000   C082         PUSH    DPL
   \   000002   C083         PUSH    DPH
   \   000004                ; Saved register size: 2
   \   000004                ; Auto size: 0
     35             BYTE i;
     36          
     37             //turning on power to analog part of radio
     38             RFPWR = 0x04;
   \   000004   7404         MOV     A,#0x4
   \   000006   90DF17       MOV     DPTR,#-0x20e9
   \   000009   F0           MOVX    @DPTR,A
     39          
     40             //waiting for voltage regulator.
     41             while((RFPWR & 0x10)){}
   \                     ??halInitRandomGenerator_0:
   \   00000A   E0           MOVX    A,@DPTR
   \   00000B   A2E4         MOV     C,0xE0 /* A   */.4
   \   00000D   40FB         JC      ??halInitRandomGenerator_0
     42          
     43             //Turning on 32 MHz crystal oscillator
     44             SET_MAIN_CLOCK_SOURCE(CRYSTAL);
   \   00000F   53BEFB       ANL     0xbe,#0xfb
   \                     ??halInitRandomGenerator_1:
   \   000012   E5BE         MOV     A,0xbe
   \   000014   A2E6         MOV     C,0xE0 /* A   */.6
   \   000016   50FA         JNC     ??halInitRandomGenerator_1
   \   000018   00           NOP
   \   000019   53C6B8       ANL     0xc6,#0xb8
   \   00001C   E5C6         MOV     A,0xc6
   \   00001E   43BE04       ORL     0xbe,#0x4
     45          
     46             // Turning on receiver to get output from IF-ADC.
     47             ISRXON;
   \   000021   75E1E2       MOV     0xe1,#-0x1e
     48             halWait(1);
   \   000024                ; Setup parameters for call to function halWait
   \   000024   7901         MOV     R1,#0x1
   \   000026   90....       MOV     DPTR,#(halWait & 0xffff)
   \   000029   74..         MOV     A,#((halWait >> 16) & 0xff)
   \   00002B   12....       LCALL   ?BCALL               ; Banked call to: DPTR()
     49          
     50             ENABLE_RANDOM_GENERATOR();
   \   00002E   53B4F3       ANL     0xb4,#0xf3
   \   000031   E5B4         MOV     A,0xb4
     51          
     52             for(i = 0 ; i < 32 ; i++)
   \   000033   7A20         MOV     R2,#0x20
     53             {
     54                RNDH = ADCTSTH;
   \                     ??halInitRandomGenerator_2:
   \   000035   90DF3A       MOV     DPTR,#-0x20c6
   \   000038   E0           MOVX    A,@DPTR
   \   000039   F5BD         MOV     0xbd,A
     55                CLOCK_RANDOM_GENERATOR();
   \   00003B   43B404       ORL     0xb4,#0x4
     56             }
   \   00003E   1A           DEC     R2
   \   00003F   EA           MOV     A,R2
   \   000040   70F3         JNZ     ??halInitRandomGenerator_2
     57          
     58             return;
   \   000042   D083         POP     DPH
   \   000044   D082         POP     DPL
   \   000046   02....       LJMP    ?BRET
     59          }
     60          

   Maximum stack usage in bytes:

     Function               ISTACK PSTACK XSTACK
     --------               ------ ------ ------
     halInitRandomGenerator     2      0      0
       -> halWait               4      0      0


   Segment part sizes:

     Function/Label         Bytes
     --------------         -----
     ADCCON1                   1
     RNDH                      1
     SLEEP                     1
     CLKCON                    1
     RFST                      1
     halInitRandomGenerator   73

 
 73 bytes in segment BANKED_CODE
  5 bytes in segment SFR_AN
 
 73 bytes of CODE memory
  0 bytes of DATA memory (+ 5 bytes shared)

Errors: none
Warnings: none

⌨️ 快捷键说明

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