Setup DMA to generate independant PWMs on same submodule

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Setup DMA to generate independant PWMs on same submodule

668 次查看
h_bouchard
Contributor III

Hi,

I want to setup the DMA to feed both channels of the same PWM submodule. According to the datasheet, there is only one DMA request per submodule. Therefore, it doesn't seem possible to setup 2 DMA channels (one for channel A and one for channel B) otherwise DMA request would be triggered twice (or only once and one channel wouldn't be updated?).

Should I setup the DMA to write both VAL3 and VAL5 registers on the same transfer loop by setting the TCD accordingly the and only use one DMA channel (or two because I think channel linking will be needed here) ?

Thanks!
Hugo

0 项奖励
3 回复数

650 次查看
h_bouchard
Contributor III

Hello Alexis,

We are using an IMXRT1064.

After investigations, I might have figured out how to handle this. I would have to set two DMA channels linked together (minor loop linking). The major loop would be triggered by the DMA request from the PWM submodule. Once the first minor loop updating VAL3 register for channel A duty cycle is done, the second channel linked would be triggered which would update VAL5 register for channel B.

I haven't tested the solution though.

Thanks,
Hugo

0 项奖励

643 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @h_bouchard,

This looks like a workaround for this issue.

Best Regards,

Alexis Andalon

0 项奖励

658 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @h_bouchard,

Could you let me know which device are you using?

Best Regards,

Alexis Andalon

标记 (1)
0 项奖励