Setup DMA to generate independant PWMs on same submodule

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setup DMA to generate independant PWMs on same submodule

607 Views
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 Kudos
3 Replies

589 Views
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 Kudos

582 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @h_bouchard,

This looks like a workaround for this issue.

Best Regards,

Alexis Andalon

0 Kudos

597 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @h_bouchard,

Could you let me know which device are you using?

Best Regards,

Alexis Andalon

Tags (1)
0 Kudos