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

📄 main.lss

📁 基于CC1100和ATMEGA128的无线通信程序
💻 LSS
📖 第 1 页 / 共 5 页
字号:

main.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .data         000002cc  00800100  00000b8e  00000c22  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  1 .text         00000b8e  00000000  00000000  00000094  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .bss          0000000c  008003cc  008003cc  00000eee  2**0
                  ALLOC
  3 .noinit       00000000  008003d8  008003d8  00000eee  2**0
                  CONTENTS
  4 .eeprom       00000000  00810000  00810000  00000eee  2**0
                  CONTENTS
  5 .stab         00000408  00000000  00000000  00000ef0  2**2
                  CONTENTS, READONLY, DEBUGGING
  6 .stabstr      00000084  00000000  00000000  000012f8  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_aranges 00000014  00000000  00000000  0000137c  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_pubnames 0000020b  00000000  00000000  00001390  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_info   000009d8  00000000  00000000  0000159b  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_abbrev 0000016a  00000000  00000000  00001f73  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_line   0000076d  00000000  00000000  000020dd  2**0
                  CONTENTS, READONLY, DEBUGGING
 12 .debug_str    000003fb  00000000  00000000  0000284a  2**0
                  CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:

00000000 <__vectors>:
   0:	0c 94 46 00 	jmp	0x8c <__ctors_end>
   4:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
   8:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
   c:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  10:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  14:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  18:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  1c:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  20:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  24:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  28:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  2c:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  30:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  34:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  38:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  3c:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  40:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  44:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  48:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  4c:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  50:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  54:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  58:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  5c:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  60:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  64:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  68:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  6c:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  70:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  74:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  78:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  7c:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  80:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  84:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>
  88:	0c 94 63 00 	jmp	0xc6 <__bad_interrupt>

0000008c <__ctors_end>:
  8c:	11 24       	eor	r1, r1
  8e:	1f be       	out	0x3f, r1	; 63
  90:	cf ef       	ldi	r28, 0xFF	; 255
  92:	d0 e1       	ldi	r29, 0x10	; 16
  94:	de bf       	out	0x3e, r29	; 62
  96:	cd bf       	out	0x3d, r28	; 61

00000098 <__do_copy_data>:
  98:	13 e0       	ldi	r17, 0x03	; 3
  9a:	a0 e0       	ldi	r26, 0x00	; 0
  9c:	b1 e0       	ldi	r27, 0x01	; 1
  9e:	ee e8       	ldi	r30, 0x8E	; 142
  a0:	fb e0       	ldi	r31, 0x0B	; 11
  a2:	00 e0       	ldi	r16, 0x00	; 0
  a4:	0b bf       	out	0x3b, r16	; 59
  a6:	02 c0       	rjmp	.+4      	; 0xac <__do_copy_data+0x14>
  a8:	07 90       	elpm	r0, Z+
  aa:	0d 92       	st	X+, r0
  ac:	ac 3c       	cpi	r26, 0xCC	; 204
  ae:	b1 07       	cpc	r27, r17
  b0:	d9 f7       	brne	.-10     	; 0xa8 <__do_copy_data+0x10>

000000b2 <__do_clear_bss>:
  b2:	13 e0       	ldi	r17, 0x03	; 3
  b4:	ac ec       	ldi	r26, 0xCC	; 204
  b6:	b3 e0       	ldi	r27, 0x03	; 3
  b8:	01 c0       	rjmp	.+2      	; 0xbc <.do_clear_bss_start>

000000ba <.do_clear_bss_loop>:
  ba:	1d 92       	st	X+, r1

000000bc <.do_clear_bss_start>:
  bc:	a8 3d       	cpi	r26, 0xD8	; 216
  be:	b1 07       	cpc	r27, r17
  c0:	e1 f7       	brne	.-8      	; 0xba <.do_clear_bss_loop>
  c2:	0c 94 d1 04 	jmp	0x9a2 <main>

000000c6 <__bad_interrupt>:
  c6:	0c 94 00 00 	jmp	0x0 <__vectors>

000000ca <Wait>:
	...
        NOP();
        NOP();
        NOP();
        NOP();
    } while (--timeout);
  d2:	81 50       	subi	r24, 0x01	; 1
  d4:	d1 f7       	brne	.-12     	; 0xca <Wait>
  d6:	08 95       	ret

000000d8 <Spi_Setup>:

} //Wait



void Spi_Setup(void)
{
      
   SPCR = BM(SPE) | BM(MSTR);   //SPI ENABLE;
  d8:	80 e5       	ldi	r24, 0x50	; 80
  da:	8d b9       	out	0x0d, r24	; 13
  dc:	08 95       	ret

000000de <TI_CC_PowerupResetCCxxx0>:
                                //MSTR置位主机模; 
                                //CPOL=0,CPHA=0 工作模式为模式0 ;
                                //SPR1=0,SPR0=0,Focr/4;   
}

//-------------------------------------------------------------------------------------------------------
// IMPORTANT NOTICE:
//
//                 min 40 us
//                 <------------------>
// CSn      |--|  |--------------------|            |-----
//          |  |  |                    |            |
//              --                      ------------
//
// MISO                                     |----|
//          -----------------------------|  |    |
//                                        --      ---------
//               Unknown / don't care
//                                       SRES     done
//-------------------------------------------------------------------------------------------------

   
void TI_CC_PowerupResetCCxxx0(void) 
    { 
        SPI_DISABLE(); 
  de:	c0 9a       	sbi	0x18, 0	; 24
        Wait(1); 
  e0:	81 e0       	ldi	r24, 0x01	; 1
  e2:	0e 94 65 00 	call	0xca <Wait>
        SPI_ENABLE(); 
  e6:	c0 98       	cbi	0x18, 0	; 24
        Wait(1); 
  e8:	81 e0       	ldi	r24, 0x01	; 1
  ea:	0e 94 65 00 	call	0xca <Wait>
        SPI_DISABLE(); 
  ee:	c0 9a       	sbi	0x18, 0	; 24
        Wait(41);
  f0:	89 e2       	ldi	r24, 0x29	; 41
  f2:	0e 94 65 00 	call	0xca <Wait>
        SPI_ENABLE();
  f6:	c0 98       	cbi	0x18, 0	; 24
	    while ((PINB&0x08)); 
  f8:	b3 99       	sbic	0x16, 3	; 22
  fa:	fe cf       	rjmp	.-4      	; 0xf8 <TI_CC_PowerupResetCCxxx0+0x1a>
        SPDR = CCxxx0_SRES; 
  fc:	80 e3       	ldi	r24, 0x30	; 48
  fe:	8f b9       	out	0x0f, r24	; 15
        SPI_WAIT(); 
 100:	77 9b       	sbis	0x0e, 7	; 14
 102:	fe cf       	rjmp	.-4      	; 0x100 <TI_CC_PowerupResetCCxxx0+0x22>
	    while ((PINB&0x08)); 
 104:	b3 99       	sbic	0x16, 3	; 22
 106:	fe cf       	rjmp	.-4      	; 0x104 <TI_CC_PowerupResetCCxxx0+0x26>
        SPI_DISABLE(); 
 108:	c0 9a       	sbi	0x18, 0	; 24
 10a:	08 95       	ret

0000010c <TI_CC_SpiReadReg>:
	} 
//-------------------------------------------------------------------------------------------------------
//  BYTE TI_CC_SpiReadReg(BYTE addr)
//	读单个寄存器
//  DESCRIPTION:
//      This function gets the value of a single specified CCxxx0 register.
//
//  ARGUMENTS:
//      BYTE addr
//          Address of the CCxxx0 register to be accessed.
//
//  RETURN VALUE:
//      BYTE
//          Value of the accessed CCxxx0 register.
//-------------------------------------------------------------------------------------------------------
BYTE TI_CC_SpiReadReg(BYTE addr) 
{
    UINT8 x;
    SPI_ENABLE(); 
 10c:	c0 98       	cbi	0x18, 0	; 24
    NOP();
 10e:	00 00       	nop
    while(MISO_1);
 110:	b3 99       	sbic	0x16, 3	; 22
 112:	fe cf       	rjmp	.-4      	; 0x110 <TI_CC_SpiReadReg+0x4>
    NOP();
 114:	00 00       	nop
    SPI_TX(addr | READ_SINGLE);
 116:	80 68       	ori	r24, 0x80	; 128
 118:	8f b9       	out	0x0f, r24	; 15
 11a:	77 9b       	sbis	0x0e, 7	; 14
 11c:	fe cf       	rjmp	.-4      	; 0x11a <TI_CC_SpiReadReg+0xe>
    SPI_RX(x);
 11e:	1f b8       	out	0x0f, r1	; 15
 120:	77 9b       	sbis	0x0e, 7	; 14
 122:	fe cf       	rjmp	.-4      	; 0x120 <TI_CC_SpiReadReg+0x14>
 124:	8f b1       	in	r24, 0x0f	; 15
    NOP();    
 126:	00 00       	nop
    SPI_DISABLE();    
 128:	c0 9a       	sbi	0x18, 0	; 24
    return x;
}// TI_CC_SpiReadReg
 12a:	99 27       	eor	r25, r25
 12c:	08 95       	ret

0000012e <TI_CC_SpiReadStatus>:


//-------------------------------------------------------------------------------------------------------
//  BYTE TI_CC_SpiReadStatus(BYTE addr)
// 读CC1100 状态寄存器
//  DESCRIPTION:
//      This function reads a CCxxx0 status register.
//
//  ARGUMENTS:
//      BYTE addr
//          Address of the CCxxx0 status register to be accessed.
//
//  RETURN VALUE:
//      BYTE
//          Value of the accessed CCxxx0 status register.
//-------------------------------------------------------------------------------------------------------
BYTE TI_CC_SpiReadStatus(BYTE addr)
{
    UINT8 x;
  
    SPI_ENABLE(); 
 12e:	c0 98       	cbi	0x18, 0	; 24
    NOP();
 130:	00 00       	nop
    while(MISO_1);
 132:	b3 99       	sbic	0x16, 3	; 22
 134:	fe cf       	rjmp	.-4      	; 0x132 <TI_CC_SpiReadStatus+0x4>
    NOP();
 136:	00 00       	nop
    SPI_TX(addr | READ_BURST);
 138:	80 6c       	ori	r24, 0xC0	; 192
 13a:	8f b9       	out	0x0f, r24	; 15
 13c:	77 9b       	sbis	0x0e, 7	; 14
 13e:	fe cf       	rjmp	.-4      	; 0x13c <TI_CC_SpiReadStatus+0xe>
    SPI_RX(x);
 140:	1f b8       	out	0x0f, r1	; 15
 142:	77 9b       	sbis	0x0e, 7	; 14
 144:	fe cf       	rjmp	.-4      	; 0x142 <TI_CC_SpiReadStatus+0x14>
 146:	8f b1       	in	r24, 0x0f	; 15
    NOP();
 148:	00 00       	nop
    SPI_DISABLE(); 
 14a:	c0 9a       	sbi	0x18, 0	; 24
    return x;
}// TI_CC_SpiReadStatus
 14c:	99 27       	eor	r25, r25
 14e:	08 95       	ret

00000150 <TI_CC_SpiReadBurstReg>:


//-------------------------------------------------------------------------------------------------------
//  void TI_CC_SpiReadBurstReg(BYTE addr, BYTE *buffer, BYTE count)
// 连续读取缓冲区数据
//  DESCRIPTION:
//      This function reads multiple CCxxx0 register, using SPI burst access.
//
//  ARGUMENTS:
//      BYTE addr
//          Address of the first CCxxx0 register to be accessed.
//      BYTE *buffer
//          Pointer to a byte array which stores the values read from a
//          corresponding range of CCxxx0 registers.
//      BYTE count
//          Number of bytes to be written to the subsequent CCxxx0 registers.
//-------------------------------------------------------------------------------------------------------
void TI_CC_SpiReadBurstReg(BYTE addr, BYTE *buffer, BYTE count) 
{
 150:	db 01       	movw	r26, r22
    UINT8 i;
    SPI_ENABLE(); 
 152:	c0 98       	cbi	0x18, 0	; 24
    while(MISO_1);
 154:	b3 99       	sbic	0x16, 3	; 22
 156:	fe cf       	rjmp	.-4      	; 0x154 <TI_CC_SpiReadBurstReg+0x4>
    NOP();
 158:	00 00       	nop
    SPI_TX(addr | READ_BURST);
 15a:	80 6c       	ori	r24, 0xC0	; 192
 15c:	8f b9       	out	0x0f, r24	; 15
 15e:	77 9b       	sbis	0x0e, 7	; 14
 160:	fe cf       	rjmp	.-4      	; 0x15e <TI_CC_SpiReadBurstReg+0xe>
    for (i = 0; i < count; i++) 
 162:	90 e0       	ldi	r25, 0x00	; 0
 164:	94 17       	cp	r25, r20
 166:	50 f4       	brcc	.+20     	; 0x17c <TI_CC_SpiReadBurstReg+0x2c>
    {
    	SPI_RX(buffer[i]);
 168:	1f b8       	out	0x0f, r1	; 15
 16a:	77 9b       	sbis	0x0e, 7	; 14
 16c:	fe cf       	rjmp	.-4      	; 0x16a <TI_CC_SpiReadBurstReg+0x1a>
 16e:	fd 01       	movw	r30, r26
 170:	e9 0f       	add	r30, r25
 172:	f1 1d       	adc	r31, r1
 174:	8f b1       	in	r24, 0x0f	; 15
 176:	80 83       	st	Z, r24
 178:	9f 5f       	subi	r25, 0xFF	; 255
 17a:	f4 cf       	rjmp	.-24     	; 0x164 <TI_CC_SpiReadBurstReg+0x14>
    }
    NOP(); 
 17c:	00 00       	nop
    SPI_DISABLE(); 
 17e:	c0 9a       	sbi	0x18, 0	; 24
    buffer[i] = 0;		// add a terminal char
 180:	a9 0f       	add	r26, r25
 182:	b1 1d       	adc	r27, r1
 184:	1c 92       	st	X, r1
 186:	08 95       	ret

00000188 <TI_CC_SpiStrobe>:
}// TI_CC_SpiReadBurstReg

//-------------------------------------------------------------------------------------------------------
//  void TI_CC_SpiStrobe(BYTE strobe)
//	发送命令字节
//  DESCRIPTION:
//      Function for writing a strobe command to the CCxxx0
//
//  ARGUMENTS:
//      BYTE strobe
//          Strobe command
//-------------------------------------------------------------------------------------------------------
void TI_CC_SpiStrobe(BYTE strobe)

⌨️ 快捷键说明

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