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

📄 simple_phy.lst

📁 在飞思卡尔MC9S08GB60单片机环境下实现了无线监控
💻 LST
📖 第 1 页 / 共 5 页
字号:
  0019 2216             BHI   L31 ;abs = 0031
  001b a300             CPX   #0
  001d 9eef01           STX   1,SP
  0020 250c             BCS   L2E ;abs = 002e
  0022 a303             CPX   #3
  0024 2208             BHI   L2E ;abs = 002e
  0026 4f               CLRA  
  0027 cd0000           JSR   _Jump_Table_Offset
  002a 0b               DC.B  L36
  002b 05               DC.B  L31
  002c 17               DC.B  L44
  002d 29               DC.B  L57
  002e          L2E:    
  002e 51801a           CBEQX #-128,L4B ;abs = 004b
  0031          L31:    
  231:  	{
  232:  		case IDLE_MODE: /* Write Idle */
  233:  		  #if defined (LNA)
  234:  		    MC13192_LNA_CTRL = LNA_OFF;
  235:  		  #endif
  236:  		  
  237:  		  #if defined (PA)
  238:  		    MC13192_PA_CTRL = PA_OFF;
  239:  		  #endif
  240:  		  
  241:  			reg |= IDLE_MODE;
  242:  			rtx_mode = IDLE_MODE;
  243:  			drv_write_spi_1(MODE_ADDR, reg);
  244:  			break;
  245:  		case RX_MODE: /* Write RX */
  246:  		
  247:  		  #if defined (LNA)
  248:  		    MC13192_LNA_CTRL = LNA_ON;
  249:  		  #endif
  250:  
  251:  		  #if defined (PA)
  252:  		    MC13192_PA_CTRL = PA_OFF;
  253:  		  #endif
  254:  		
  255:  			#if defined (ANTENNA_SWITCH)
  256:  				MC13192_ANT_CTRL2 = ANT_CTRL_ON;	/* Turn on the RX antenna */
  257:  				MC13192_ANT_CTRL = ANT_CTRL_OFF;	/* Turn off the TX antenna */
  258:  			#endif
  259:  			
  260:  			rtx_mode = RX_MODE;
  261:  			reg |= RX_MODE;
  262:  			drv_write_spi_1(MODE_ADDR, reg);
  263:  			AssertRTXEN(); 
  264:  			break;
  265:  		case RX_MODE_WTO: /* Write RX, but set rtx_mode to timeout */
  266:  		
  267:  			#if defined (LNA)
  268:  		    MC13192_LNA_CTRL = LNA_ON;
  269:  		  #endif
  270:  		
  271:  		  #if defined (PA)
  272:  		    MC13192_PA_CTRL = PA_OFF;
  273:  		  #endif
  274:  
  275:  			#if defined (ANTENNA_SWITCH)
  276:  				MC13192_ANT_CTRL2 = ANT_CTRL_ON;	/* Turn on the RX antenna */
  277:  				MC13192_ANT_CTRL = ANT_CTRL_OFF;	/* Turn off the TX antenna */
  278:  			#endif
  279:  			
  280:  			rtx_mode = RX_MODE_WTO;
  281:  			reg |= RX_MODE;
  282:  			drv_write_spi_1(MODE_ADDR, reg);
  283:  			AssertRTXEN();
  284:  			break;
  285:  		case TX_MODE: /* Write Tx. Note: force LO lock not used */
  286:  
  287:  		  #if defined (PA)
  288:    	    MC13192_PA_CTRL = PA_ON;
  289:  		  #endif
  290:  		
  291:  		  #if defined (LNA)
  292:  		    MC13192_LNA_CTRL = LNA_OFF;
  293:  		  #endif
  294:  		
  295:  			#if defined (ANTENNA_SWITCH)
  296:  				MC13192_ANT_CTRL2 = ANT_CTRL_OFF;	/* Turn off the RX antenna */
  297:  				MC13192_ANT_CTRL = ANT_CTRL_ON;	/* Turn on the TX antenna */
  298:  			#endif
  299:  						
  300:  			reg |= TX_MODE;
  301:  			rtx_mode = TX_MODE;
  302:  			drv_write_spi_1(MODE_ADDR, reg);
  303:  			AssertRTXEN();
  304:  			break;
  305:  		default:
  306:  			return ERROR;	
  0031 ae01             LDX   #1
  0033 8c               CLRH  
  0034 203b             BRA   L71 ;abs = 0071
  0036          L36:    
  0036 4f               CLRA  
  0037 c70000           STA   rtx_mode
  003a a606             LDA   #6
  003c 9efe02           LDHX  2,SP
  003f cd0000           JSR   drv_write_spi_1
  0042 202a             BRA   L6E ;abs = 006e
  0044          L44:    
  0044 a602             LDA   #2
  0046 c70000           STA   rtx_mode
  0049 2003             BRA   L4E ;abs = 004e
  004b          L4B:    
  004b cf0000           STX   rtx_mode
  004e          L4E:    
  004e 95               TSX   
  004f e602             LDA   2,X
  0051 aa02             ORA   #2
  0053 e702             STA   2,X
  0055 200c             BRA   L63 ;abs = 0063
  0057          L57:    
  0057 95               TSX   
  0058 e602             LDA   2,X
  005a aa03             ORA   #3
  005c e702             STA   2,X
  005e a603             LDA   #3
  0060 c70000           STA   rtx_mode
  0063          L63:    
  0063 a606             LDA   #6
  0065 9efe02           LDHX  2,SP
  0068 cd0000           JSR   drv_write_spi_1
  006b cd0000           JSR   AssertRTXEN
  006e          L6E:    
  307:  	}
  308:  	return SUCCESS;
  006e ae77             LDX   #119
  0070 8c               CLRH  
  0071          L71:    
  309:  }
  0071 a704             AIS   #4
  0073 81               RTS   
  310:  
  311:  /**************************************************************
  312:  *	Function: 	Measure channel energy
  313:  *	Parameters: none
  314:  *	Return:		energy
  315:  **************************************************************/
  316:  __uint8__ PLME_energy_detect (void)
  317:  /* Note: Actual power returned is: -(power/2) */
  318:  /* Global calibration required for accuracy. */
  319:  {

Function: PLME_energy_detect
Source  : D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\Sources\simple_phy.c
Options : -Cs08 -DAXM_0308 -Env"GENPATH=*D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac;D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\target\include;*C:\Program Files\Metrowerks\CW08 V3.1" -Env"LIBPATH=*C:\Program Files\Metrowerks\CW08 V3.1" -Env"OBJPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Env"TEXTPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Lasm=%n.lst -Ms -ObjN="D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\smac_Data\GB60_(EVB_-_rev_A-B-C)\ObjectCode\simple_phy.c.o" -WmsgSd1106 -WmsgSd1420 -WmsgSd1801 -WmsgSd2705 -WmsgSd3303 -WmsgSd4200

  0000 a7fd             AIS   #-3
  320:    __uint16__ reg;
  321:    __uint8__ power;
  322:    rtx_mode = CCA_MODE; /* Write energy detect mode */
  0002 a601             LDA   #1
  0004 c70000           STA   rtx_mode
  323:    reg = drv_read_spi_1(MODE_ADDR);
  0007 a606             LDA   #6
  0009 cd0000           JSR   drv_read_spi_1
  000c 9eff01           STHX  1,SP
  324:    reg &= 0xFFF8;
  000f 95               TSX   
  0010 e601             LDA   1,X
  0012 a4f8             AND   #-8
  0014 e701             STA   1,X
  325:    reg |= CCA_MODE;
  0016 aa01             ORA   #1
  0018 e701             STA   1,X
  326:    drv_write_spi_1(MODE_ADDR, reg);
  001a a606             LDA   #6
  001c 9efe01           LDHX  1,SP
  001f cd0000           JSR   drv_write_spi_1
  327:    AssertRTXEN();
  0022 cd0000           JSR   AssertRTXEN
  328:    while (rtx_mode != IDLE_MODE) /* Wait for energy detect to complete */
  0025 21               SKIP1 L27 ;abs = 0027
  0026          L26:    
  329:    {
  330:  	MCU_LOW_POWER_WHILE;
  0026 8f               WAIT  
  0027          L27:    
  0027 c60000           LDA   rtx_mode
  002a 26fa             BNE   L26 ;abs = 0026
  331:    }
  332:    reg = (drv_read_spi_1(CCA_RESULT_ADDR) & 0xFF00);
  002c a62d             LDA   #45
  002e cd0000           JSR   drv_read_spi_1
  0031 5f               CLRX  
  0032 9eff01           STHX  1,SP
  333:    power = (reg >> 8);
  0035 95               TSX   
  0036 f6               LDA   ,X
  0037 e702             STA   2,X
  334:    return power;
  335:  }
  0039 a703             AIS   #3
  003b 81               RTS   
  336:  
  337:  /**************************************************************
  338:  *	Function: 	Report energy from last successful RX packet
  339:  *	Parameters: none
  340:  *	Return:		energy
  341:  **************************************************************/
  342:  __uint8__ PLME_link_quality (void)
  343:  /* Note: Actual power returned is: -(power/2) */
  344:  /* Global calibration required for accuracy. */
  345:  {

Function: PLME_link_quality
Source  : D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\Sources\simple_phy.c
Options : -Cs08 -DAXM_0308 -Env"GENPATH=*D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac;D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\target\include;*C:\Program Files\Metrowerks\CW08 V3.1" -Env"LIBPATH=*C:\Program Files\Metrowerks\CW08 V3.1" -Env"OBJPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Env"TEXTPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Lasm=%n.lst -Ms -ObjN="D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\smac_Data\GB60_(EVB_-_rev_A-B-C)\ObjectCode\simple_phy.c.o" -WmsgSd1106 -WmsgSd1420 -WmsgSd1801 -WmsgSd2705 -WmsgSd3303 -WmsgSd4200

  0000 a7fe             AIS   #-2
  346:    __uint16__ reg;
  347:    __uint8__ power;
  348:    reg = drv_read_spi_1(CCA_RESULT_ADDR);
  0002 a62d             LDA   #45
  0004 cd0000           JSR   drv_read_spi_1
  0007 9eff01           STHX  1,SP
  349:    power = ((reg & 0xFF00) >> 8);
  000a 95               TSX   
  000b f6               LDA   ,X
  350:    return power;
  351:  }
  000c a702             AIS   #2
  000e 81               RTS   
  352:  
  353:  /**************************************************************
  354:  *	Function: 	Get MC13192 timer value
  355:  *	Parameters: none
  356:  *	Return:		timer value
  357:  **************************************************************/
  358:  __uint32__ PLME_get_time_request(void)
  359:  {

Function: PLME_get_time_request
Source  : D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\Sources\simple_phy.c
Options : -Cs08 -DAXM_0308 -Env"GENPATH=*D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac;D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\target\include;*C:\Program Files\Metrowerks\CW08 V3.1" -Env"LIBPATH=*C:\Program Files\Metrowerks\CW08 V3.1" -Env"OBJPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Env"TEXTPATH=D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\bin" -Lasm=%n.lst -Ms -ObjN="D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\smac_Data\GB60_(EVB_-_rev_A-B-C)\ObjectCode\simple_phy.c.o" -WmsgSd1106 -WmsgSd1420 -WmsgSd1801 -WmsgSd2705 -WmsgSd3303 -WmsgSd4200

  0000 89               PSHX  
  0001 8b               PSHH  
  0002 a7f4             AIS   #-12
  360:  	__uint32__ upperword, lowerword;
  361:  	__uint32__ current_time;
  362:  	upperword = drv_read_spi_1(TIMESTAMP_HI_ADDR);
  0004 a626             LDA   #38
  0006 cd0000           JSR   drv_read_spi_1
  0009 9eff03           STHX  3,SP
  000c 8c               CLRH  
  000d 5f               CLRX  
  000e 9eff01           STHX  1,SP
  363:  	lowerword = drv_read_spi_1(TIMESTAMP_LO_ADDR);
  0011 a627             LDA   #39
  0013 cd0000           JSR   drv_read_spi_1
  0016 9eff07           STHX  7,SP
  0019 8c               CLRH  

⌨️ 快捷键说明

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