<?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>topic Re: Can I use it with different pins at the same time? (s32k144w timer and pwm ) in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Can-I-use-it-with-different-pins-at-the-same-time-s32k144w-timer/m-p/1773129#M29557</link>
    <description>&lt;P&gt;Do be honest, I really don't understand your issue too much.&lt;/P&gt;
&lt;P&gt;If you call two functions sequentially than it'll be also sequentially executed. Please clarify&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 12:42:05 GMT</pubDate>
    <dc:creator>davidtosenovjan</dc:creator>
    <dc:date>2023-12-12T12:42:05Z</dc:date>
    <item>
      <title>Can I use it with different pins at the same time? (s32k144w timer and pwm )</title>
      <link>https://community.nxp.com/t5/S32K/Can-I-use-it-with-different-pins-at-the-same-time-s32k144w-timer/m-p/1772317#M29509</link>
      <description>&lt;P&gt;#include "sdk_project_config.h"&lt;BR /&gt;#include "osif.h"&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/P&gt;&lt;P&gt;#define CLOCK_PIN 5U //PTB5&lt;BR /&gt;#define CLOCK_PORT PTB&lt;BR /&gt;#define PWM_CHANNEL 6u // PTE8 PWM CH6&lt;BR /&gt;#define PWM_POLARITY FTM_POLARITY_HIGH&lt;BR /&gt;volatile int exit_code = 0;&lt;BR /&gt;int count = 0;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;/* Write your local variable definition here */&lt;BR /&gt;ftm_state_t ftmStateStruct;&lt;BR /&gt;ftm_state_t state;&lt;BR /&gt;int dutyCycle = 0U;&lt;/P&gt;&lt;P&gt;flexTimer_pwm_1_IndependentChannelsConfig[0].hwChannelId = PWM_CHANNEL;&lt;BR /&gt;flexTimer_pwm_1_IndependentChannelsConfig[0].polarity = (ftm_polarity_t)PWM_CHANNEL;&lt;/P&gt;&lt;P&gt;/* Initialize clock module */&lt;BR /&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 instance */&lt;BR /&gt;FTM_DRV_Init(INST_FLEXTIMER_PWM_1, &amp;amp;flexTimer_pwm_1_InitConfig, &amp;amp;ftmStateStruct);&lt;BR /&gt;FTM_DRV_Init(INST_FLEXTIMER_MC_1, &amp;amp;flexTimer_mc_1_InitConfig_0, &amp;amp;state);&lt;/P&gt;&lt;P&gt;/* Initialize FTM PWM channel */&lt;BR /&gt;FTM_DRV_InitPwm(INST_FLEXTIMER_PWM_1, &amp;amp;flexTimer_pwm_1_PwmConfig);&lt;BR /&gt;FTM_DRV_InitCounter(INST_FLEXTIMER_MC_1, &amp;amp;flexTimer_mc_1_TimerConfig_0);&lt;/P&gt;&lt;P&gt;FTM_DRV_CounterStart(INST_FLEXTIMER_MC_1);&lt;/P&gt;&lt;P&gt;/* Infinite loop */&lt;BR /&gt;for ( ;; )&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;PINS_DRV_TogglePins(CLOCK_PORT, (1 &amp;lt;&amp;lt; CLOCK_PIN)); // PTB5 TOGGLE (1)&lt;BR /&gt;OSIF_TimeDelay(100);&lt;/P&gt;&lt;P&gt;for (dutyCycle = 0; dutyCycle &amp;lt; 30000; dutyCycle += 2000) // PTE8 PWM (2)&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_TICKS, dutyCycle,&lt;BR /&gt;0U,&lt;BR /&gt;true);&lt;BR /&gt;OSIF_TimeDelay(100);&lt;BR /&gt;}&lt;BR /&gt;for(dutyCycle=30000;dutyCycle&amp;gt;0;dutyCycle -=2000){ // PTE8 PWM (2)&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_TICKS,dutyCycle,&lt;BR /&gt;0U,&lt;BR /&gt;true);&lt;BR /&gt;OSIF_TimeDelay(100);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;OSIF_TimeDelay(100);&lt;BR /&gt;return exit_code;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I made PWM on PTE8 using example file on S32 DS and I made a separate code to toggle by repeating 0 and 1 on pin PTB5 using example. But I'm trying to combine the two codes into one code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the code being tried.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can't express all functions with this code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Instead of 1 and 2 being executed independently, 1 and 2 are executed quickly in order by the loop syntax, making it mistaken as if a signal is coming out at the same time.&lt;BR /&gt;Is there a simple way to do this independently?&lt;BR /&gt;For example, through for, while, and if phrases&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't know if what I'm trying to say is conveyed well,&amp;nbsp;I need your help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 13:14:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-I-use-it-with-different-pins-at-the-same-time-s32k144w-timer/m-p/1772317#M29509</guid>
      <dc:creator>Oido</dc:creator>
      <dc:date>2023-12-11T13:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use it with different pins at the same time? (s32k144w timer and pwm )</title>
      <link>https://community.nxp.com/t5/S32K/Can-I-use-it-with-different-pins-at-the-same-time-s32k144w-timer/m-p/1773129#M29557</link>
      <description>&lt;P&gt;Do be honest, I really don't understand your issue too much.&lt;/P&gt;
&lt;P&gt;If you call two functions sequentially than it'll be also sequentially executed. Please clarify&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 12:42:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Can-I-use-it-with-different-pins-at-the-same-time-s32k144w-timer/m-p/1773129#M29557</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2023-12-12T12:42:05Z</dc:date>
    </item>
  </channel>
</rss>

