<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S32K中的主题 Re: S32K116 EVB Pwm and Timer Problem</title>
    <link>https://community.nxp.com/t5/S32K/S32K116-EVB-Pwm-and-Timer-Problem/m-p/1208113#M9501</link>
    <description>&lt;P&gt;Hi mfatihkoseoglu,&lt;/P&gt;
&lt;P&gt;1. Seems that you configure the wrong pin with channel(FTM0 channel 0 is selected but FTM0_CH1 PTD16 is configured)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pins FTM0_CH1.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/134217i6650BF6DC628DB65/image-size/large?v=v2&amp;amp;px=999" role="button" title="Pins FTM0_CH1.png" alt="Pins FTM0_CH1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Peripherals FTM0_CH0.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/134218iF09BA1B27E22D5A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Peripherals FTM0_CH0.png" alt="Peripherals FTM0_CH0.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. &lt;STRONG&gt;&lt;EM&gt;FTM_DRV_UpdatePwmChannel&lt;/EM&gt; &lt;/STRONG&gt;in main loop seems too frequency. The period of PWM is 1ms but the frequency that you &lt;STRONG&gt;&lt;EM&gt;FTM_DRV_UpdatePwmChannel&lt;/EM&gt; &lt;/STRONG&gt;is much higher. I think you should&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;FTM_DRV_UpdatePwmChannel&lt;/EM&gt; &lt;/STRONG&gt;only after &lt;STRONG&gt;dutyCycle&lt;/STRONG&gt; is changed.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="compare ftm_pwm_s32k116.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/134220iBB86B7E25F09D191/image-size/large?v=v2&amp;amp;px=999" role="button" title="compare ftm_pwm_s32k116.png" alt="compare ftm_pwm_s32k116.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;3. Please select &lt;STRONG&gt;Next Loading Point&lt;/STRONG&gt; and check &lt;STRONG&gt;Max Loading Point&lt;/STRONG&gt; for FTM0.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sync Point.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/134219iB2C08B0FA89BA2A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sync Point.png" alt="Sync Point.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Robin&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jan 2021 08:03:34 GMT</pubDate>
    <dc:creator>Robin_Shen</dc:creator>
    <dc:date>2021-01-07T08:03:34Z</dc:date>
    <item>
      <title>S32K116 EVB Pwm and Timer Problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K116-EVB-Pwm-and-Timer-Problem/m-p/1206544#M9474</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using S32K116-EVB and i wanna use timer interrupt and pwm. If I just use timer or just use pwm it has work but, If I wanna use both of them my sistem is not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use S32DS 3.3 and RTM 4.0.1 Library.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mycode:&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include "sdk_project_config.h"&lt;BR /&gt;#include "peripherals_flexTimer_mc_1.h"&lt;BR /&gt;#include "peripherals_flexTimer_pwm_1.h"&lt;/P&gt;&lt;P&gt;#include "stdio.h"&lt;/P&gt;&lt;P&gt;#define LED_PIN 15U /* LED pin on PTD15 for the EVB Board */&lt;BR /&gt;#define LED_PORT PTD&lt;/P&gt;&lt;P&gt;volatile int exit_code = 0;&lt;BR /&gt;/* User includes */&lt;/P&gt;&lt;P&gt;void FTM1_Ovf_Reload_IRQHandler(void)&lt;BR /&gt;{&lt;BR /&gt;static uint32_t counter = 0;&lt;/P&gt;&lt;P&gt;counter++;&lt;BR /&gt;if (counter == 20)&lt;BR /&gt;{&lt;BR /&gt;counter = 0;&lt;BR /&gt;}&lt;BR /&gt;FTM_DRV_ClearStatusFlags(INST_FLEXTIMER_MC_1, (uint32_t)FTM_TIME_OVER_FLOW_FLAG);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/*!&lt;BR /&gt;\brief The main function for the project.&lt;BR /&gt;\details The startup initialization sequence is the following:&lt;BR /&gt;* - startup asm routine&lt;BR /&gt;* - main()&lt;BR /&gt;*/&lt;BR /&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;/* Write your code here */&lt;BR /&gt;ftm_state_t state;&lt;BR /&gt;ftm_state_t ftmStateStruct;&lt;BR /&gt;uint16_t dutyCycle = flexTimer_pwm_1_IndependentChannelsConfig[0].uDutyCyclePercent;&lt;/P&gt;&lt;P&gt;CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT, g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);&lt;BR /&gt;CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);&lt;/P&gt;&lt;P&gt;/* Initialize pins */&lt;BR /&gt;PINS_DRV_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);&lt;/P&gt;&lt;P&gt;/* Initialize FTM */&lt;BR /&gt;FTM_DRV_Init(INST_FLEXTIMER_MC_1, &amp;amp;flexTimer_mc_1_InitConfig_0, &amp;amp;state);&lt;BR /&gt;/* Initialize FTM instance */&lt;BR /&gt;FTM_DRV_Init(INST_FLEXTIMER_PWM_1, &amp;amp;flexTimer_pwm_1_InitConfig, &amp;amp;ftmStateStruct);&lt;/P&gt;&lt;P&gt;/* Initialize counter */&lt;BR /&gt;FTM_DRV_InitCounter(INST_FLEXTIMER_MC_1, &amp;amp;flexTimer_mc_1_TimerConfig_0);&lt;BR /&gt;/* Initialize FTM PWM channel */&lt;BR /&gt;FTM_DRV_InitPwm(INST_FLEXTIMER_PWM_1, &amp;amp;flexTimer_pwm_1_PwmConfig);&lt;/P&gt;&lt;P&gt;/* Start Counter */&lt;BR /&gt;FTM_DRV_CounterStart(INST_FLEXTIMER_MC_1);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for(;;)&lt;BR /&gt;{&lt;BR /&gt;FTM_DRV_UpdatePwmChannel(INST_FLEXTIMER_PWM_1,&lt;BR /&gt;flexTimer_pwm_1_IndependentChannelsConfig[0].hwChannelId,&lt;BR /&gt;FTM_PWM_UPDATE_IN_DUTY_CYCLE, 1000,&lt;BR /&gt;0U,&lt;BR /&gt;true);&lt;/P&gt;&lt;P&gt;if(exit_code != 0)&lt;BR /&gt;{&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;return exit_code;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;I will be glad if you help me.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 06:32:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K116-EVB-Pwm-and-Timer-Problem/m-p/1206544#M9474</guid>
      <dc:creator>mfatihkoseoglu</dc:creator>
      <dc:date>2021-01-05T06:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: S32K116 EVB Pwm and Timer Problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K116-EVB-Pwm-and-Timer-Problem/m-p/1206710#M9479</link>
      <description>&lt;P&gt;Hi mfatihkoseoglu,&lt;/P&gt;
&lt;P&gt;Would you please direct attach whole project?&lt;BR /&gt;It will help us check the issue faster.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Robin&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 08:48:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K116-EVB-Pwm-and-Timer-Problem/m-p/1206710#M9479</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2021-01-05T08:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: S32K116 EVB Pwm and Timer Problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K116-EVB-Pwm-and-Timer-Problem/m-p/1206742#M9480</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your return. I added my project&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 09:14:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K116-EVB-Pwm-and-Timer-Problem/m-p/1206742#M9480</guid>
      <dc:creator>mfatihkoseoglu</dc:creator>
      <dc:date>2021-01-05T09:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: S32K116 EVB Pwm and Timer Problem</title>
      <link>https://community.nxp.com/t5/S32K/S32K116-EVB-Pwm-and-Timer-Problem/m-p/1208113#M9501</link>
      <description>&lt;P&gt;Hi mfatihkoseoglu,&lt;/P&gt;
&lt;P&gt;1. Seems that you configure the wrong pin with channel(FTM0 channel 0 is selected but FTM0_CH1 PTD16 is configured)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pins FTM0_CH1.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/134217i6650BF6DC628DB65/image-size/large?v=v2&amp;amp;px=999" role="button" title="Pins FTM0_CH1.png" alt="Pins FTM0_CH1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Peripherals FTM0_CH0.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/134218iF09BA1B27E22D5A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Peripherals FTM0_CH0.png" alt="Peripherals FTM0_CH0.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. &lt;STRONG&gt;&lt;EM&gt;FTM_DRV_UpdatePwmChannel&lt;/EM&gt; &lt;/STRONG&gt;in main loop seems too frequency. The period of PWM is 1ms but the frequency that you &lt;STRONG&gt;&lt;EM&gt;FTM_DRV_UpdatePwmChannel&lt;/EM&gt; &lt;/STRONG&gt;is much higher. I think you should&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;FTM_DRV_UpdatePwmChannel&lt;/EM&gt; &lt;/STRONG&gt;only after &lt;STRONG&gt;dutyCycle&lt;/STRONG&gt; is changed.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="compare ftm_pwm_s32k116.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/134220iBB86B7E25F09D191/image-size/large?v=v2&amp;amp;px=999" role="button" title="compare ftm_pwm_s32k116.png" alt="compare ftm_pwm_s32k116.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;3. Please select &lt;STRONG&gt;Next Loading Point&lt;/STRONG&gt; and check &lt;STRONG&gt;Max Loading Point&lt;/STRONG&gt; for FTM0.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sync Point.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/134219iB2C08B0FA89BA2A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sync Point.png" alt="Sync Point.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Robin&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 08:03:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K116-EVB-Pwm-and-Timer-Problem/m-p/1208113#M9501</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2021-01-07T08:03:34Z</dc:date>
    </item>
  </channel>
</rss>

