I want to implement real-time PWM duty cycle change with DMA, Is there any demo you can give me for

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

I want to implement real-time PWM duty cycle change with DMA, Is there any demo you can give me for

1,730件の閲覧回数
Zhuang
Contributor I

I have tried to configure myself, but have failed, NXP can give me some reference

0 件の賞賛
返信
11 返答(返信)

1,697件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Zhuang

you can refer to this article which is all i can find for your topic.

https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K118-FTM-PWM-DMA-S32DS-2-2/ta-p/1342183

0 件の賞賛
返信

1,688件の閲覧回数
Zhuang
Contributor I

I tried to follow this routine, but in the process I ran into a problem: I was passing data through DMA 10 10 10 0. Here in the figure, it should be 0 but it appears 1, I do not know whether the DMA did not transmit the number or the PWM did not update, how to check this?

0 件の賞賛
返信

1,681件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@zhuang

I don't know how you get the picture you provided and you can take a look at the chapter

Senlent_1-1703496738143.png

 

 

0 件の賞賛
返信

1,676件の閲覧回数
Zhuang
Contributor I

This is my configuration

0 件の賞賛
返信

1,673件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

HI@zhuang

This is no different from the demo configuration I provided to you.
I suggest you create a separate project to test this feature. You can add some flag bits for DMA transfer completion and PWM synchronization completion, and use a logic analyzer to analyze these timings.

0 件の賞賛
返信

1,619件の閲覧回数
Zhuang
Contributor I

Hi Senlent,

I want to confirm, how to confirm the completion of PWM synchronization?

0 件の賞賛
返信

1,608件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Zhuang

I read the relevant content, and there seems to be no flag bit when the hardware triggers synchronization completion.

Senlent_1-1703571868475.png

 

 

0 件の賞賛
返信

1,604件の閲覧回数
Zhuang
Contributor I

In addition to increasing the flag bit after the completion of DMA transfer, what other feasible measures?

0 件の賞賛
返信

1,671件の閲覧回数
Zhuang
Contributor I

I have now made some DMA complete transfer flag, only the flag set will allow the next send.
Now I want to confirm, how to confirm the completion of PWM synchronization?

0 件の賞賛
返信

1,679件の閲覧回数
Zhuang
Contributor I

I use Init_trig (CNT set 0) to trigger FTM output waveform change, FTM has waveform change, CHF set, trigger DMA so.

0 件の賞賛
返信

1,728件の閲覧回数
Zhuang
Contributor I

I used an S32K148

0 件の賞賛
返信