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

📄 mcbspinitial.txt

📁 5402DSP程序设计语言
💻 TXT
字号:
The operation of the McBSP during device reset, transmitter reset, or receiver reset is described in section Resetting the Serial Port. To configure the McBSP for SPI master or slave operation, the following steps must be performed:

1)	Set the transmitter reset bit (XRST_) in serial port control register 2 (SPCR2) to zero, to reset the transmitter. Set the receiver reset bit (RRST_) in serial port control register 1 (SPCR1) to zero, to reset the receiver.

(XRST_=RRST_=0)

2)	Program the McBSP register fields shown in the table called Register Bit Values for SPI Mode Configuration. Also program the register fields shown in the table called Register Bit Values for SPI Slave Operation , or Register Bit Values for SPI Master Operation, depending on whether the McBSP is the master or the slave. All other McBSP register fields can be programmed to their default values.

3)	Set the sample rate generator reset bit (GRST_) in serial port control register 2 (SPCR2) to one, to release the sample rate generator from reset. Note that the value written to SPCR2 should have only the GRST_ bit changed to one, and the remaining bit-fields should have the same values written in Step 2.

(GRST_=1)

4)	Wait for the duration of two sample rate generator clock-periods for the McBSP logic to stabilize.

5)	Depending on whether the CPU or DMA controller services the McBSP transmit and receive buffers, either Step (a) or Step (b) should be performed. If the CPU services the McBSP buffers, Step (a) should be performed, or if the DMA controller services the McBSP buffers, Step (b) should be performed.

a)	CPU services the McBSP buffers. Set the XRST_ and RRST_ bit-fields to one, to enable the transmitter and receiver. Note that the values written to SPCR1 and SPCR2 should have only the reset bits changed to one, and the remaining bit-fields should have the same values written in Step 2.
(XRST_=RRST_=1)  
b)	DMA controller services the McBSP buffers. First, configure the DMA controller and enable the channels that service the McBSP buffers. Then set the XRST_ and RRST_ bit-fields to one, to enable the transmitter and receiver. Note that the values written to SPCR1 and SPCR2 should have only the reset bits changed to one, and the remaining bit- fields should have the same values written in Step 2.

(XRST_=RRST_=1)

6)	Wait for the duration of two sample rate generator clock-periods for the McBSP logic to stabilize.

TMS320C54x Multichannel Buffered Serial Port Help (SPRH066) Copyright

⌨️ 快捷键说明

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