<?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のトピックFlexIO Timer</title>
    <link>https://community.nxp.com/t5/S32K/FlexIO-Timer/m-p/1511592#M17306</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am using FLexIO for PWM geneartion and everything is mostly working properly and i am faing error in Transmission as you can see i am using 2 timer for SENT. TImer0 is working properly with no or less red data but for timer 1 its too much red data(if data is different) if i transmit same data then both are smae with less error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;JustMet&lt;/P&gt;&lt;P&gt;/************ SHIFTER Data OUT CONFIGURATION *************************************/&lt;BR /&gt;FLEXIO-&amp;gt;SHIFTCTL[0] = FLEXIO_SHIFTCTL_SMOD(2) | /* 2: Transmit mode. Load SHIFTBUF contents into the Shifter on expiration of the Timer */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINPOL(0) | /* 0: Pin is active high */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINSEL(0) | /* 1: Select the FXIO_D0 pin */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINCFG(0) | /* 0: Shifter pin output disabled */&lt;BR /&gt;FLEXIO_SHIFTCTL_TIMPOL(1) | /* 1: Shift on negedge of Shift clock */&lt;BR /&gt;FLEXIO_SHIFTCTL_TIMSEL(0); /* 0: Select Timer 0 */&lt;/P&gt;&lt;P&gt;FLEXIO-&amp;gt;SHIFTCFG[0] = FLEXIO_SHIFTCFG_SSTART(0) | /* 0: Start bit disabled for transmitter/receiver/match store, transmitter loads data on enable */&lt;BR /&gt;FLEXIO_SHIFTCFG_SSTOP(0) | /* 0: Stop bit disabled for transmitter/receiver/match store */&lt;BR /&gt;FLEXIO_SHIFTCFG_INSRC(0); /* 0: Pin */&lt;/P&gt;&lt;P&gt;/************* TIMER BitCLK OUT CONFIGURATION *********************************/&lt;BR /&gt;/* The Timer Configuration Register (TIMCFGn) should be configured before setting the Timer Mode (TIMOD).*/&lt;BR /&gt;FLEXIO-&amp;gt;TIMCFG[0] = FLEXIO_TIMCFG_TSTART(0) | /* 0: Start bit disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TSTOP(0) | /* 0: Stop bit disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TIMENA(2) | /* 2: Timer enabled on Trigger high */&lt;BR /&gt;FLEXIO_TIMCFG_TIMDIS(0) | /* 0: Timer never disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TIMRST(0) | /* 0: Timer never reset */&lt;BR /&gt;FLEXIO_TIMCFG_TIMDEC(0) | /* 0: Decrement counter on FlexIO clock, Shift clock equals Timer output */&lt;BR /&gt;FLEXIO_TIMCFG_TIMOUT(2); /* 2: Timer output is logic one when enabled and on timer reset */&lt;/P&gt;&lt;P&gt;FLEXIO-&amp;gt;TIMCTL[0] = FLEXIO_TIMCTL_TIMOD(2) | /* 2: Dual 8-bit counters PWM mode */&lt;BR /&gt;FLEXIO_TIMCTL_PINPOL(0) | /* 0: Pin is active high */&lt;BR /&gt;FLEXIO_TIMCTL_PINSEL(1) | /* 1: Select the FXIO_D1 pin */&lt;BR /&gt;FLEXIO_TIMCTL_PINCFG(3) | /* 3: Timer pin output */&lt;BR /&gt;FLEXIO_TIMCTL_TRGSRC(1) | /* 1: Internal trigger selected */&lt;BR /&gt;FLEXIO_TIMCTL_TRGPOL(1) | /* 1: Trigger active low */&lt;BR /&gt;FLEXIO_TIMCTL_TRGSEL(1); /* 1: 4*N+1 - Shifter N(0) status flag */&lt;/P&gt;&lt;P&gt;/************ SHIFTER Data OUT CONFIGURATION *************************************/&lt;BR /&gt;FLEXIO-&amp;gt;SHIFTCTL[1] = FLEXIO_SHIFTCTL_SMOD(2) | /* 2: Transmit mode. Load SHIFTBUF contents into the Shifter on expiration of the Timer */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINPOL(0) | /* 0: Pin is active high */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINSEL(2) | /* 1: Select the FXIO_D2 pin */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINCFG(0) | /* 0: Shifter pin output disabled */&lt;BR /&gt;FLEXIO_SHIFTCTL_TIMPOL(1) | /* 1: Shift on negedge of Shift clock */&lt;BR /&gt;FLEXIO_SHIFTCTL_TIMSEL(1); /* 0: Select Timer 1 */&lt;/P&gt;&lt;P&gt;FLEXIO-&amp;gt;SHIFTCFG[1] = FLEXIO_SHIFTCFG_SSTART(0) | /* 0: Start bit disabled for transmitter/receiver/match store, transmitter loads data on enable */&lt;BR /&gt;FLEXIO_SHIFTCFG_SSTOP(0) | /* 0: Stop bit disabled for transmitter/receiver/match store */&lt;BR /&gt;FLEXIO_SHIFTCFG_INSRC(0); /* 0: Pin */&lt;/P&gt;&lt;P&gt;/************* TIMER BitCLK OUT CONFIGURATION *********************************/&lt;BR /&gt;/* The Timer Configuration Register (TIMCFGn) should be configured before setting the Timer Mode (TIMOD).*/&lt;BR /&gt;FLEXIO-&amp;gt;TIMCFG[1] = FLEXIO_TIMCFG_TSTART(0) | /* 0: Start bit disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TSTOP(0) | /* 0: Stop bit disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TIMENA(2) | /* 2: Timer enabled on Trigger high */&lt;BR /&gt;FLEXIO_TIMCFG_TIMDIS(0) | /* 0: Timer never disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TIMRST(0) | /* 0: Timer never reset */&lt;BR /&gt;FLEXIO_TIMCFG_TIMDEC(0) | /* 0: Decrement counter on FlexIO clock, Shift clock equals Timer output */&lt;BR /&gt;FLEXIO_TIMCFG_TIMOUT(2); /* 2: Timer output is logic one when enabled and on timer reset */&lt;/P&gt;&lt;P&gt;FLEXIO-&amp;gt;TIMCTL[1] = FLEXIO_TIMCTL_TIMOD(2) | /* 2: Dual 8-bit counters PWM mode */&lt;BR /&gt;FLEXIO_TIMCTL_PINPOL(0) | /* 0: Pin is active high */&lt;BR /&gt;FLEXIO_TIMCTL_PINSEL(4) | /* 1: Select the FXIO_D4 pin */&lt;BR /&gt;FLEXIO_TIMCTL_PINCFG(3) | /* 3: Timer pin output */&lt;BR /&gt;FLEXIO_TIMCTL_TRGSRC(1) | /* 1: Internal trigger selected */&lt;BR /&gt;FLEXIO_TIMCTL_TRGPOL(1) | /* 1: Trigger active low */&lt;BR /&gt;FLEXIO_TIMCTL_TRGSEL(5); /* 1: 4*N+1 - Shifter N(0) status flag */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SENT Ch2.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/191269iFC03FAF14BACBF37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SENT Ch2.png" alt="SENT Ch2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SENT Ch2 01.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/191268i993EAE3C98073ED4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SENT Ch2 01.png" alt="SENT Ch2 01.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Aug 2022 08:45:24 GMT</pubDate>
    <dc:creator>JustMet</dc:creator>
    <dc:date>2022-08-25T08:45:24Z</dc:date>
    <item>
      <title>FlexIO Timer</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-Timer/m-p/1511592#M17306</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am using FLexIO for PWM geneartion and everything is mostly working properly and i am faing error in Transmission as you can see i am using 2 timer for SENT. TImer0 is working properly with no or less red data but for timer 1 its too much red data(if data is different) if i transmit same data then both are smae with less error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;JustMet&lt;/P&gt;&lt;P&gt;/************ SHIFTER Data OUT CONFIGURATION *************************************/&lt;BR /&gt;FLEXIO-&amp;gt;SHIFTCTL[0] = FLEXIO_SHIFTCTL_SMOD(2) | /* 2: Transmit mode. Load SHIFTBUF contents into the Shifter on expiration of the Timer */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINPOL(0) | /* 0: Pin is active high */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINSEL(0) | /* 1: Select the FXIO_D0 pin */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINCFG(0) | /* 0: Shifter pin output disabled */&lt;BR /&gt;FLEXIO_SHIFTCTL_TIMPOL(1) | /* 1: Shift on negedge of Shift clock */&lt;BR /&gt;FLEXIO_SHIFTCTL_TIMSEL(0); /* 0: Select Timer 0 */&lt;/P&gt;&lt;P&gt;FLEXIO-&amp;gt;SHIFTCFG[0] = FLEXIO_SHIFTCFG_SSTART(0) | /* 0: Start bit disabled for transmitter/receiver/match store, transmitter loads data on enable */&lt;BR /&gt;FLEXIO_SHIFTCFG_SSTOP(0) | /* 0: Stop bit disabled for transmitter/receiver/match store */&lt;BR /&gt;FLEXIO_SHIFTCFG_INSRC(0); /* 0: Pin */&lt;/P&gt;&lt;P&gt;/************* TIMER BitCLK OUT CONFIGURATION *********************************/&lt;BR /&gt;/* The Timer Configuration Register (TIMCFGn) should be configured before setting the Timer Mode (TIMOD).*/&lt;BR /&gt;FLEXIO-&amp;gt;TIMCFG[0] = FLEXIO_TIMCFG_TSTART(0) | /* 0: Start bit disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TSTOP(0) | /* 0: Stop bit disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TIMENA(2) | /* 2: Timer enabled on Trigger high */&lt;BR /&gt;FLEXIO_TIMCFG_TIMDIS(0) | /* 0: Timer never disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TIMRST(0) | /* 0: Timer never reset */&lt;BR /&gt;FLEXIO_TIMCFG_TIMDEC(0) | /* 0: Decrement counter on FlexIO clock, Shift clock equals Timer output */&lt;BR /&gt;FLEXIO_TIMCFG_TIMOUT(2); /* 2: Timer output is logic one when enabled and on timer reset */&lt;/P&gt;&lt;P&gt;FLEXIO-&amp;gt;TIMCTL[0] = FLEXIO_TIMCTL_TIMOD(2) | /* 2: Dual 8-bit counters PWM mode */&lt;BR /&gt;FLEXIO_TIMCTL_PINPOL(0) | /* 0: Pin is active high */&lt;BR /&gt;FLEXIO_TIMCTL_PINSEL(1) | /* 1: Select the FXIO_D1 pin */&lt;BR /&gt;FLEXIO_TIMCTL_PINCFG(3) | /* 3: Timer pin output */&lt;BR /&gt;FLEXIO_TIMCTL_TRGSRC(1) | /* 1: Internal trigger selected */&lt;BR /&gt;FLEXIO_TIMCTL_TRGPOL(1) | /* 1: Trigger active low */&lt;BR /&gt;FLEXIO_TIMCTL_TRGSEL(1); /* 1: 4*N+1 - Shifter N(0) status flag */&lt;/P&gt;&lt;P&gt;/************ SHIFTER Data OUT CONFIGURATION *************************************/&lt;BR /&gt;FLEXIO-&amp;gt;SHIFTCTL[1] = FLEXIO_SHIFTCTL_SMOD(2) | /* 2: Transmit mode. Load SHIFTBUF contents into the Shifter on expiration of the Timer */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINPOL(0) | /* 0: Pin is active high */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINSEL(2) | /* 1: Select the FXIO_D2 pin */&lt;BR /&gt;FLEXIO_SHIFTCTL_PINCFG(0) | /* 0: Shifter pin output disabled */&lt;BR /&gt;FLEXIO_SHIFTCTL_TIMPOL(1) | /* 1: Shift on negedge of Shift clock */&lt;BR /&gt;FLEXIO_SHIFTCTL_TIMSEL(1); /* 0: Select Timer 1 */&lt;/P&gt;&lt;P&gt;FLEXIO-&amp;gt;SHIFTCFG[1] = FLEXIO_SHIFTCFG_SSTART(0) | /* 0: Start bit disabled for transmitter/receiver/match store, transmitter loads data on enable */&lt;BR /&gt;FLEXIO_SHIFTCFG_SSTOP(0) | /* 0: Stop bit disabled for transmitter/receiver/match store */&lt;BR /&gt;FLEXIO_SHIFTCFG_INSRC(0); /* 0: Pin */&lt;/P&gt;&lt;P&gt;/************* TIMER BitCLK OUT CONFIGURATION *********************************/&lt;BR /&gt;/* The Timer Configuration Register (TIMCFGn) should be configured before setting the Timer Mode (TIMOD).*/&lt;BR /&gt;FLEXIO-&amp;gt;TIMCFG[1] = FLEXIO_TIMCFG_TSTART(0) | /* 0: Start bit disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TSTOP(0) | /* 0: Stop bit disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TIMENA(2) | /* 2: Timer enabled on Trigger high */&lt;BR /&gt;FLEXIO_TIMCFG_TIMDIS(0) | /* 0: Timer never disabled */&lt;BR /&gt;FLEXIO_TIMCFG_TIMRST(0) | /* 0: Timer never reset */&lt;BR /&gt;FLEXIO_TIMCFG_TIMDEC(0) | /* 0: Decrement counter on FlexIO clock, Shift clock equals Timer output */&lt;BR /&gt;FLEXIO_TIMCFG_TIMOUT(2); /* 2: Timer output is logic one when enabled and on timer reset */&lt;/P&gt;&lt;P&gt;FLEXIO-&amp;gt;TIMCTL[1] = FLEXIO_TIMCTL_TIMOD(2) | /* 2: Dual 8-bit counters PWM mode */&lt;BR /&gt;FLEXIO_TIMCTL_PINPOL(0) | /* 0: Pin is active high */&lt;BR /&gt;FLEXIO_TIMCTL_PINSEL(4) | /* 1: Select the FXIO_D4 pin */&lt;BR /&gt;FLEXIO_TIMCTL_PINCFG(3) | /* 3: Timer pin output */&lt;BR /&gt;FLEXIO_TIMCTL_TRGSRC(1) | /* 1: Internal trigger selected */&lt;BR /&gt;FLEXIO_TIMCTL_TRGPOL(1) | /* 1: Trigger active low */&lt;BR /&gt;FLEXIO_TIMCTL_TRGSEL(5); /* 1: 4*N+1 - Shifter N(0) status flag */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SENT Ch2.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/191269iFC03FAF14BACBF37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SENT Ch2.png" alt="SENT Ch2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SENT Ch2 01.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/191268i993EAE3C98073ED4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SENT Ch2 01.png" alt="SENT Ch2 01.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 08:45:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-Timer/m-p/1511592#M17306</guid>
      <dc:creator>JustMet</dc:creator>
      <dc:date>2022-08-25T08:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: FlexIO Timer</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-Timer/m-p/1513199#M17367</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203068"&gt;@JustMet&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If you disable timer 0, does timer 2 work correctly.&lt;/P&gt;
&lt;P&gt;An example is attached, can you compare the code?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the application spends some time in the FlexIO ISR, and it can servise both at the same time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 12:44:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-Timer/m-p/1513199#M17367</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-08-29T12:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: FlexIO Timer</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-Timer/m-p/1513837#M17409</link>
      <description>&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;No, If I disable timer 0,&amp;nbsp; timer 2 doesn't work correctly.&lt;BR /&gt;Yes i am using the similar code i will also attach my main file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;JustMet&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 10:32:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-Timer/m-p/1513837#M17409</guid>
      <dc:creator>JustMet</dc:creator>
      <dc:date>2022-08-30T10:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: FlexIO Timer</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-Timer/m-p/1516331#M17496</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203068"&gt;@JustMet&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Sorry for the delay, I have been busy.&lt;/P&gt;
&lt;P&gt;I see a few issues in the code.&lt;/P&gt;
&lt;P&gt;1. You should have a separate state machine for each of the channels in the ISR, not just one for both.&lt;/P&gt;
&lt;P&gt;2. Also, you don't poll and clear the second flag.&lt;/P&gt;
&lt;P&gt;3. Don't use read-modify-write (|= operation) to clear the flags. These are W1C bits, you have to use a direct write just to the flag you want to clear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 13:09:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-Timer/m-p/1516331#M17496</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2022-09-02T13:09:45Z</dc:date>
    </item>
  </channel>
</rss>

