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.

TMDSECATCNCD379D: Trim Down Delay Within SPI Read/Write Function

Part Number: TMDSECATCNCD379D

Hi there,

We are working with the EtherCAT slave stack code and trying trim down SPI and Sync0 ISR run time. Digging a little deeper we found that SPI read/write (etherCAT_slave_c28x_hal.c ESC_readSPI and ESC_writeSPI) takes up a lot of time. E.g. in ESC_readSPI there are 3 delays, 10, 5 and 2us. 

My question can I cut back these delay? Will there be any adverse effect? (like maybe mixed up bit, incomplete read/write?)

Thanks for reading, any reply is greatly appreciate.

  • Hi

    Inherently, ESC's (ET1100) SPI mode is a slower interface. F28379 MCU example is updated with the necessary delays so that PDI interface works for the example.

    Generally, if you cut the delays, SPI data sequence may not be able to complete the read/write operations. Customers can adjust the reading sequence or delay. But, they have to check, if their system and ESC reading remains reliable. For any specific read timings in SPI (or EMIF) interface mode please refer to ET1100 specification from Beckhoff/ETG.

    Hope this helps

    regards

    Sam

  • Hi again Sam :D

    Thanks for the reply. We had run some tests and turn out it can be chop off quite a lot. The delay in read is now only 7us (original 17us) and 2us for write (original 4us). Is this normal? The comm. seems fine but we get a wired data read out once (the value is slightly lower than what is expected, but not jibblish bits), not sure is it related to SPI.

    I find the SPI timing diagram in ET1100 data sheet. Will read into it when have time. But curious though I always thought SPI is a standard right? So different chip will implement SPI timing differently?

  • HI

    Good to see the improvement in timing. Please checkout all the read and write conditions.

    On SPI standard question. The protocol has not changed, it is the timings that  does not match with old and new technologies devices. We have to match the timings so that the reads are reliable.

    Thanks

    Sam