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.

TMS570LS3137: use of het pin as external clock source for mibspi1 in slave mode

Part Number: TMS570LS3137
Other Parts Discussed in Thread: MOTORWARE,

hi,

I programmed het to prodeuce 1.25 mhz clock on pin 13(by het.ide), in slave mode, can I physically connect this pin to mibspi clock input?

  • Hello,
    Please give us more info about your hardware setup.

    Best regards,
    MIro
  • Hi Miro,

    Thanks for your response. My program reads data from a poition encoder with BİSS protocol interface. As I had written before, Clock required in BİSS protocol is produce by het. When encoder receives this clock, it sends instantaneous position data. I use mibspi1 and everything is ok, but I programmed mibspi1 in master mode to produce internal clocks only for receiving data, and SPICLK pin is not used phisically. In order to improve program performance I want to use salve mode with my het clock for receiving data also. So if, het pin can be assigned as external clock source, there would be no need to set mibspi in master mode, and only one clock source can give service, both to encoder and mibspi receive mechanism. All these are inserted in motorware program, but when SPICLK is used as clock source, BLDC begins to vibrating and I couldn’t find the reason (may be a hardware problem), but CLOCK produced by het with the same frequency as mibspi clock (1.25Mhz) works very well and there is no vibration.

    biss-interface.com/.../

    Best Regards

    Ali Riza

  • Hello Ali Riza,
    When SPI is in slave mode, the clock is always from the external device. I think your use case could be achieved in Three-Pin Mode.

    The following is from TMS570LS3137 datasheet Section 25.2.2.3 :
    "In slave mode configuration (MASTER = 0 and CLKMOD = 0), data shifts out on the SPISOMI pin and in on the SPISIMO pin. The SPICLK pin is used as the input for the serial shift clock, which is supplied from the external network master. The transfer rate is defined by this clock.
    Data written to the SPIDAT0 or SPIDAT1 register is transmitted to the network when the SPICLK signal is received from the network master. To receive data, the SPI waits for the network master to send the SPICLK signal and then shifts data on the SPISIMO pin into the RX shift register. If data is to be transmitted by the slave simultaneously, it must be written to the SPIDAT0 or SPIDAT1 register before the beginning of the SPICLK signal."

    Best regards,
    Miro
  • Hi Miro,

    Thanks very much for your help. I'll implement 3-pin mode as you suggested in slave mode and write you the results.

    My Best Regards

  • Hello,
    I am closing this thread for now. But please share your results when you have some.

    Best regards,
    Miro