Hi Everyone,
Once again working on completely completely different but still on OMAP L137.
This time, working on SPI devices, I'm trying to manage up to 8 SPI devices on OMAP L137 with as little CPU involvement as possible.
First, I managed to get one device working without any CPU involvement, only with EDMA. The problem is that SPI delays are too shorts, for example, this device requires 5 micro seconds between transfers. The maximum delay that we can set is (WDELAY + 2) * spi module period. with WDELAY max value 0x3F which limits max delay to 420ns.
I was able to correct this problem by managing chip select by myself and inserting a "dummy" tranfer ... But that makes my code a lot more complicated.
But the problem I have to manage now is way more complicated because the other device I have to work with requires a C2Tdelay greater than 5 micro seconds, C2Tdelay max that we can set is 1 micro sec. The problem is that all delays refer to spi module clock, that can't be changed, can it ? (I mean without changing DSP clock ...).
Is there a way to manage that delay ? All I can think of is using a timer to trigger DMA events or using the PRU, which would be a huge complication !
BR,
Maxime Renaudet.