AnsweredAssumed Answered

Generate an external timer synchronized with SPORT RFS signal

Question asked by dperez on Nov 15, 2010
Latest reply on Nov 23, 2010 by Prashant

I have been trying to generate with a Blackfin 527 an interface for a ADC part  which uses a 12 bit SPI + a conversion signal. What I have done is to combine the SPORT interface with a timer which generate the nCNVST signal.


At the moment, I have implemented the interface using a combination of a timer plus SPORT SSL. The way we have done it is not too predictable and clean. It works by adding some delays (depending on RSCLK and RFS) to be able to synchronize the timer and the RFS. The program flow is detailed before.


  1. Configure the SPORT.
  2. Enable Dataflow.
  3. Wait: while(*pSPORT0_STAT != 0x0008){;} 
  4. Generate a delay considering a predictable timing since “the dataflow is enabled” until the SPORT Tx Register is full and ready to transmit (but obviously it varies depending on clock and frame rate)
  5. Generate a timer (nCNVST synchronized with RFS).


The problem that we are having here is that the process of enabling the dataflow takes more or less time depending on the serial clock, so it is difficult to write a generic code to synchronize the interface independently of RSCLK and RFS used. At the moment is just a customization for higher frequencies. To higher frequencies don’t seem to be very predictable.


I was wondering if there is a way to synchronize a timer with the RFS or internal register I can trigger. I would need just a starting and predictable point as a reference. I was trying interrupts but obviously it gets impossible with the usage of ssl and how it manages DMA channels and generate interrupts in lower layers.


Hopefully, you aren’t too lost at this stage and can understand what is the situation.


Any idea or suggestion would be appreciated.