亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? uart.asm

?? DSP 5402 聲音壓縮 Demo板測試程序
?? ASM
?? 第 1 頁 / 共 4 頁
字號:
*****************************************************************
* Filename: uart.asm						*
* Function: Software UART					*
* Author:   Robert J. DeNardo					*
* 	    Texas Instruments, Inc				*
* Revision History:						*
* 11/12/99  Original Code			Robert DeNardo	* 
* 12/21/99  Increased data bits to 1-15.	Robert DeNardo	*
*	    Disabled ints during RxChar & 			*
*	    TxChar. Break routine rewritten.			*
*	    Removed numTxPkts check from TxChar 		*
*	    routine. Removed 'ssbx CPL' in 			*
*	    RxISR. Added latency after McBSP 			*
*	    reset. Disabled DMA chs and McBSP 			*
*	    in Init.  Moved INTOSEL init to Init.		* 
*	    Disable and enable GRST during McBSP		*
*	    reg writes. Removed UART stop and			*
*	    start from SetBaud routine. Fixed 			*
*	    break detect to check stop bit=0 too.		*
*	    Check lower 4 bits of stop bit, not			*
*	    upper.						*
* 1/07/00   Added workaround for 5402 DMA ABU	Robert DeNardo	*
*	    Added (inc/dec)rement option for 			*
*	    DMA pointers.                                      	*
* 09/05/00 Fixed _UARTDMATxISR to conditionally	Robert DeNardo	*
*	    turn off DMA BEFORE calling 			*
*	    _UARTTBEint.  Keeps DMA from turning		*
*	    off too late or from turning off even 		*
*	    if new packet in buffer.				*
*	                                                	*
*								*
* Notes:		                                    	*
* This code implements a software UART using a McBSP and 2 DMA	*
* channels, with the following features:			*
*								*
*   Generation of start and stop bits				*
*   Compile-time selectable data length (1-15 bits)		*
*   Compile-time selectable stop bit length (1, 1.5, 2 bits)	*
*   Compile-time selectable parity (none,even,odd,mark,space)	*
*   Compile- and Run-time selectable baud rate			*
*   Break detection and generation				*
*   Parity detection and generation				*
*   Overrun detection						*
*   Framing error detection					*
*   Double buffered receive and transmit signals		*
*   Routines to transmit and receive characters			*
*   Error condition ISR						*
* 								*
* Parameters:							*
* All parameters which the user can set are defined in the	*
* UARTsetup.inc file.						*
*								*
* Public Routines:						*
* All public routines are C callable.  Routines which the	*
* user may access include:					*
*   _UARTDMARxISR - must be branched to from DMA Rx channel	*
* 		    interrupt vector.				*
*   _UARTDMATxISR - must be branched to from DMA Tx channel	*
*		   interrupt vector.				*
*   _UARTTxChar - transmits a character				*
*   _UARTRxChar - reads last received character			*
*   _UARTStart - starts the UART				*
*   _UARTStop - stops the UART					* 
*   _UARTInit - initializes the McBSP and DMA for the UART	*       
*   _UARTSetBaudRate - changes the baud rate			*
*   _UARTSetBreak - sends a break				*
*                          					*
* If using INTERRUPT_BASED mode, user must define these funcs:	*
*   _UARTLSIint - handles error conditions			*
*   _UARTRBFint - handles received chars			*
*   _UARTTBEint - handles new transmission			* 
*								*
* Public Registers:						*
*   _UARTLSR - contains status bits.  See register definition 	*
* 	       in UARTsetup.inc for bit information.		*
* 								*		
* 								*
* This code uses the DMA ABU mode.  It was tested with an	*
* interface to a PC COM port through an RS232 level shifter.	*
* on a 5410 EVM and 5402 DSK, and with an interface to a 	*
* HW UART.							*	
*								*	 								*
* McBSP is selectable for the interface (default=0)		*
* DMA Channel for Receive is selectable (default=4)       	*
* DMA Channel for Transmit is selectable (default=5)          	*
*								*
* Hardware setup:						*
* Data receive line must be tied to FSR and DR of the McBSP.  	*
* The data transmit line must be tied to the DX pin of the 	*
* McBSP.							*
* 								*
* See the 'Implementing a Software UART on the 			*
* TMS320C54xx Using a McBSP and DMA' Application Note 		*
* for detailed information on how this code works and 		*
* how it can be used (SPRA661).					*
***************************************************************** 
	.version 548
	.mmregs

*********** public routines defined in this file ****************
	.def 	_UARTDMARxISR
	.def 	_UARTDMATxISR 
	.def 	_UARTTxChar
	.def 	_UARTRxChar
	.def 	_UARTStart
	.def	_UARTStop
	.def   	_UARTInit       
	.def	_UARTSetBaudRate    
	.def	_UARTSetBreak
*********** public variables defined in this file ***************
	.def	_UARTLSR                             

***************** Equates used in this file *********************     
; parity choices
NO		.set	0
EVEN		.set	1
ODD		.set	2    
MARK		.set	3
SPACE		.set	4    

; decoder equates
DECODER_MASK	.set	0xF<<6	; only test middle 4 bits of 16 bit word 
MASK1011b	.set	1011b<<6; used to test for a 1 
MASK0100b	.set	0100b<<6; used to test for a 1                     
ONE		.set	1      	; 
STOPBITSHFT	.set	6	; amount to left shift half stop bit before decoding
                                ; puts lower 4 bits into center of 16 bit word
; McBSP register addresses
SPSA0 	.set	38h	; address of McBSP0 subaddress register
DRR10	.set	21h	; address of McBSP0 DRR1 register
DXR10	.set	23h	; address of McBSP0 DXR1 register
SPSA1 	.set	48h	; address of McBSP1 subaddress register
DRR11	.set	41h	; address of McBSP1 DRR1 register
DXR11	.set	43h	; address of McBSP1 DXR1 register
SPSA2 	.set	34h	; address of McBSP2 subaddress register
DRR12	.set	31h	; address of McBSP2 DRR1 register
DXR12	.set	33h	; address of McBSP2 DXR1 register

; offsets for McBSP sub-addressed registers
SPCR1   .set   	0       ; Serial Port Control Register 1
SPCR2   .set   	1	; Serial Port Control Register 2
RCR1    .set   	2	; Receive Control Register 1
RCR2    .set   	3	; Receive Control Register 2
XCR1    .set   	4	; Transmit Control Register 1
XCR2    .set   	5	; Transmit Control Register 2
SRGR1   .set   	6	; Sample Rate Generator Register 1
SRGR2   .set   	7	; Sample Rate Generator Register 2
PCR     .set   	14  	; Pin Control Register

; SPCR1 -- bit definitions                                   
RRST	.set	1<<0	; RRST_ bit

; SPCR2 -- bit definitions                                   
XRST	.set	1<<0	; XRST_ bit mask
XRDY	.set	1<<1	; XRDY bit mask   
GRST	.set	1<<6	; GRST_ bit mask
FRST	.set	1<<7	; FRST_ bit mask       

; Reset Latency -- amount of time needed after McBSP is put in or out of reset
RESET_LATENCY	.set	2*256	; max time is 2 bit clocks for max divisor (256)	
 
; DMA register addresses
DMPREC	.set	54h	; channel PRiority and Enable Control register
DMSA	.set	55h	; Sub-Bank Access Register
DMSDI	.set	56h	; Sub-Bank Access Register with Auto-Increment	
DMSDN	.set	57h	; Sub-Bank Access Register without Auto-Increment	

; offsets for DMA sub-addressed registers
DMSRC0	.set  	0      	; Channel 0 Source Address Register (first reg for ch 0)
DMSRC1 	.set   	5      	; Channel 1 Source Address Register (first reg for ch 1)
DMSRC2 	.set   	10   	; Channel 2 Source Address Register (first reg for ch 2)
DMSRC3 	.set   	15	; Channel 3 Source Address Register (first reg for ch 3)
DMSRC4 	.set   	20	; Channel 4 Source Address Register (first reg for ch 4)
DMSRC5 	.set   	25	; Channel 5 Source Address Register (first reg for ch 5)
    
; DMPREC:DE -- DMA channel enable definitions    
DMAch0 	.set   	1<<0   	
DMAch1 	.set   	1<<1
DMAch2 	.set   	1<<2
DMAch3 	.set   	1<<3
DMAch4 	.set   	1<<4
DMAch5 	.set   	1<<5
                                  
; DMSFC:DSYN -- DMA sync event definitions
REVT0   .set   	0001b  	; McBSP0 receive event
XEVT0   .set   	0010b	; McBSP0 transmit event
REVT2   .set   	0011b	; McBSP2 receive event
XEVT2   .set   	0100b	; McBSP2 transmit event
REVT1   .set   	0101b	; McBSP1 receive event
XEVT1   .set   	0110b	; McBSP1 transmit event  

;IMR/IFR bit definitions
DMAC0int	.set	1<<6
DMAC1int	.set	1<<7
DMAC2int	.set	1<<10
DMAC3int	.set	1<<11
DMAC4int	.set	1<<12
DMAC5int	.set	1<<13

	.copy "UARTsetup.inc" 			; contains USER specifications for UART

***************** Config Error Checking *****************
 .if ((MCBSP_CHOICE>2)|(MCBSP_CHOICE<0))
	.emsg "CONFIG ERROR: MCBSP_CHOICE limited to 0, 1, or 2"
 .endif
 .if ((DMA_RX_CHOICE>5)|(DMA_RX_CHOICE<0))
 	.emsg "CONFIG ERROR: DMA_RX_CHOICE limited to 0-5"
 .endif 			
 .if ((DMA_TX_CHOICE>5)|(DMA_TX_CHOICE<0))
 	.emsg "CONFIG ERROR: DMA_TX_CHOICE limited to 0-5"
 .endif 			
 .if (DMA_RX_CHOICE==DMA_TX_CHOICE)
 	.emsg "CONFIG ERROR: DMA_RX_CHOICE and DMA_TX_CHOICE must be different"
 .endif  
 .if (INTOSEL<0)|(INTOSEL>3)
 	.emsg "CONFIG ERROR: INTOSEL limited to 0-3"
 .endif
 .if (PARITY<NO)|(PARITY>SPACE)
 	.emsg "CONFIG ERROR: PARITY limited to NO, EVEN, ODD, MARK or SPACE"			
 .endif
 .if (PARITY!=NO)&((DATABITS>14)|(DATABITS<1))
  	.emsg "CONFIG ERROR: With PARITY, DATABITS limited to 1-14"
 .endif
 .if (PARITY==NO)&((DATABITS>15)|(DATABITS<1))
  	.emsg "CONFIG ERROR: Without PARITY, DATABITS limited to 1-15"
 .endif
 .if ((HSTOPBITS>4)|(HSTOPBITS<2))
     	.emsg "CONFIG ERROR: HSTOPBITS limited to 2, 3, or 4"
 .endif 
 .if ((DMA_PTR_MOD<0)|(DMA_PTR_MOD>1))
     	.emsg "CONFIG ERROR: DMA_PTR_MOD limited to 0 or 1"
 .endif 
 .if ((DMA_ABU_FIX<0)|(DMA_ABU_FIX>1))
     	.emsg "CONFIG ERROR: DMA_ABU_FIX limited to 0 or 1"
 .endif 
 
**************** Config Determinations ****************** 
 .if PARITY==NO
PARITYBITS	.set	0
 .else
PARITYBITS	.set	1
 .endif

 .if PARITY!=NO           	; set position of calculated parity bit for ParityCalc routine
  .if DATABITS+PARITYBITS>16         		 
PARITYCHECK	.set	1<<31	 	
  .elseif DATABITS+PARITYBITS>8
PARITYCHECK	.set	1<<15	 	
  .elseif DATABITS+PARITYBITS>4
PARITYCHECK	.set	1<<7	 	
  .elseif DATABITS+PARITYBITS>2
PARITYCHECK	.set	1<<3	 	
  .elseif DATABITS+PARITYBITS>1
PARITYCHECK	.set	1<<1	 	
  .endif
 .endif  
  
STARTBITS	.set	1		; always 1 start bit  
RxHSTOPBITS	.set	1		; Receiver only checks first 1/2 stop bit 
TxHSTOPBITS	.set	HSTOPBITS       ; Transmitter sends # half stop bits defined by user
STOPBIT		.set	1<<DATABITS+PARITYBITS	; define the stop bit position
TxPKTBITS	.set	STARTBITS+DATABITS+PARITYBITS+TxHSTOPBITS ; total number of bits in each word
RxPKTBITS	.set	STARTBITS+DATABITS+PARITYBITS+RxHSTOPBITS ; total number of bits in each word
	
 .if MCBSP_CHOICE==0
SPSA	.set	SPSA0
DRR1reg	.set	DRR10   	; need to use 'reg' because DRR1 already defined in .mmregs
DXR1reg	.set	DXR10		; need to use 'reg' because DXR1 already defined in .mmregs
REVT	.set	REVT0 
XEVT	.set	XEVT0  		
 .elseif MCBSP_CHOICE==1
SPSA	.set	SPSA1
DRR1reg	.set	DRR11
DXR1reg	.set	DXR11

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜视频在线观看一区二区三区| 国产乱码精品一区二区三区五月婷| 中文成人综合网| 国产欧美一二三区| 国产欧美日韩在线| 国产精品久久国产精麻豆99网站| 国产精品久久久久久久第一福利| 中文字幕 久热精品 视频在线| 中文字幕国产一区二区| 国产精品午夜免费| 亚洲精品成a人| 亚洲一区欧美一区| 日韩精品一卡二卡三卡四卡无卡| 亚洲h在线观看| 久久精品噜噜噜成人88aⅴ | 成人av网站大全| 成人va在线观看| 91精品福利视频| 欧美一区二区三区在线观看视频| 欧美一级二级三级蜜桃| 337p粉嫩大胆噜噜噜噜噜91av| 久久久久久久综合狠狠综合| 国产精品三级在线观看| 亚洲免费观看高清完整版在线观看熊 | 51精品国自产在线| 欧美tickling网站挠脚心| 久久久久青草大香线综合精品| 国产精品水嫩水嫩| 亚洲综合久久av| 久久电影网站中文字幕| 国产69精品久久99不卡| 在线观看精品一区| 日韩三级中文字幕| 日本一区二区成人在线| 亚洲午夜三级在线| 九九在线精品视频| va亚洲va日韩不卡在线观看| 欧美在线看片a免费观看| 欧美va天堂va视频va在线| 国产精品久久夜| 手机精品视频在线观看| 国产成人精品一区二| 欧美日韩中文国产| 亚洲精品在线观看网站| 亚洲另类一区二区| 精品在线一区二区| 欧美主播一区二区三区| 2020国产精品| 性久久久久久久久| 国产91高潮流白浆在线麻豆| 欧美日韩aaaaa| 国产精品妹子av| 男女视频一区二区| 一本久久精品一区二区| 欧美电影免费观看高清完整版在 | 欧美色爱综合网| 国产精品视频一二三| 日韩av一区二区三区四区| 成人成人成人在线视频| 日韩欧美国产电影| 亚洲午夜日本在线观看| 成人午夜大片免费观看| 日韩亚洲欧美成人一区| 亚洲欧美乱综合| 国产成人在线视频播放| 日韩一级黄色大片| 亚洲激情图片qvod| 成人精品国产一区二区4080| 欧美videos大乳护士334| 亚洲第一精品在线| 99这里都是精品| 久久久精品免费网站| 日韩精品免费专区| 91国偷自产一区二区三区观看| 久久久精品综合| 免费成人你懂的| 欧美日韩一卡二卡| 亚洲精品一卡二卡| 不卡av在线免费观看| 久久久久久久久免费| 日av在线不卡| 欧美另类一区二区三区| 亚洲精品日韩专区silk| 成人av电影在线播放| 久久精品亚洲国产奇米99| 美脚の诱脚舐め脚责91| 51精品视频一区二区三区| 亚洲国产精品久久不卡毛片| 色婷婷av一区二区三区软件| 国产精品嫩草久久久久| 国产高清一区日本| 久久免费偷拍视频| 韩国中文字幕2020精品| 欧美va亚洲va| 久久99蜜桃精品| 欧美大片在线观看一区二区| 日韩高清在线观看| 91麻豆精品国产综合久久久久久| 亚洲高清免费在线| 欧美自拍偷拍午夜视频| 亚洲一区二区三区在线看| 色婷婷综合久久| 一区二区三区中文在线| 在线免费不卡电影| 亚洲国产日韩精品| 欧美日韩日日骚| 视频一区中文字幕国产| 欧美一区二区高清| 麻豆国产欧美一区二区三区| 精品毛片乱码1区2区3区 | 欧美精品日韩一本| 午夜视频一区在线观看| 91精品国产综合久久福利 | 欧美乱妇15p| 日本不卡一区二区| 久久亚洲一区二区三区四区| 狠狠色综合色综合网络| 国产欧美视频一区二区| 不卡视频免费播放| 一区二区三区四区不卡在线| 欧美这里有精品| 日本成人超碰在线观看| 精品999久久久| 成人av资源网站| 亚洲午夜在线电影| 日韩欧美成人激情| 国产成人午夜99999| 亚洲区小说区图片区qvod| 欧美日韩精品综合在线| 久久精品国产亚洲a| 国产亚洲成aⅴ人片在线观看| 成人免费视频视频| 亚洲高清免费一级二级三级| 欧美大片国产精品| eeuss鲁片一区二区三区| 亚洲国产日韩在线一区模特| 精品国产一区二区三区四区四| 国产成人99久久亚洲综合精品| 亚洲视频综合在线| 91精品国产aⅴ一区二区| 国产久卡久卡久卡久卡视频精品| 国产精品成人午夜| 91精品国产综合久久精品性色| 国产一区二区调教| 一区二区三区在线视频观看58| 日韩色视频在线观看| www.一区二区| 日本亚洲最大的色成网站www| 国产日韩综合av| 欧美美女网站色| 成人美女视频在线观看18| 五月婷婷激情综合网| 国产精品免费av| 日韩一本二本av| 在线精品视频免费观看| 国产制服丝袜一区| 亚洲成人av福利| 日本一区二区三区国色天香 | 日韩三级视频在线看| 99精品国产一区二区三区不卡 | 51午夜精品国产| av一区二区三区| 精品一区二区三区免费观看 | 色综合天天综合网国产成人综合天 | 国产亚洲欧洲997久久综合| 91国偷自产一区二区三区成为亚洲经典 | 亚洲丝袜自拍清纯另类| 亚洲精品在线电影| 欧美日韩一区二区欧美激情| 国产成人av一区| 久久精品国产一区二区| 亚洲成va人在线观看| 国产精品免费视频一区| 精品三级在线看| 7777精品伊人久久久大香线蕉 | 精品国产乱码久久久久久久| 色久优优欧美色久优优| 国产激情91久久精品导航| 男男gaygay亚洲| 亚洲va中文字幕| 亚洲欧美成人一区二区三区| 国产欧美日韩麻豆91| 欧美r级电影在线观看| 欧美军同video69gay| 欧美在线免费观看亚洲| 99国产欧美久久久精品| 国产精品一二三四五| 麻豆传媒一区二区三区| 日韩国产在线一| 午夜伊人狠狠久久| 亚洲综合网站在线观看| 综合中文字幕亚洲| 中文字幕在线不卡视频| 国产日产欧美一区二区三区| 精品久久久网站| 精品日韩一区二区三区 | 日本亚洲天堂网| 午夜国产精品影院在线观看| 亚洲一区二区中文在线| 亚洲精品乱码久久久久久黑人|