PWM issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,848件の閲覧回数
Ayaz
Contributor III

I am using S32K344 to generate PWM via eMIOS and flexio using OPWMB?

i have some dough regrade to the formular for calculating  the PWM frequency ?

PWM frequency = CORE_CLK / global prescaler / internal prescaler / (B1+1)

I am using this formular for Emios can i use it also for flexio?

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

FlexIO PWM frequency = AIPS_PLAT_CLK/ Clock prescaler / Period[ticks]=48MHz/1/200=240 kHz

元の投稿で解決策を見る

0 件の賞賛
返信
11 返答(返信)
725件の閲覧回数
ESAKKI_MBD
Contributor II

I have a issue with OPWFMB mode for variable frequency & variable duty cycle. can you help me with this mode with an example?

I am encountering with the OPWFMB mode for variable frequency and duty cycle. can you help me with examples in understanding and troubleshooting such complexities.

Your expertise in this matter would greatly contribute to resolving the issue efficiently.

Thank you in advance for your attention to this matter. I look forward to your guidance and insights.

0 件の賞賛
返信
1,829件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

I don't think this formula for eMIOS can be used for Flexio_PWM. Have a look at Flexio_Pwm_Ip_Example_S32K344:

Flexio_Pwm_Ip_Example_S32K344_RTD300 FlexIO AIPS_PLAT_CLK.pngFlexio_Pwm_Ip_Example_S32K344_RTD300 Clock prescaler Period.png


Best Regards,
Robin
-------------------------------------------------------------------------------
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,823件の閲覧回数
Ayaz
Contributor III

what is the formula for flexio_pwm ?

0 件の賞賛
返信
1,804件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

FlexIO PWM frequency = AIPS_PLAT_CLK/ Clock prescaler / Period[ticks]=48MHz/1/200=240 kHz

0 件の賞賛
返信
1,809件の閲覧回数
Ayaz
Contributor III

 first 1)

is the formular i am using for eMIOS correct ?

 PWM frequency = CORE_CLK / global prescaler / internal prescaler / (period ticks+1) or shoud it be 

PWM frequency = CORE_CLK / global prescaler / internal prescaler / (period ticks).

second 2) when i have for example period for 2400 ticks and i set duty cycle into 2400,100% duty cycle is not giving any output,but if i decrease the duty cycle only be  one ticks then the period then it will gives an output of 98,7%.

my setup is 

CORE_CLK=48MHz

global prescaler=1

internal prescaler=1

mcl 

Skærmbillede 2023-114.pngSkærmbillede 2023-11-27 093140.png

 

0 件の賞賛
返信
1,797件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

eMIOS PWM frequency has been discussed in S32K344 hardware PWM frequency, which is:

PWM frequency = CORE_CLK / global prescaler / internal prescaler / (B1+1)

0 件の賞賛
返信
1,205件の閲覧回数
ESAKKI_MBD
Contributor II
in this formula I can't be able to understand what is B1?
0 件の賞賛
返信
1,792件の閲覧回数
Ayaz
Contributor III

PWM frequency = CORE_CLK / global prescaler / internal prescaler / (B1+1)

under the example you send me this formular is for OPWFMB mode

does this formular applies on OPWMB mode also? 

0 件の賞賛
返信
1,681件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Note Clock prescaler(Internal Prescaler) Will only have an effect in OPWFMB and OPMCB modes.(Shown in S32 Configuration Tool). If OPWMB mode is selected, only global prescaler(Master Bus Prescaler) is active by using S32CT.

Clock prescaler Will only have an effect in OPWFMB and OPMCB modes.png

0 件の賞賛
返信
1,789件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Yes, I think it's the same.

0 件の賞賛
返信
1,779件の閲覧回数
Ayaz
Contributor III

is it normal that if i apply 2399 ticks for period and i set the duty cycle 2399 to get 100% duty cycle ,is not giving my any output ,from the test i did ,the duty cycle most always be one ticks less the period to get 100% duty cycle ,it is for emios 

0 件の賞賛
返信