iMX6ULL I2C使用DMA传输

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

iMX6ULL I2C使用DMA传输

ソリューションへジャンプ
1,245件の閲覧回数
Tamako
Contributor I

Hello,Everyone.

我最近想使用imx6ull实现裸机开发I2C读取MPU6050,并使用DMA方式传输数据。我在官方的I2C寄存器手册里并没有看到关于DMA使能相关的寄存器,但是我在内核中发现了一些与i2c dma相关的函数,例如:

static int i2c_imx_dma_xfer(struct imx_i2c_struct *i2c_imx,
                    struct i2c_msg *msgs)
相关函数定义在i2c-imx.c文件中。并且我在其中发现可能是I2C控制寄存器DMA使能位的宏定义
#define I2CR_DMAEN  0x02,根据这个宏定义我去查看了参考手册,但是手册中的bit[1:0]都是保留位,所以我不清楚如何具体实现裸机IIC使用DMA传输数据(我是菜鸟)。期待大牛们的回答,非常感谢!
ラベル(3)
0 件の賞賛
1 解決策
1,210件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @Tamako,

I hope you are doing well.

There is no support given for using i2c SDMA in i.MX6 series.

One can find the supported SDMA channel usage for different peripherals in the linux reference manual, please refer to that.

https://www.nxp.com/docs/en/reference-manual/IMX_REFERENCE_MANUAL.pdf

Thanks & Regards,
Dhruvit Vasavada

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
1,203件の閲覧回数
Tamako
Contributor I

Hi @Dhruvit 

Thans for your reply.

I have given up this paln before your reply.

Thanks

0 件の賞賛
1,211件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @Tamako,

I hope you are doing well.

There is no support given for using i2c SDMA in i.MX6 series.

One can find the supported SDMA channel usage for different peripherals in the linux reference manual, please refer to that.

https://www.nxp.com/docs/en/reference-manual/IMX_REFERENCE_MANUAL.pdf

Thanks & Regards,
Dhruvit Vasavada

0 件の賞賛
1,168件の閲覧回数
ceggers
Contributor V

There is no support given for using i2c SDMA in i.MX6 series.

That's not fully correct. Some engineers at NXP have developed SDMA support for I2C. These changes are part of SDMA firmware 3.6/4.6 which is available in recent firmware-imx.bin packages (the firmware files in linux-firmware-git are still 3.5/4.5).

Looking around on the internet will find the necessary patches for the Linux I2C driver. Unfortunately these patches have some small bugs and haven't been ported to recent kernels.

I use fixed version of the I2C driver and the a custom SDMA firmware for many months now and think it does what it should. But I haven't tested "advanced" I2C features like bus recovery.

regards,
Christian

0 件の賞賛