DSP Peripheral Interfaces

USB On the Go


The main communication with the host PC happens through the DSP USB On the Go interface shown above. It is a pretty standard USB OTG setup with only a few things worth pointing out. The biggest standout thing is the TPS2065D load switch connected to VBUS. While I really don’t ever plan on using the DSP as a USB host, let alone a host to a bus powered device, I didn’t want to rule out that possibility. The load switch will allow the DSP to switch in 5V in that circumstance. The buffer U11 is there mainly to take the active low output of the TPS2065D fault pin and translate it to 3.3V to connect to the DSP. I also have it set up to drive a red and green LED on the output so there is a visual confirmation for debug purposes.

When laying out the PCB the USB data line differential pair must be routed with a 90 Ohm differential impedance. The Net class for USB differential pairs is shown below. The impedance calculator on the JLCPCB website was used to determine the trace width and spacing to get 100 Ohm differential impedance on their 6 layer PCB stack up.

 Ethernet


The DSP uses the RMII interface to connect to a 10BASE-T/100BASE-TX PHY for Ethernet connectivity. The PHY itself doesn’t require much external circuitry and the J00-0014NL RJ45 jack contains all the required magnetic components internally. These combined make for a pretty simple circuit only needing power and supporting circuitry.

When laying out the PCB the TX and RX differential pairs must be routed with a 100 Ohm characteristic impedance. The Net Class for these differential pairs is shown below. The impedance calculator on the JLCPCB website was used to determine the trace width and spacing to get 100 Ohm differential impedance on their 6 layer PCB stack up.

 USB to UART interface


The UART0 interface of the DSP is connected to your standard FT232 USB to UART interface IC. Chances are this circuit won’t end up populated on the board since I only really intend to use it for debug purposes or a backup in case the USB OTG doesn’t work. I also included the footprint for a 4 pin header (J2 in the image) so I could use one of those generic USB to UART adapter cables you can find on Amazon. One thing that interests me is that you can boot the DSP from any of the UART interfaces and use AIS files over a PC COM port. To configure the DSP for booting from UART0 the boot mode select pins should be BOOT[7:0] = XXX1 0110. With BOOT[7:5] = 000 the UART peripheral runs at 115.2 kbps.

 RS-485


Due to the nature of this being a motion controller, I wanted some industrial standard interfaces so that in the future I could communicate with other boards that I either made myself or bought off the shelf. Unfortunately the TMS320C6748 does not have a build in CAN Bus interface like most MCUs so the next option on the list was possibly using RS-232. However I didn’t want to end up limited by the data rates associated with it down the line. So I went with what is, in my mind, sort of like RS-232s bigger brother, RS-485. It offers many advantages like 50 Mbps possible data rates, good noise immunity, and cable lengths of 10 meters or more. While looking for RS-485 transceivers I found that Texas Instruments has a line of fully Isolated transceivers that can get up to the max data rates. They are a bit pricey compared to other non isolated options. But really what is more expensive in the long run, a $8 IC with a few extra dollars in supporting circuitry, or blowing up a $20 DSP in a BGA package that would be a pain to replace.

The transceiver gets its isolated 3.3V from a cute little off the shelf isolated DC to DC converter module from CUI.

I have the receive and transmit pins connected to the DSP on UART1 TXD and RXD. If for whatever reason UART doesn’t play nice with RS-485 I can always use the pins as GPIO and bit bang the interface in software. The only other thing to consider is the #CTS and #RTS pins of UART1 are not connected to the interface. #RTS should be fine floating. If I am unable to configure UART1 to ignore the #CTS signal in software I should be able to set the internal pull down resistor on the pin.

I know I said in the first paragraph that there is no CAN Bus interface built into the DSP but I will probably either include the circuitry on some GPIO pins and essentially emulate the interface in software. Or I will use the FPGA to implement a CAN interface and then have it transfer data to the DSP. I may even do both, but I will worry about that at a later time.

 References


User Guides:

  • SPRUFL6F - TMS320C674x/OMAP-L1x Processor External Memory Interface A (EMIFA) Users Guide

Application Reports:

  • SPRACK9 - OMAP-L13x/C674x/AM1x schematic review guidelines

Development Boards:

  • TMDSLCDK6748 - TMS320C6748 DSP Development Kit (LCDK)

  • TMDSOSKL137 - OMAP-L137/TMS320C6747 Floating Point Starter Kit