• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cifX drivers EtherCAT read/write performance with NetHat over STM32
#21
Thank you for all the information 

I have tested the performance of spi communication through spidev interface using python library 'python3-spidev'
I connected my spi_miso pin to the spi_mosi pin and executed this program:

Code:
import spidev
import time

spi = spidev.SpiDev()
spi.open(0, 0)

to_send = [0xFF] * 32

while True:
    startTime = time.process_time()
    spi.xfer(to_send)
    read = spi.readbytes(32)
    elapsedTime = time.process_time() - startTime
    print(elapsedTime)
    print(str(read))
    
spi.close()

This code measure the time of writing and reading 32 bytes through the spi.
And I obtain results between 640us and 1.3ms

This may explain the bad performance I got with the drivers and nethat, Linux doesn't seem to handle spi very well compared to embedded without linux
I'd be interested to know if spi performance can be improved in Linux if you have any information

Can the NetHAT support spi frequency more than 25 mhz ?
  Reply
#22
Well I am pretty sure that we both can't improve the Linux SPI communication, especailly if the hardware as with Raspberry Pi CPU does not support an SPI interface that includes more hardware support like a DMA controller that is pushing the SPI bytes automatically without a software need. No chance to get it impoved.

The netX chip supports frequencies up to 50 Mhz.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using Powerlink firmware with netHAT and config nxd thp9 3 540 August-25th-2020, 01:49 PM
Last Post: Armin@netPI
  NetHAT SPI configuration thp9 1 776 June-10th-2020, 02:05 PM
Last Post: Armin@netPI
  How can i set a EtherCAT node in netHAT 52-RTE? JGLee 6 932 June-9th-2020, 12:38 PM
Last Post: Armin@netPI
  netHAT as Ethernet/IP Adapter with Codesys lstiegler 11 1,159 May-26th-2020, 06:40 PM
Last Post: Armin@netPI
  netHat configuration via config packets pitau 6 778 May-25th-2020, 02:21 PM
Last Post: Armin@netPI
  NetHAT temperature question thp9 1 721 May-14th-2020, 09:21 PM
Last Post: Armin@netPI
  Ethercat Master TwinCATversion? MGharat 1 179 September-19th-2019, 06:38 AM
Last Post: Armin@netPI
  Using netHAT drivers with custom linux (not Raspbian) FrankS 5 815 September-11th-2019, 06:16 AM
Last Post: Armin@netPI
  Use netPi firmware on netHAT zz_zesys 1 1,042 September-30th-2018, 08:04 PM
Last Post: Armin@netPI
  NetHat Labview richielfc 1 858 August-10th-2018, 12:08 PM
Last Post: Simon@netHAT

Forum Jump:


Users browsing this thread: 1 Guest(s)