This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SPI delays too shorts - OMAP L137

Other Parts Discussed in Thread: OMAP-L137

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.

  • Maxime Renaudet said:
    The problem is that all delays refer to spi module clock, that can't be changed, can it ? (I mean without changing DSP clock ...).

    Clock input to SPI module cannot be changed without changing the overall clocking dividers in the PLL Controller. The ARM/DSP are based on SYSCLK1, however the SPI module should be clocked based off a derivative of SYSCLK1. Please refer to the PLL Controller in the OMAP-L137 System Reference Guide for Details.