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

📄 mcu_hw_config.lst

📁 在飞思卡尔MC9S08GB60单片机环境下实现了无线监控
💻 LST
📖 第 1 页 / 共 2 页
字号:
  000a          LA:     
   94:   while (IRQSC_IRQF == 0) /* Poll waiting for MC13192 to assert the irq (i.e. ATTN). */
  000a 0700fd           BRCLR 3,_IRQSC,LA ;abs = 000a
   95:   {
   96:   }
   97:   drv_read_spi_1(0x24);	/* Clear MC13192 interrupts */
  000d a624             LDA   #36
  000f cd0000           JSR   drv_read_spi_1
   98:   IRQSC |= 0x04;	/* ACK the pending IRQ interrupt */
  0012 1400             BSET  2,_IRQSC
   99:   IRQSC = 0x16; /* Pin Enable, IE, IRQ CLR, negative edge. */
  0014 6e1600           MOV   #22,_IRQSC
  100:  }
  0017 81               RTS   
  101:  
  102:  /**************************************************************
  103:  *	Function: 	Reset (continuous) the MC13192.
  104:  *	Parameters: None
  105:  *	Return:		None
  106:  **************************************************************/
  107:  void MC13192_cont_reset()
  108:  {

Function: MC13192_cont_reset
Source  : D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\Sources\mcu_hw_config.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\mcu_hw_config.c.o" -WmsgSd1106 -WmsgSd1420 -WmsgSd1801 -WmsgSd2705

  109:   rtx_mode = SYSTEM_RESET_MODE;
  0000 a686             LDA   #-122
  0002 c70000           STA   rtx_mode
  110:   IRQSC = 0x00; /* Set for negative edge. */
  0005 3f00             CLR   _IRQSC
  111:   MC13192_RESET = 0; /* Place the MC13192 into reset */
  0007 1f00             BCLR  7,_PTDD
  112:  }
  0009 81               RTS   
  113:  
  114:  /**************************************************************
  115:  *	Function: 	Initialize the MCU COP, GPIO, SPI and IRQ.
  116:  *				Set the desired MC13192 clock frequency here.
  117:  *	Parameters: None
  118:  *	Return:		None
  119:  **************************************************************/
  120:  void mcu_init(void)
  121:  {

Function: mcu_init
Source  : D:\Profiles\flr005\My Documents\Bluetooth Exchange Folder\smac 4_0\CW_IDE_3p1\smac\Sources\mcu_hw_config.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\mcu_hw_config.c.o" -WmsgSd1106 -WmsgSd1420 -WmsgSd1801 -WmsgSd2705

  0000 a7fd             AIS   #-3
  122:  	__uint16__ irq_reg =0;
  123:  	__uint8__ attn_irq = FALSE, timer_hi, timer_lo;
  0002 95               TSX   
  0003 6f02             CLR   2,X
  124:  	
  125:  	SOPT = 0x73;	/* Turn off the watchdog. */	
  0005 a673             LDA   #115
  0007 c70000           STA   _SOPT
  126:  	
  127:  	rtx_mode = RESET_DELAY;
  000a a689             LDA   #-119
  000c c70000           STA   rtx_mode
  128:  	
  129:  	/* Add a delay to debouce the reset switch on development boards ~200ms */
  130:  	TPM1SC = 0x0D;	/* Set the Timer module to use BUSCLK as reference with Prescalar at / 32 */
  000f 6e0d00           MOV   #13,_TPM1SC
  0012          L12:    
  131:  	
  132:  	do 
  133:  	{
  134:  		timer_hi = TPM1CNTH;	/* Get the value of the timer register (hi byte) */
  0012 b600             LDA   _TPM1CNT
  135:  		timer_lo = TPM1CNTL;	/* Get the value of the timer register (lo byte) */
  0014 b601             LDA   _TPM1CNT:1
  136:  	}
  137:  	while (timer_lo <= 0x80); /* Poll for TIMER LO to be greater than 0x80 at 4MHz/32*/
  0016 a180             CMP   #-128
  0018 23f8             BLS   L12 ;abs = 0012
  138:  	
  139:  	TPM1SC = 0x00;	/* Return to reset values */
  001a 3f00             CLR   _TPM1SC
  140:  
  141:   rtx_mode = SYSTEM_RESET_MODE;
  001c a686             LDA   #-122
  001e c70000           STA   rtx_mode
  142:   init_gpio();
  0021 ad00             BSR   init_gpio
  143:   SPI1C1 = 0x50; /* Init SPI */
  0023 6e5000           MOV   #80,_SPI1C1
  144:   SPI1C2 = 0x00;
  0026 3f00             CLR   _SPI1C2
  145:   SPI1BR = 0x00;
  0028 3f00             CLR   _SPI1BR
  146:   IRQSC = 0x14; /* Turn on the IRQ pin. */
  002a 6e1400           MOV   #20,_IRQSC
  147:   rtx_mode = MC13192_RESET_MODE;
  002d a687             LDA   #-121
  002f c70000           STA   rtx_mode
  148:   MC13192_RESET = 1; /* Take MC13192 out of reset */
  0032 1e00             BSET  7,_PTDD
  149:  
  150:    while (attn_irq == FALSE) {
  0034 2021             BRA   L57 ;abs = 0057
  0036          L36:    
  151:    	if (IRQSC_IRQF == 1) { /* Check to see if IRQ is asserted */
  0036 07001e           BRCLR 3,_IRQSC,L57 ;abs = 0057
  152:  			irq_reg = drv_read_spi_1(0x24);	/* Clear MC13192 interrupts and check for ATTN IRQ from 13192*/
  0039 a624             LDA   #36
  003b cd0000           JSR   drv_read_spi_1
  003e 9eff01           STHX  1,SP
  153:  			irq_reg &= 0x400;
  0041 95               TSX   
  0042 6f01             CLR   1,X
  0044 f6               LDA   ,X
  0045 a404             AND   #4
  0047 f7               STA   ,X
  154:  			if (irq_reg == 0)
  0048 9efe01           LDHX  1,SP
  004b 2605             BNE   L52 ;abs = 0052
  155:  				attn_irq = FALSE;
  004d 95               TSX   
  004e 6f02             CLR   2,X
  0050 20e4             BRA   L36 ;abs = 0036
  0052          L52:    
  156:  			else
  157:  				attn_irq = TRUE;
  0052 a601             LDA   #1
  0054 95               TSX   
  0055 e702             STA   2,X
  0057          L57:    
  0057 95               TSX   
  0058 6d02             TST   2,X
  005a 27da             BEQ   L36 ;abs = 0036
  158:  		}
  159:  	}
  160:   IRQSC |= 0x04;	/* ACK the pending IRQ interrupt */
  005c 1400             BSET  2,_IRQSC
  161:   IRQSC = 0x16; /* Pin Enable, IE, IRQ CLR, negative edge. */
  005e 6e1600           MOV   #22,_IRQSC
  162:   rtx_mode = MC13192_CONFIG_MODE;
  0061 a688             LDA   #-120
  0063 c70000           STA   rtx_mode
  163:  }
  0066 a703             AIS   #3
  0068 81               RTS   

⌨️ 快捷键说明

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