2021-11-19 03:17 AM
Hello ST People !
I'm looking for information / possiblity to use SPI (via spidev & ioctl) in Linux user space with DMA.
We have to transfert lots of data (4000bytes at one time, very very often) to a fpga, very quickly and we are facing latency issue during transfert.
With the help of a scope, we see dead times between spi transactions during this big packet write.
So we are thinking using spi dma to unload cpu, but we need some infos/direction to look for.
Maybe someone help or points me to right direction?
Bon weekend!
Solved! Go to Solution.
2021-12-02 12:52 AM
Well, after a little struggling
With the help of:
https://wiki.st.com/stm32mpu/wiki/SPI_overview
We added kernel debug info and we happy to see:
"dma enabled" in the log file.
so with some modification of calling function (ioctl) we've been able to have a 12Mhz SPI working @ 12Mbits /s
Next phase, modify the clk!
Seeya!
2021-11-24 05:47 AM
After looking at:
https://github.com/torvalds/linux/blob/master/drivers/spi/spi-stm32.c
If I "lsmod" on my board, I see that "spi_stm32" is in the lsmod list.
So If I understand correctly,
If I made call to ioctl (with /dev/spidev0.0 as parameter)
the ioctl function will use the "spi_stm32" driver mod? Thats it?
How do we know if we already or not using dma?
(we have dts enabled dma for spi tree)
2021-12-02 12:52 AM
Well, after a little struggling
With the help of:
https://wiki.st.com/stm32mpu/wiki/SPI_overview
We added kernel debug info and we happy to see:
"dma enabled" in the log file.
so with some modification of calling function (ioctl) we've been able to have a 12Mhz SPI working @ 12Mbits /s
Next phase, modify the clk!
Seeya!