CYT4BB单片机DMA不能传输却异常进入DMA中断

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ee1
Level 2
Level 2
5 questions asked 5 replies posted 5 sign-ins

ee1_0-1706927892371.png

代码如下,DMA不能传输数据,却在软件触发一瞬间就进入中断,且不能再次进入中断

0 点赞
1 解答
ee1
Level 2
Level 2
5 questions asked 5 replies posted 5 sign-ins

我发现问题了,将cache关闭就可以了。但这会影响其性能

在原帖中查看解决方案

0 点赞
8 回复数
Jimmy_L
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 50 solutions authored

你好,

您可以先参考community的这条thread,里面有sample code。

https://community.infineon.com/t5/TRAVEO-T2G/cyt4bf-spi-dma-transfer/td-p/404513

0 点赞
ee1
Level 2
Level 2
5 questions asked 5 replies posted 5 sign-ins

谢谢您的回复,我把代码移植到CM0核中,可以正常运行,在cm7中却不可以。另外我听同事说cyt4bb ADC不能用dma,是真的吗

0 点赞
lock attach
Attachments are accessible only for community members.
Jimmy_L
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 50 solutions authored

你好,

应该不会限制core,您可以尝试CM0 core只把CM7 core打开,其它功能都不做,CM7 core跑您在CM0里想跑的代码试试看。

另外ADC也是可以做DMA的,可以参考附件的代码。

0 点赞
lock attach
Attachments are accessible only for community members.
ee1
Level 2
Level 2
5 questions asked 5 replies posted 5 sign-ins

你好,我把程序写到CM7_1里,依然不行,调试发现寄存器activity为0,但是已经手动触发了,是否在CM7里dma有某种限制。下面是我的代码。

0 点赞
lock attach
Attachments are accessible only for community members.
Jimmy_L
Moderator
Moderator
Moderator
250 replies posted 250 sign-ins 50 solutions authored

你好,

我司有个在CYT4BB上做的SPI DMA的demo,您可以参考下附件,实现过程就在cm7_0.

0 点赞
ee1
Level 2
Level 2
5 questions asked 5 replies posted 5 sign-ins

我发现问题了,将cache关闭就可以了。但这会影响其性能

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager

嗨,

尝试 .intrType = cy_pdma_intr_descr_cmplt;

在当前配置下,每传输一个字节,DMA 就会产生一个中断服务请求。 这导致中断频率过高,使系统超负荷运行。

最好的问候

jJack

 

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/CYT4BB-microcontroller-DMA-can-t-transfer-but-enter-DMA-interrupt-abnormally/m-p/691100

0 点赞
Translation_Bot
Community Manager
Community Manager
Community Manager

有进展吗?

smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/TRAVEO-T2G/CYT4BB-microcontroller-DMA-can-t-transfer-but-enter-DMA-interrupt-abnormally/m-p/693579

0 点赞