PWM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1,542 Views
D_D97
Contributor II

Hello,

I am using the iMXRT1176DVMAA for PWM output, I have noticed that the maximum period I can produce is approx 34ms (src clock 240MHz with prescalar : DIV_BY_128, fclk = 1.875 Mhz )
what if I want to generate a 50 ms period ?
note that I have used the driver SDK example and MCUXpresso IDE.

thank you.

Tags (2)
0 Kudos
Reply
1 Solution
1,512 Views
mayliu1
NXP Employee
NXP Employee

Hi @D_D97 ,

 

Thank you for your interest in the NXP MIMXRT product, I would  like to provide service for you.

I import a SDK demo"evkbmimxrt1170_pwm_cm7" , use MIMXRT1170-EVKB board.

1:  Modify PWM1 root clock(BUS_CLK_ROOT) as  24MHz;

2: Modify code " #define APP_DEFAULT_PWM_FREQUENCY (20UL)//(1000UL)" 

3: Used an oscilloscope to test J25-7 pin, and the PWM cycle of this pin is 50ms, 20Hz.

mayliu1_2-1728875447478.png

mayliu1_4-1728875736354.png

 

mayliu1_3-1728875522473.jpeg

I think you can refer to what I did above.

Wish it helps you.
If you still have question about it, please kindly let me know.

Best Regards

mayliu

View solution in original post

1 Reply
1,513 Views
mayliu1
NXP Employee
NXP Employee

Hi @D_D97 ,

 

Thank you for your interest in the NXP MIMXRT product, I would  like to provide service for you.

I import a SDK demo"evkbmimxrt1170_pwm_cm7" , use MIMXRT1170-EVKB board.

1:  Modify PWM1 root clock(BUS_CLK_ROOT) as  24MHz;

2: Modify code " #define APP_DEFAULT_PWM_FREQUENCY (20UL)//(1000UL)" 

3: Used an oscilloscope to test J25-7 pin, and the PWM cycle of this pin is 50ms, 20Hz.

mayliu1_2-1728875447478.png

mayliu1_4-1728875736354.png

 

mayliu1_3-1728875522473.jpeg

I think you can refer to what I did above.

Wish it helps you.
If you still have question about it, please kindly let me know.

Best Regards

mayliu

%3CLINGO-SUB%20id%3D%22lingo-sub-1972611%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EPWM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1972611%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI%20am%20using%20the%20iMXRT1176DVMAA%20for%20PWM%20output%2C%20I%20have%20noticed%20that%20the%20maximum%20period%20I%20can%20produce%20is%20approx%2034ms%20(src%20clock%20%3CSTRONG%3E240MHz%3C%2FSTRONG%3E%20with%20prescalar%20%3A%20%3CSTRONG%3EDIV_BY_128%3C%2FSTRONG%3E%2C%20fclk%20%3D%20%3CSTRONG%3E1.875%20Mhz%3C%2FSTRONG%3E%20)%3CBR%20%2F%3Ewhat%20if%20I%20want%20to%20generate%20a%2050%20ms%20period%20%3F%3CBR%20%2F%3Enote%20that%20I%20have%20used%20the%20driver%20SDK%20example%20and%20MCUXpresso%20IDE.%3C%2FP%3E%3CP%3Ethank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1972938%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20PWM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1972938%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F238260%22%20target%3D%22_blank%22%3E%40D_D97%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThank%20you%20for%20your%20interest%20in%20the%20NXP%20MIMXRT%20product%2C%20I%20would%26nbsp%3B%20like%20to%20provide%20service%20for%20you.%3C%2FP%3E%0A%3CP%3EI%20import%20a%20SDK%20demo%22evkbmimxrt1170_pwm_cm7%22%20%2C%20use%20MIMXRT1170-EVKB%20board.%3C%2FP%3E%0A%3CP%3E1%3A%26nbsp%3B%20Modify%20PWM1%20root%20clock(BUS_CLK_ROOT)%20as%26nbsp%3B%2024MHz%3B%3C%2FP%3E%0A%3CP%3E2%3A%20Modify%20code%20%22%26nbsp%3B%3CSPAN%3E%23define%20APP_DEFAULT_PWM_FREQUENCY%20(20UL)%2F%2F(1000UL)%22%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E3%3A%20Used%20an%20oscilloscope%20to%20test%20%3CSPAN%3EJ25-7%26nbsp%3B%3C%2FSPAN%3Epin%2C%20and%20the%20PWM%20cycle%20of%20this%20pin%20is%2050ms%2C%2020Hz.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mayliu1_2-1728875447478.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mayliu1_2-1728875447478.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304450i61CBC6E8B75AADB7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mayliu1_2-1728875447478.png%22%20alt%3D%22mayliu1_2-1728875447478.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mayliu1_4-1728875736354.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mayliu1_4-1728875736354.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304453i77561EA66A3C0D05%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mayliu1_4-1728875736354.png%22%20alt%3D%22mayliu1_4-1728875736354.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mayliu1_3-1728875522473.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mayliu1_3-1728875522473.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F304451iC025781301683600%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mayliu1_3-1728875522473.jpeg%22%20alt%3D%22mayliu1_3-1728875522473.jpeg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI%20think%20you%20can%20refer%20to%20what%20I%20did%20above.%3C%2FP%3E%0A%3CP%3EWish%20it%20helps%20you.%3CBR%20%2F%3EIf%20you%20still%20have%20question%20about%20it%2C%20please%20kindly%20let%20me%20know.%3C%2FP%3E%0A%3CP%3EBest%20Regards%3C%2FP%3E%0A%3CP%3Emayliu%3C%2FP%3E%3C%2FLINGO-BODY%3E