S32K116 PWM输出问题

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

S32K116 PWM输出问题

ソリューションへジャンプ
1,165件の閲覧回数
JiShufan9
Contributor II

近期在使用S32K116做PWM自动调光,PWM设定为200Hz,在改变PWM输出占空比时,发现PWM变化时会有异常现象,在相近的两个亮度中间会出现一个高亮画面。

如下图,PWM1=3.30075/4.991=66.13%,PWM2=5.83725/7.5195=77.63%,PWM3=3.3085/4.991=66.29%。

JiShufan9_0-1698665079112.png

在66.13%变化至66.29%时,会出现一个77.64%的亮度的画面。

所以想请教下大家,有什么办法可以避免这种情况吗?是否能使调光更加的平滑?

 

0 件の賞賛
返信
1 解決策
1,150件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi JiShufan9,

请问是否用了S32K-RM参考手册提到的Synchronization Points来更新PWM占空比? The synchronization points are points where the registers can be updated with their write buffer by PWM synchronization. These synchronization points are safe points because guarantee smooth transitions in the generated PWM signals. 这有提到: 可以让生成的PWM信号平滑过渡。

47.5.13.3 Synchronization Points S32K-RM.png

请问你的工程使用S32K1 SDK的API,还是直接操作寄存器?AN5303 S32K 上 FlexTimer 模块的特性和工作模式 有提到半周期和全周期重装策略。  

AN5303SW 里有直接操作寄存器的示例。

SDK的话,根据你使用的S32DS for ARM 还是S32DS for S32 Platform,在Processor Expert或S32 Configuration Tool外设配置工具页面应该都是可以选择的,比如以下是S32DS for S32 Platform的配置页面:

FTM Register Sync Configuration Sync Point.png

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,151件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi JiShufan9,

请问是否用了S32K-RM参考手册提到的Synchronization Points来更新PWM占空比? The synchronization points are points where the registers can be updated with their write buffer by PWM synchronization. These synchronization points are safe points because guarantee smooth transitions in the generated PWM signals. 这有提到: 可以让生成的PWM信号平滑过渡。

47.5.13.3 Synchronization Points S32K-RM.png

请问你的工程使用S32K1 SDK的API,还是直接操作寄存器?AN5303 S32K 上 FlexTimer 模块的特性和工作模式 有提到半周期和全周期重装策略。  

AN5303SW 里有直接操作寄存器的示例。

SDK的话,根据你使用的S32DS for ARM 还是S32DS for S32 Platform,在Processor Expert或S32 Configuration Tool外设配置工具页面应该都是可以选择的,比如以下是S32DS for S32 Platform的配置页面:

FTM Register Sync Configuration Sync Point.png

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 件の賞賛
返信
1,140件の閲覧回数
JiShufan9
Contributor II

感谢回复,按照您所提供的方式,修改了配置后,PWM输出变化就可以平滑过渡了。

0 件の賞賛
返信