June-5th-2020, 09:38 AM
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:
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 ?
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 ?