<?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: FlexIO timer trigger</title>
    <link>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2156644#M52085</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242216"&gt;@Fanta&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you just confirm there is no issue with the HW by toggling D2:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;LI-CODE lang="c"&gt;// Enable output on pin D2
IP_FLEXIO-&amp;gt;PINOUTE |= (1 &amp;lt;&amp;lt; 2);

// Toggle pin D2
IP_FLEXIO-&amp;gt;PINOUTTOG = (1 &amp;lt;&amp;lt; 2);

// Toggle pin D2
IP_FLEXIO-&amp;gt;PINOUTTOG = (1 &amp;lt;&amp;lt; 2);&lt;/LI-CODE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you maybe share the whole project, so that I can check the clock, etc?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
    <pubDate>Fri, 22 Aug 2025 08:55:36 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2025-08-22T08:55:36Z</dc:date>
    <item>
      <title>FlexIO timer trigger</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2153554#M51891</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to make use of FlexIO module on S32K358. My application is not a standard communication protocal, so the components in RTD driver cannot help me out. I have to write the registers directly.&lt;/P&gt;&lt;P&gt;Specifically, I am using 3pins, 1 shifter and 1 timer in FlexIO.&amp;nbsp; Ideally, trigger signal rising edge on pin1 triggers&amp;nbsp; the timer, and then timer outputs clk signal on pin2 to acquire data, at the same time generates the shift clock for the shifter. Shifter read the data from pin0. Eventually,&amp;nbsp; the data frame is read from shifterbuf, when eMIOS interrupt is triggered by trigger signal falling edge. The pin configuration is as followed.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fanta_0-1755509305134.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/352740i17FDD39B5CE3EDFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fanta_0-1755509305134.png" alt="Fanta_0-1755509305134.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The question is, I cannot even see the FlexIO output clk signal on pin2 on the&amp;nbsp;oscilloscope. I am pretty sure the the clock and pin initialazation is correct, and trigger signal exists,&amp;nbsp; because it also tirggers eMIOS interrupt and that works fine. What might go wrong? The FlexIO configuration is as followed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include "S32K358_FLEXIO.h"&lt;/P&gt;&lt;P&gt;Clock_Ip_Init(&amp;amp;Clock_Ip_aClockConfig[0]);&lt;/P&gt;&lt;P&gt;Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS_PortContainer_0_BOARD_InitPeripherals, g_pin_mux_InitConfigArr_PortContainer_0_BOARD_InitPeripherals);&lt;/P&gt;&lt;P&gt;IP_FLEXIO-&amp;gt;CTRL = (uint32)1u; //enable FlexIO&lt;/P&gt;&lt;P&gt;IP_FLEXIO-&amp;gt;SHIFTCFG[0] = FLEXIO_SHIFTCFG_PWIDTH(0) | //1 bit shift&lt;BR /&gt;FLEXIO_SHIFTCFG_SSIZE(0) | //32bit shift register&lt;BR /&gt;FLEXIO_SHIFTCFG_LATST(0) | //store the pre-shift register state&lt;BR /&gt;FLEXIO_SHIFTCFG_INSRC(0) |//pin input&lt;BR /&gt;FLEXIO_SHIFTCFG_SSTOP(0) |//disable stop bit&lt;BR /&gt;FLEXIO_SHIFTCFG_SSTART(0); //disable start bit&lt;/P&gt;&lt;P&gt;IP_FLEXIO-&amp;gt;SHIFTCTL[0] = FLEXIO_SHIFTCTL_TIMSEL(0) | //timer0 generate the shift clock&lt;BR /&gt;FLEXIO_SHIFTCTL_TIMPOL(1) | //shift occurs on the negative edge&lt;BR /&gt;FLEXIO_SHIFTCTL_PINCFG(0) | //shifter pin output disabled&lt;BR /&gt;FLEXIO_SHIFTCTL_PINSEL(0) | //select FXIO_D0 as shifter input.&lt;BR /&gt;FLEXIO_SHIFTCTL_PINPOL(0) | //shifter pin active high&lt;BR /&gt;FLEXIO_SHIFTCTL_SMOD(1); //receive mode&lt;/P&gt;&lt;P&gt;IP_FLEXIO-&amp;gt;TIMCMP[0] = 0x00007951; //8 bit baud rate mode&lt;BR /&gt;// 16 bit for 1 data frame, 5MHz baudrate (160MHz for FlexIO_clk)&lt;BR /&gt;//TIMCMP[7:0]=15 baudrate divider/2 - 1&lt;BR /&gt;//TIMCMP[15:8]=31 bits*2-1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;IP_FLEXIO-&amp;gt;TIMCFG[0] = FLEXIO_TIMCFG_TIMOUT(3) | //Logic zero when enabled and on timer reset&lt;BR /&gt;FLEXIO_TIMCFG_TIMDEC(0) | //Decrement counter on FLEXIO clock; shift clock equals timer output&lt;BR /&gt;FLEXIO_TIMCFG_TIMRST(6) | //Timer reset on trigger rising edge&lt;BR /&gt;FLEXIO_TIMCFG_TIMDIS(6) | //Timer disabled on trigger falling edge&lt;BR /&gt;FLEXIO_TIMCFG_TIMENA(6) |//Timer enabled on trigger rising edge&lt;BR /&gt;FLEXIO_TIMCFG_TSTOP(0) | //disable stop bit&lt;BR /&gt;FLEXIO_TIMCFG_TSTART(0); //disable start bit&lt;/P&gt;&lt;P&gt;IP_FLEXIO-&amp;gt;TIMCTL[0] = FLEXIO_TIMCTL_TRGSEL(2) | //select FXIO_D1 as internal trigger&lt;BR /&gt;FLEXIO_TIMCTL_TRGPOL(0) | //trigger active high&lt;BR /&gt;FLEXIO_TIMCTL_TRGSRC(1) | //internal trigger&lt;BR /&gt;FLEXIO_TIMCTL_PINCFG(3) | //timer pin output&lt;BR /&gt;FLEXIO_TIMCTL_PINSEL(2) | //select FXIO_D2 as timer pin&lt;BR /&gt;FLEXIO_TIMCTL_PINPOL(0) | //timer pin active high&lt;BR /&gt;FLEXIO_TIMCTL_PININS(0) | //PINSEL selects pin input and output&lt;BR /&gt;FLEXIO_TIMCTL_ONETIM(0) | //Generate the timer enable event as normal&lt;BR /&gt;FLEXIO_TIMCTL_TIMOD(1); //8-bit baud counter mode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;LI-PRODUCT title="S32K3" id="S32K3"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 10:06:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2153554#M51891</guid>
      <dc:creator>Fanta</dc:creator>
      <dc:date>2025-08-18T10:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: FlexIO timer trigger</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2154415#M51953</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242216"&gt;@Fanta&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Let me test it on my side.&lt;/P&gt;
&lt;P&gt;How does this protocol differ from SPI?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2025 12:42:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2154415#M51953</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-08-19T12:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: FlexIO timer trigger</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2154758#M51966</link>
      <description>Thanks. And yes, to some degree it is an SPI, but without CS and MOSI. I would like to save some resource on FlexIO for another applications, so I directly write FlexIO registers rather than use FlexIO SPI RTD driver.</description>
      <pubDate>Wed, 20 Aug 2025 00:37:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2154758#M51966</guid>
      <dc:creator>Fanta</dc:creator>
      <dc:date>2025-08-20T00:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: FlexIO timer trigger</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2156644#M52085</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242216"&gt;@Fanta&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you just confirm there is no issue with the HW by toggling D2:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;LI-CODE lang="c"&gt;// Enable output on pin D2
IP_FLEXIO-&amp;gt;PINOUTE |= (1 &amp;lt;&amp;lt; 2);

// Toggle pin D2
IP_FLEXIO-&amp;gt;PINOUTTOG = (1 &amp;lt;&amp;lt; 2);

// Toggle pin D2
IP_FLEXIO-&amp;gt;PINOUTTOG = (1 &amp;lt;&amp;lt; 2);&lt;/LI-CODE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you maybe share the whole project, so that I can check the clock, etc?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2025 08:55:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2156644#M52085</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-08-22T08:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: FlexIO timer trigger</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2156988#M52107</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001"&gt;@danielmartynek&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I have tried toggling D2 as your suggestion, and confirmed that there is no issue with my HW. And here is the whole project, running at S32DS 3.5 and SDK 5.0.0 .&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 23 Aug 2025 02:32:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2156988#M52107</guid>
      <dc:creator>Fanta</dc:creator>
      <dc:date>2025-08-23T02:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: FlexIO timer trigger</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2159614#M52208</link>
      <description>Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001"&gt;@danielmartynek&lt;/a&gt;,&lt;BR /&gt;Excuse me, I have kept trying these days but still no clue, do you have any?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 28 Aug 2025 05:42:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2159614#M52208</guid>
      <dc:creator>Fanta</dc:creator>
      <dc:date>2025-08-28T05:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: FlexIO timer trigger</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2159876#M52232</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242216"&gt;@Fanta&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;EDITED:&lt;/P&gt;
&lt;P&gt;I’m experiencing issues with reliably outputting the baud rate. The behavior is inconsistent.&lt;/P&gt;
&lt;P&gt;Interestingly, the exact same code runs without any modification on the S32K344 and works as expected.&lt;/P&gt;
&lt;P&gt;However, on the S23K358 MCU:&lt;/P&gt;
&lt;P&gt;When I disconnect the debugger and power cycle the MCU, I do get the baud rate output on pin D2 (PTF8).&lt;BR /&gt;Also, when the FLEXIO_CTRL[DBGE] bit is set, the baud rate seems to be working as well.&lt;BR /&gt;Could you please test this behavior?&lt;/P&gt;
&lt;P&gt;Before doing so, check the status of the FlexIO_PIN[1] register while toggling the trigger on D1, to be sure the FlexIO sees the trigger.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 13:19:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2159876#M52232</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-08-28T13:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: FlexIO timer trigger</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2162825#M52366</link>
      <description>Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160001"&gt;@danielmartynek&lt;/a&gt; ,&lt;BR /&gt;You are right, I disconnected the debugger and re-powered the MCU, and got the expected result. Thanks a lot.&lt;BR /&gt;Indeed it is an interesting problem, don't know what exactly goes wrong, the MCU chip or evulation board. My EVB is S32K3X8EVB-Q289, SCH-54870 REV C, 700-54780 REV A. I might design a board using S32K358 in future, and keep tracking this issue. And hope NXP can put some resource on this issue.</description>
      <pubDate>Wed, 03 Sep 2025 10:21:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2162825#M52366</guid>
      <dc:creator>Fanta</dc:creator>
      <dc:date>2025-09-03T10:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: FlexIO timer trigger</title>
      <link>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2162837#M52368</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/242216"&gt;@Fanta&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;It seems to a problem of all multicore S32K3xx MCUs.&lt;/P&gt;
&lt;P&gt;If one core is halted by the debugger, the MCU is in active debug mode.&lt;/P&gt;
&lt;P&gt;The FlexIO module does not work in this mode unless&amp;nbsp;FLEXIO_CTRL[DBGE] is set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2025 10:49:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/FlexIO-timer-trigger/m-p/2162837#M52368</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2025-09-03T10:49:36Z</dc:date>
    </item>
  </channel>
</rss>

