TI中文支持网
TI专业的中文技术问题搜集分享网站

AM6442: BCDMA数据搬运回写失败

Part Number:AM6442

我这边是想初始化5个BCDMA出来,每次需要用DMA搬运数据的时候会自动调用空闲的一个,现在问题在于在StructDMA.c中,我调用BCDMA_MemoryCopy()搬运数据之后在BCDMA_CheckCopyStatus()里面调用Udma_ringDequeueRaw()检测数据是否搬运完成,完成之后进行CacheP_inv()数据的回写,但是这里如果回写了这个程序就跑乱了,如果这里不调用CacheP_inv()在目标地址&data又看不到更新的数据,怎么弄struct_am64x-evm_r5fss0-0_nortos_ti-arm-clang.rar

Shine:

nub 说:但是这里如果回写了这个程序就跑乱了,如果这里不调用CacheP_inv()

请问跑乱是指程序跑飞了吗?是否有尝试加大堆栈。

如果不调用CacheP_inv, 程序是能正常运行的是么?

,

nub:

我看是程序跑飞了,我这边已经把整个DEMO上传了,您那边能不能试下看下啥问题?

如何加大堆栈?

如果不调用CacheP_inv程序正常的,但是我想要的destbuf不正常,BCDMA最后应该是都需要一个CacheP_inv吧,我看官方例程都是要的

,

Shine:

升级到e2e英文论坛了,让工程师调一下您的代码。请关注下面帖子的回复。https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1308638/am6442-bcdma-cachep_inv-failed

,

nub:

他那边回复了为什么DMA搬运完成之后需要CacheP_inv()。我明白为什么需要CacheP_inv(),现在的问题是我CacheP_inv()之后我的程序跑飞了,麻烦帮忙看下是哪里的问题

,

Shine:

请问在调用CacheP_inv之前,是按照工程师说的步骤配置的吗?

One more thing is that every time we don't need to call trpd_init for triggering dma,. trpd_init should be done only once.

Next, to start dma, use the que_raw function, which is based on the user's requirements for where they need to start dma.

Next, check the deque_raw function status as a completion of dma. After the completion of dma, do cache_inv. This step needs to be done based on how many times the user transfers DMA.

 

,

nub:

是的

,

nub:

能否帮忙再问下英文论坛技术支持帮忙看下

,

Shine:

好的,工程师要花时间调试一下您的代码,请关注帖子的回复。

,

Shine:

抱歉回复晚了。工程师调试了一下您的代码是可以运行的。他想了解DMA要传输多少个bytes? 只传输4 byte? 另外是否使用 NO RTOS or free RTOS?

I have looked at the code, and the customer is trying to do a DMA transfer with the 4 byte?

Is this customer requirement to transfer only 4 bytes ? Can you please confirm how many bytes they need to transfer with the DMA ?

Actually, I have verified from my side, and the code seems to be working, and there is no issue at caheP_Inv.

and we don't need to call the App_udmaTrpdInit function every time, and this should be initiated only once since in the customer use case there is a change in

the source and destination buffer.

If you share above details I can give proper working code .

Is it application on NO RTOS or free RTOS ?

,

nub:

我们做这个DMA主要是为了传输大数据的时候不占用CPU的,4个字节只是测试的时候用的,所以传输的字节数能不能做到是不固定?还有我们是用在free RTOS

,

Shine:

已跟进!

,

Shine:

请看下面e2e工程师的回复。

可以配置传输大量的数据,没有问题。

Yes, users can configure the large number of bytes transferred, and there is no problem.

My suggestion is that if the customer wants to create 5 UDMA channels on RTOS side ,. they can take the below example and add it to more channels in syscfg. One suggestion is that the App_udmaTrpdInit API should be called only once and not every time.

C:\ti\mcu_plus_sdk_am64x_09_00_00_31\examples\drivers\udma\udma_memcpy_interrupt\am64x-evm\r5fss0-0_freertos

Let me know if they need or face any problem after creating the example .

,

nub:

我给您发的就是用mcu_plus_sdk_am64x_09_00_00_31\examples\drivers\udma\udma_memcpy_interrupt\am64x-evm\r5fss0-0_freertos例程改的,因为我不希望是用中断的方式,所以我在main函数这边做了一个状态检测完成之后cache_inv的回写,但是回写之后程序就会跑飞,我希望解决的是这个跑飞的问题,我不太明白为什么工程师让我去跑C:\ti\mcu_plus_sdk_am64x_09_00_00_31\examples\drivers\udma\udma_memcpy_interrupt\am64x-evm\r5fss0-0_freertos这个例程,然后怎么做?

,

Shine:

已跟进!

,

Shine:

工程师运行了您的代码,他那边没有问题,请看下面的回复。

I don't have luck reproducing the issue on my side, and the example is working fine at my side.

I am attaching the example; let me know if I missed anything.

5707.udma_memcpy_interrupt_am64x-evm_r5fss0-0_freertos_ti-arm-clang.zip

,

nub:

我用工程师发过来的确实可以运行,这个问题解决了,感谢您!

,

Shine:

不客气~

非常高兴您的问题解决了,感谢告知!

赞(0)
未经允许不得转载:TI中文支持网 » AM6442: BCDMA数据搬运回写失败
分享到: 更多 (0)