TMS320x2834x Delfino Serial Peripheral Interface Reference .

3y ago
42 Views
2 Downloads
334.07 KB
41 Pages
Last View : 2d ago
Last Download : 3m ago
Upload by : Madison Stoltz
Transcription

TMS320x2834x Delfino Serial PeripheralInterface (SPI)Reference GuideLiterature Number: SRUG73March 2009

2SRUG73 – March 2009Submit Documentation Feedback

ContentsPreface . 711.11.21.31.41.5. 11Enhanced SPI Module Overview . 121.1.1 SPI Block Diagram . 141.1.2 SPI Module Signal Summary . 15Overview of SPI Module Registers . 15SPI Operation . 161.3.1 Introduction to Operation . 161.3.2 SPI Module Slave and Master Operation Modes . 17SPI Interrupts . 181.4.1 SPI Interrupt Control Bits . 181.4.2 Data Format . 191.4.3 Baud Rate and Clocking Schemes . 201.4.4 Initialization Upon Reset. 221.4.5 Data Transfer Example . 22SPI FIFO Description . 231.5.1 SPI Interrupts . 24Serial Peripheral Interface (SPI). 272SPI Registers and Waveforms2.1SPI Control Registers . 282.2.2.1.3 SPI Status Register (SPIST) .2.1.4 SPI Baud Rate Register (SPIBRR) .2.1.5 SPI Emulation Buffer Register (SPIRXEMU) .2.1.6 SPI Serial Receive Buffer Register (SPIRXBUF) .2.1.7 SPI Serial Transmit Buffer Register (SPITXBUF) .2.1.8 SPI Serial Data Register (SPIDAT) .2.1.9 SPI FIFO Transmit, Receive, and Control Registers .2.1.10 SPI Priority Control Register (SPIPRI) .SPI Example Waveforms .2.1.1SPI Configuration Control Register (SPICCR)282.1.2SPI Operation Control Register (SPICTL)29SRUG73 – March 2009Submit Documentation FeedbackContents3031313232333437373

www.ti.comList of -82-92-102-112-122-132-142-152-162-174SPI CPU Interface .Serial Peripheral Interface Module Block Diagram .SPI Master/Slave Connection .SPICLK Signal Options .SPI: SPICLK-CLKOUT Characteristic When (BRR 1) is Odd, BRR 3, and CLOCK POLARITY 1 .Five Bits per Character .SPI FIFO Interrupt Flags and Enable Logic Generation .SPI Configuration Control Register (SPICCR) — Address 7040h .SPI Operation Control Register (SPICTL) — Address 7041h .SPI Status Register (SPIST) — Address 7042h .SPI Baud Rate Register (SPIBRR) — Address 7044h .SPI Emulation Buffer Register (SPIRXEMU) — Address 7046h.SPI Serial Receive Buffer Register (SPIRXBUF) — Address 7047h .SPI Serial Transmit Buffer Register (SPITXBUF) — Address 7048h .SPI Serial Data Register (SPIDAT) — Address 7049h .SPI FIFO Transmit (SPIFFTX) Register – Address 704Ah .SPI FIFO Receive (SPIFFRX) Register – Address 704Bh .SPI FIFO Control (SPIFFCT) Register – Address 704Ch .CLOCK POLARITY 0, CLOCK PHASE 0 (All data transitions are during the rising edge, non-delayedclock. Inactive level is low.) .CLOCK POLARITY 0, CLOCK PHASE 1 (All data transitions are during the rising edge, but delayedby half clock cycle. Inactive level is low.) .CLOCK POLARITY 1, CLOCK PHASE 0 (All data transitions are during the falling edge. Inactivelevel is high.) .CLOCK POLARITY 1, CLOCK PHASE 1 (All data transitions are during the falling edge, but delayedby half clock cycle. Inactive level is high.) .SPISTE Behavior in Master Mode (Master lowers SPISTE during the entire 16 bits of transmission.) .SPISTE Behavior in Slave Mode (Slave’s SPISTE is lowered during the entire 16 bits of transmission.) .List of 93940SRUG73 – March 2009Submit Documentation Feedback

www.ti.comList of -112-122-13SPI Module Signal Summary .SPI Registers .SPI Clocking Scheme Selection Guide .SPI Interrupt Flag Modes .SPI Configuration Control Register (SPICCR) Field Descriptions .Character Length Control Bit Values .SPI Operation Control Register (SPICTL) Field Descriptions .SPI Status Register (SPIST) Field Descriptions .Field Descriptions .SPI Emulation Buffer Register (SPIRXEMU) Field Descriptions .SPI Serial Receive Buffer Register (SPIRXBUF) Field Descriptions .SPI Serial Transmit Buffer Register (SPITXBUF) Field Descriptions .SPI Serial Data Register (SPIDAT) Field Descriptions .SPI FIFO Transmit (SPIFFTX) Register Field Descriptions .SPI FIFO Receive (SPIFFRX) Register Field Descriptions .SPI FIFO Control (SPIFFCT) Register Field Descriptions .SPI Priority Control Register (SPIPRI) Field Descriptions .SRUG73 – March 2009Submit Documentation FeedbackList of Tables15152124282929303132323333343536375

6List of TablesSRUG73 – March 2009Submit Documentation Feedback

PrefaceSRUG73 – March 2009This guide describes how the serial peripheral interface works on the TMS320x2834x Delfino device.About This ManualThe SPI module described in this reference guide is a Type 0 SPI. See the TMS320x28xx, 28xxx DSPPeripheral Reference Guide (SPRU566) for a list of all devices with an SPI module of the same type, todetermine the differences between types, and for a list of device-specific differences within a type.Related Documentation From Texas InstrumentsThe following books describe the TMS320x2834x Delfino devices and related support tools that areavailable on the TI websiteData Manual—SPRS516— TMS320C28346, TMS320C28345, TMS320C28344, TMS320C28343, TMS320C28342,TMS320C28341 Delfino Microcontrollers Data Manual. This document contains the pinout,signal descriptions, as well as electrical and timing specifications for the C2834x devices.SPRZ267— TMS320C2834x Delfino MCU Silicon Errata. This document describes the advisories andusage notes for different versions of silicon.CPU User's Guides—SPRU430— TMS320C28x DSP CPU and Instruction Set Reference Guide. This document describesthe central processing unit (CPU) and the assembly language instructions of the TMS320C28xfixed-point digital signal processors (DSPs). It also describes emulation features available on theseDSPs.SPRUEO2— TMS320C28x Floating Point Unit and Instruction Set Reference Guide. This documentdescribes the floating-point unit and includes the instructions for the FPU.Peripheral Guides—SPRU566— TMS320x28xx, 28xxx DSP Peripheral Reference Guide. This document describes theperipheral reference guides of the 28x digital signal processors (DSPs).SPRUFN1— TMS320x2834x Delfino System Control and Interrupts Reference Guide. This documentdescribes the various interrupts and system control features of the x2834x microcontroller (MCUs).SPRUFN4— TMS320x2834x Delfino External Interface (XINTF) Reference Guide. This documentdescribes the XINTF, which is a nonmultiplexed asynchronous bus, as it is used on the x2834xdevice.SPRUFN5— TMS320x2834x Delfino Boot ROM Reference Guide. This document describes thepurpose and features of the bootloader (factory-programmed boot-loading software) and providesexamples of code. It also describes other contents of the device on-chip boot ROM and identifieswhere all of the information is located within that memory.SPRUG80— TMS320x2834x Delfino Multichannel Buffered Serial Port (McBSP) Reference Guide.This document describes the McBSP available on the x2834x devices. The McBSPs allow directinterface between a microcontroller (MCU) and other devices in a system.SPRUG78— TMS320x2834x Delfino Direct Memory Access (DMA) Reference Guide. This documentdescribes the DMA on the x2834x microcontroller (MCUs).SRUG73 – March 2009Submit Documentation Feedback7

Related Documentation From Texas Instrumentswww.ti.comSPRUFZ6— TMS320x2834x Delfino Enhanced Pulse Width Modulator (ePWM) Module ReferenceGuide. This document describes the main areas of the enhanced pulse width modulator thatinclude digital motor control, switch mode power supply control, UPS (uninterruptible powersupplies), and other forms of power conversion.SPRUG77— TMS320x2834x Delfino High-Resolution Pulse Width Modulator (HRPWM) ReferenceGuide. This document describes the operation of the high-resolution extension to the pulse widthmodulator (HRPWM).SPRUG79— TMS320x2834x Delfino Enhanced Capture (eCAP) Module Reference Guide. Thisdocument describes the enhanced capture module. It includes the module description andregisters.SPRUG74— TMS320x2834x Delfino Enhanced Quadrature Encoder Pulse (eQEP) ModuleReference Guide. This document describes the eQEP module, which is used for interfacing with alinear or rotary incremental encoder to get position, direction, and speed information from a rotatingmachine in high performance motion and position control systems. It includes the moduledescription and registers.SPRUEU4— TMS320x2834x Delfino Enhanced Controller Area Network (eCAN) Reference Guide.This document describes the eCAN that uses established protocol to communicate serially withother controllers in electrically noisy environments.SPRUG75— TMS320x2834x Delfino Serial Communication Interface (SCI) Reference Guide. Thisdocument describes the SCI, which is a two-wire asynchronous serial port, commonly known as aUART. The SCI modules support digital communications between the CPU and other asynchronousperipherals that use the standard non-return-to-zero (NRZ) format.SPRUG73— TMS320x2834x Delfino Serial Peripheral Interface (SPI) Reference Guide. Thisdocument describes the SPI - a high-speed synchronous serial input/output (I/O) port - that allows aserial bit stream of programmed length (one to sixteen bits) to be shifted into and out of the deviceat a programmed bit-transfer rate.SPRUG76— TMS320x2834x Delfino Inter-Integrated Circuit (I2C) Reference Guide. This documentdescribes the features and operation of the inter-integrated circuit (I2C) module.Tools Guides—SPRU513— TMS320C28x Assembly Language Tools User's Guide. This document describes theassembly language tools (assembler and other tools used to develop assembly language code),assembler directives, macros, common object file format, and symbolic debugging directives for theTMS320C28x device.SPRU514— TMS320C28x Optimizing C Compiler User's Guide. This document describes theTMS320C28x C/C compiler. This compiler accepts ANSI standard C/C source code andproduces TMS320 DSP assembly language source code for the TMS320C28x device.SPRU608— The TMS320C28x Instruction Set Simulator Technical Overview. This documentdescribes the simulator, available within the Code Composer Studio for TMS320C2000 IDE, thatsimulates the instruction set of the C28x core.SPRU625— TMS320C28x DSP/BIOS Application Programming Interface (API) Reference Guide.This document describes development using DSP/BIOS.Application Reports—SPRAB26— TMS320x2833x/2823x to TMS320x2834x Delfino Migration Overview. This applicationreport describes differences between the Texas Instruments TMS320x2833x/2823x and theTMS320x2834x devices to assist in application migration.8SRUG73 – March 2009Submit Documentation Feedback

www.ti.comTrademarksTrademarksCode Composer Studio and C28x are trademarks of Texas Instruments.SRUG73 – March 2009Submit Documentation Feedback9

10SRUG73 – March 2009Submit Documentation Feedback

Chapter 1SRUG73 – March 2009Serial Peripheral Interface (SPI)The serial peripheral interface (SPI) is a high-speed synchronous serial input/ output (I/O) port that allowsa serial bit stream of programmed length (one to sixteen bits) to be shifted into and out of the device at aprogrammed bit-transfer rate. The SPI is normally used for communications between the DSP controllerand external peripherals or another controller. Typical applications include external I/O or peripheralexpansion via devices such as shift registers, display drivers, and analog-to-digital converters (ADCs).Multidevice communications are supported by the master/slave operation of the SPI. On the C28x , theport supports a 16-level, receive and transmit FIFO for reducing CPU servicing overhead.This reference guide is applicable for the SPI found on TMS320x2834x families of processors. Thisincludes all Flash-based, ROM-based and RAM-based devices within these families.Note:The 28x SPI features several enhancements compared to the 240xA SPI. See section 1.5 fora description of these features.Topic1.11.21.31.41.5.Enhanced SPI Module Overview .Overview of SPI Module Registers .SPI Operation .SPI Interrupts .SPI FIFO Description .SRUG73 – March 2009Submit Documentation FeedbackPage1215161823Serial Peripheral Interface (SPI)11

Enhanced SPI Module Overview1.1www.ti.comEnhanced SPI Module OverviewFigure 1-1 shows the SPI CPU interfaces.Figure 1-1. SPI CPU InterfaceSystemcontrolblockLow MUXSPISPICLKSPISTERegistersSPISOMIPeripheral BusSPISIMOSPIINT/RXINTTXINTPIEblockThe SPI module features include: SPISOMI: SPI slave-output/master-input pin SPISIMO: SPI slave-input/master-output pin SPISTE: SPI slave transmit-enable pin SPICLK: SPI serial-clock pinNote: 12All four pins can be used as GPIO, if the SPI module is not used.Two operational modes: master and slaveBaud rate: 125 different programmable rates. The maximum baud rate that can be employed is limitedby the maximum speed of the I/O buffers used on the SPI pins. See the device-specific data sheet formore details.Data word length: one to sixteen data bitsFour clocking schemes (controlled by clock polarity and clock phase bits) include:– Falling edge without phase delay: SPICLK active-high. SPI transmits data on the falling edge of theSPICLK signal and receives data on the rising edge of the SPICLK signal.– Falling edge with phase delay: SPICLK active-high. SPI transmits data one half-cycle ahead of thefalling edge of the SPICLK signal and receives data on the falling edge of the SPICLK signal.– Rising edge without phase delay: SPICLK inactive-low. SPI transmits data on the rising edge of theSPICLK signal and receives data on the falling edge of the SPICLK signal.– Rising edge with phase delay: SPICLK inactive-low. SPI transmits data one half-cycle ahead of thefalling edge of the SPICLK signal and receives data on the rising edge of the SPICLK signal.Simultaneous receive and transmit operation (transmit function can be disabled in software)Transmitter and receiver operations are accomplished through either interrupt- driven or polledalgorithms.Serial Peripheral Interface (SPI)SRUG73 – March 2009Submit Documentation Feedback

Enhanced SPI Module Overviewwww.ti.com 12 SPI module control registers: Located in control register frame beginning at address 7040h.Note:All registers in this module are 16-bit registers that are connected to Peripheral Frame 2.When a register is accessed, the register data is in the lower byte (7–0), and the upper byte(15–8) is read as zeros. Writing to the upper byte has no effect.Enhanced Feature: 16-level t

This guide describes how the serial peripheral interface works on the TMS320x2834x Delfino device. About This Manual The SPI module described in this reference guide is a Type 0 SPI. See the TMS320x28xx, 28xxx DSP Peripheral Reference Guide (SPRU566) for a list of all devices with an SPI module of the same type, to

Related Documents:

The SPI (serial peripheral interface) is a type of serial communication protocol that transfers synchronous serial data in full duplex mode. There are two modes of communications in SPI viz., master and slave. While the master device generates serial clock, the slave devices are allowed with individual slave select lines and the whole

The Delfino TMS320F2837xD is a powerful 32-bit floating-point microcontroller unit (MCU) designed for . independent 32-bit floating-point processor that runs at the same speed as the main CPU. The CLA responds to peripheral triggers and executes code concurrently with the main C28x CPU. This parallel

2. Quad Serial Peripheral Interface The Quad Serial Peripheral Interface (QuadSPI) block acts as an interface to one single or two external serial flash devices, each with up to eight bi-directional data lines. It supp

Camera Serial Interface PTP: Precision Time Protocol PWM: Pulse Width Modulation I²C Bus: Inter-Integrated Circuit Bus SPI: Serial Peripheral Interface eSPI: Enhanced Serial Peripheral Interface JTAG: Joint Test Action Group GbE: Gigabit Ethernet LVDS: Low-Voltage Differential Signaling DDC: Display Data Channel N.C.

1 TXD O (1) Serial port (Transmitted Data) 2 DTR_N O (1) Serial port (Data Terminal Ready) 3 RTS_N O (1) Serial port (Request To Send) 4 VDD_325 P RS232 VDD. The power pins for the serial port signals. When the serial port is 3.3V, this should be 3.3V. When the serial port is 2.5V, this should be 2.5V. 5 RXD I (2) Serial port (Received Data)

1. Synchronous Serial Port Interface (SPI) Setup Synchronous serial communication between processors is possible using the Synchronous Serial Peripheral Interface (SPI0) port on the 8051. Synchronous, or separately clocked, serial connections can communic

March 21 DeltaV Distributed Control System Product Data Sheet M-series Serial Interface Series 2 The DeltaV Serial Interface provides a connection between the DeltaV system and other devices. Provides seamless information interface Plug-and-play ease of use Extends the life of existing equipment 1:1 redundancy for Serial Interface I/O cards

2.1 ASTM Standards:2 C165 Test Method for Measuring Compressive Properties of Thermal Insulations C167 Test Methods for Thickness and Density of Blanket or Batt Thermal Insulations C168 Terminology Relating to Thermal Insulation C177 Test Method for Steady-State Heat Flux Measure-ments and Thermal Transmission Properties by Means of the Guarded-Hot-Plate Apparatus C303 Test Method for .