i.MX6 DMA and ADC

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX6 DMA and ADC

1,538 Views
Contributor II

We are using i.MX6UL processor and we need to have fast sapling of one ADC channel.

Since driver is not supporting DMA transfer vf60_adc, my idea was to implement IIO buffer and Dmaengine into the driver.

SDMA is responsigle for communication between memory and peripherals, but I never saw that DMA was used for ADC transfer.

Does sdma-imx6q.bin (script) supports this type of transfer or additional script should be written?

From device tree documentation, I think that this is not possible:

Linux/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt - Linux Cross Reference - Free Electron... 

In case that is necessary to write new script, is there a free version of CodeWarrior and source code of dma-imx6q.bin binary?

p.s. I found some similar questions regardins SDMA:

Custom SDMA script to convert bayer image 

Tags (1)
0 Kudos
5 Replies

24 Views
NXP TechSupport
NXP TechSupport

Hi Strahinja

you are right, linux sdma supports limited number peripherals which are described on linux documentation on

http://www.nxp.com/products/software-and-tools/software-development-tools/i.mx-software-and-tools/i....

General approach for writing new script and adding sdma support for new peripheral is using Professional Services:

http://www.nxp.com/support/nxp-professional-services:PROFESSIONAL-SERVICE

Unfortunately source code of dma-imx6q.bin is not available, sorry.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

24 Views
Contributor II

Hello Igor

since you confirmed that SDMA can`t perform ADC transfer, is it possible to do this using APBH-Bridge-DMA?

I know that this DMA is used for NAND, but for what other peripherals can be used? In reference maunal is written "memory-mapped I/O to the APB device", but I am not certain what that means. Can you clarify this for me?

Best regards

Strahinja

0 Kudos

24 Views
NXP TechSupport
NXP TechSupport

Hi Strahinja

I am afraid it can not be used. SDMA works with particular

module on specific bus (to which that peripheral connected), one

can look at Figure 43-1. SDMA Block Diagram i.MX6UL Reference Manual

http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6ULRM.pdf

Very simplified, there are three buses: spba, burst dma, peripheral dma,

which have some number of connected peripherals. Each group is handled

by own script. Better sdma description is given in Table A-1. SDMA Scripts Overview

i.MX53 RM, so one can find for example two uart different scripts: Shared UART and UART.

One is connected on spba, other on peripheral dma. NAND is connected to own APBH-Bridge-DMA bus.

Also may be useful to check

Freescale i.MX SDMA tutorial (part I) 

Best regards
igor

24 Views
Contributor II

Hello Igor,

since our main goal is to have fast sampling, we can maybe use external ADC with SPI interface.

Problem is that from i.MX6UL and i.MX53 RM I don´t see that SDMA has a support for SPI.

From the other hand in Linux device tree documentation is written CSPI support (ID 7 and 8):

Linux/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt - Linux Cross Reference - Free Electron... 

So I am confused, does current bin support SPI or not?

Best regards

Strahinja

0 Kudos

24 Views
NXP TechSupport
NXP TechSupport

Hi Strahinja

for i.mx there are many bsps, please check for example

https://community.freescale.com/message/402940#402940

official nxp releases do not support spi sdma, please check 

Linux Manual Chapter 4 Smart Direct Memory Access (SDMA)

included in doc package on link

i.MX 6 / i.MX 7 Series Software and Development Tool|NXP 

Best regards
igor