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.

TMS320F2806: SPI lost datas when read position and angular datas from ADS1205

Part Number: TMS320F2806
Other Parts Discussed in Thread: ADS1205

In motor Control, use spi to read position and angular datas from ADS1205.

While motor rotating, there always be a little shake. I captured the waveform when an error occurs.

The position datas will be lost in two cycles, while there is no SPICLK signal.

I tried to change baudrate from 9M to 7M, and error still occurs.

And if motor stopped, this error will never occur.

Why could this happen? And how to deal with it.

  • Is the SPI read/write executed in a timer interrupt or in background loop? Is the SPI operation missing since the motor control has the highest priority that occupies too much CPU bandwidth?

    It seems like there is no clock on SPI also when the position data is lost, you might check if the SPI is continuously enabled as you wanted.

  • The SPI is executed in ADC interrupt, and the ADC triggered by PWM.

    The SPI is continuously enabled since DSP initialized.

    Motor control occupies 40us, PWM period is 100us.

  • Hi,

    Is your motor control loop still operating during the SPI failure? If the SPI activity is just triggered by the CPU in the ADC interrupt, I would suspect that the ADC interrupt is not even occurring. Can you confirm this?
    Are there any conditions that might make this occur more or less? You said that when the motor is stopped, there is no issue, but how about low speeds? High speeds?

    Regards,
    Mark
  • Hi,

    Are you are you still experiencing this issue?

    Please respond to my previous questions so that we can continue the debug process.

    Thanks,
    Mark
  • Hi, its been about a week since my last request for information. I am going to close this thread. If you have additional information or questions, please reply here. If the thread locks, please use the +Ask a related question button to create a new thread.

    Regards,
    Mark