• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cifX drivers EtherCAT read/write performance with NetHat over STM32
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:

import spidev
import time

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

to_send = [0xFF] * 32

while True:
    startTime = time.process_time()
    read = spi.readbytes(32)
    elapsedTime = time.process_time() - startTime

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 ?
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)


Possibly Related Threads…
Thread Author Replies Views Last Post
  NetHat + Ethernet/IP + APIs or SDKs michela.limaco 4 1,430 October-11th-2021, 01:05 PM
Last Post: michela.limaco
  Pi + netHAT + NodeRed + EtherCAT effendi 1 1,847 August-19th-2021, 09:52 AM
Last Post: Armin@netPI
  Using Powerlink firmware with netHAT and config nxd thp9 3 4,230 August-25th-2020, 01:49 PM
Last Post: Armin@netPI
  NetHAT SPI configuration thp9 1 3,910 June-10th-2020, 02:05 PM
Last Post: Armin@netPI
  How can i set a EtherCAT node in netHAT 52-RTE? JGLee 6 5,851 June-9th-2020, 12:38 PM
Last Post: Armin@netPI
  netHAT as Ethernet/IP Adapter with Codesys lstiegler 11 7,439 May-26th-2020, 06:40 PM
Last Post: Armin@netPI
  netHat configuration via config packets pitau 6 5,223 May-25th-2020, 02:21 PM
Last Post: Armin@netPI
  NetHAT temperature question thp9 1 4,409 May-14th-2020, 09:21 PM
Last Post: Armin@netPI
  Ethercat Master TwinCATversion? MGharat 1 1,979 September-19th-2019, 06:38 AM
Last Post: Armin@netPI
  Using netHAT drivers with custom linux (not Raspbian) FrankS 5 4,866 September-11th-2019, 06:16 AM
Last Post: Armin@netPI

Forum Jump:

Users browsing this thread: 1 Guest(s)