This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hey,
I use the TI TMS320F28377SPZ with the c2000 Launchpad XL ver:1.0
The cpu works on 200Mhz, the low speed clk, that goes to the spi, works also on 200Mhz.
I use spi-B to interface with an external adc, the ADS8688 on a custom board. Below is the code to setup the spi-B module:
EALLOW;
//spi-b gpio configuration
// pullup enable
GpioCtrlRegs.GPBPUD.bit.GPIO63 = 0;
GpioCtrlRegs.GPCPUD.bit.GPIO64 = 0;
GpioCtrlRegs.GPCPUD.bit.GPIO65 = 0;
GpioCtrlRegs.GPCPUD.bit.GPIO66 = 0;
// async
GpioCtrlRegs.GPBQSEL2.bit.GPIO63 = 3;
GpioCtrlRegs.GPCQSEL1.bit.GPIO64 = 3;
GpioCtrlRegs.GPCQSEL1.bit.GPIO65 = 3;
GpioCtrlRegs.GPCQSEL1.bit.GPIO66 = 3;
// spi configuration
GpioCtrlRegs.GPBGMUX2.bit.GPIO63 = 3;
GpioCtrlRegs.GPCGMUX1.bit.GPIO64 = 3;
GpioCtrlRegs.GPCGMUX1.bit.GPIO65 = 3;
GpioCtrlRegs.GPCGMUX1.bit.GPIO66 = 3;
GpioCtrlRegs.GPBMUX2.bit.GPIO63 = 3;
GpioCtrlRegs.GPCMUX1.bit.GPIO64 = 3;
GpioCtrlRegs.GPCMUX1.bit.GPIO65 = 3;
GpioCtrlRegs.GPCMUX1.bit.GPIO66 = 3;
EDIS;
//SPI-B
SpibRegs.SPICCR.bit.SPISWRESET = 0;
SpibRegs.SPICCR.bit.HS_MODE = 1;
SpibRegs.SPICCR.bit.SPICHAR = 0xF;
SpibRegs.SPICTL.bit.MASTER_SLAVE = 1;
SpibRegs.SPICTL.bit.TALK = 1;
SpibRegs.SPIBRR.bit.SPI_BIT_RATE = 5;//17;
//fifo
SpibRegs.SPIFFTX.all = 0xE040;
SpibRegs.SPIFFRX.all = 0x2044;
SpibRegs.SPIFFCT.all = 0x0;
SpibRegs.SPICCR.bit.SPISWRESET = 1;
If I check the signal on the scope, there are spurious pulses at the clk line that incorrectly trigger the ADS8688. These signals are visible without connection of the external board as well as on a different Launchpad board. spi-A and spi-C, with the same configuration, doen't show these spikes. Enclosed a figure of the scope:
Only if I reduce the speed, by setting SPI_BIT_RATE to around 100, the spikes disappear. What should I do to establish a reliable connection with the ADS8688?
Thank you for considering this issue,
Tom
Tom,
I have tried out some code on the bench. I see the same thing. At Frequencies faster than ~1.47MHz, these pulses would start to appear even when the SPI is not actively transmitting. I modified my board to tie OE to Ground by removing R2, then wiring the OE pin to the GND side of R31. This resolved the issue.
While this fixes the problem, for now, it does not explain why toggling the level shifter would cause a continuous train of runt pulses. I should note that I also saw it on the SPISIMO pin as well.
I will file a bug on the Launchpad and we will investigate the root cause and fix on the next revision.
Regards,
Mark
(Here is an image of the modification)