ΣSigmaStudio Ask AI Русский Log in

BF700 Sport DMA using trigger

Processors & DSP Henrik2021 May 16, 2021 00:00 3 replies Original on forum ↗
Subscribe
Henrik2021 Question
May 16, 2021 00:00

Hi Forum.

I would like to know if the following configuration is possible.

I have an external A/D converter. Data is read through a SPORT. (CLK, FS, MISO, MOSI)

A signal back from the AD connects to a GPIO, and signal whether the AD is converting or not.

Now I want to use this gpio signal trigger a single read on the SPORT.

The tricky part is to read data while this signal is low. This is low for 30-40 SCLK cycles and high for 4 SCLK, and my read shall be started (Framesync low) 3-4 clock cycles after gpio falling edge, and my read will be done before the gpio rising edge.

I was thinking of using a circular DMA on the SPORT, so at any time I could read the current pointer to know which data is the latest. I need to last 8 samples.

Can this configuration be done at all?

Best regards

Henrik

ADIApproved Reply
May 31, 2021 00:00

Hi Henrik,

Why are you using SPORT? ADC can also interface with SPI, refer the below application note from the download link.

www.analog.com/.../EE395v01.pdf
www.analog.com/.../EE395v01.zip

Regards,
Anand Selvaraj.

Henrik2021 Reply
May 31, 2021 00:00

Hi Anard.

Thanks for answering.

Yes SPI can be used, but we are using several serial interfaces in this application and others are using the SPI.

The application works fine with SPORT, and polling, however I would like to speed up things.

The A/D can be set into a autosample mode, where it will make a now conversion every few uSec. It signals a conversion is running and this signal is accessable for the BF.

While a new conversion is underway, the old can be read out through the SPI. It must be read out before the conversion is done.

I cannot use the conversion signal as an interrupt, as I cannot guarantee it can be serviced before the conversion is over.

I would be nice if the input could trigger an event, that would cause the SPORT to read one word, and then wait until next trigger happens.

Is this possible?

Henrik2021 Reply
May 31, 2021 00:00

PS.

As the A/D is running continuesly, a circular DMA must be used. Then its possible to read the DMA counter to see where the latest sample is.

If I read the manual, it seems when the trigger happens, the DMA is started and will continue reading. I need the DMA to only read one single element, and wait for next trigger? Could that be accomplished?