<?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 Problem of access FIFO of CTU with it works at dual conversion mode in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Problem-of-access-FIFO-of-CTU-with-it-works-at-dual-conversion/m-p/727598#M9826</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to test the FlexPWM- CTU-ADC program. I configured the CTU for triggering on FlexPWM MRS and generate the Trigger0 to send 3 ADC dual conversion commands, and the results are saved in FIFO0. I set the threshold of FIFO0 to 5 and enable the FIFO0 overflow interrupt. Here is my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Configuration of CTU&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#define CTU0_TGSISR 0x00000001 /* Input 0 Rising Edge Enable - FlexPWM0_MRS */&lt;BR /&gt;#define CTU0_TGSCR 0x0000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Triggered Mode */&lt;BR /&gt;#define CTU0_T0CR 0x0000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* ADC and SGEN - same time with MRS*/&lt;BR /&gt;#define CTU0_TGSCCR 0x3E80&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* TGS Counter Compare Value - 16000 DEC - 100us */&lt;BR /&gt;#define CTU0_CLCR1 0x00000000&amp;nbsp; &amp;nbsp;/* Trigger 0 Commands List 1st command address */&lt;BR /&gt;#define CTU0_THCR1 0x00000065&amp;nbsp;&amp;nbsp; /* T0_E - T0_T2E - T0_ADCE */&lt;BR /&gt;#define CTU0_COTR 0x0064&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; /* Control ON-Time and Guard Time for external trigger */&lt;BR /&gt;#define CTU0_CTU0CR 0x0003&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; /* General Reload Enable - TGS Input Selection Register Reload Enable */&lt;BR /&gt;#define CTU0_CLR0 0x218B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* PhaseA current ADC0_CH11 - PhaseB current ADC1_CH12 - FIFO_0 */&lt;BR /&gt;#define CTU0_CLR1 0x21C1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* DC bus current ADC0_CH1 - DC bus voltage ADC1_CH14 - FIFO_0 */&lt;BR /&gt;#define CTU0_CLR2 0x20C0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Resolver sin ADC0_CH0 -&amp;nbsp;Pot&amp;nbsp;ADC1_CH6 - FIFO_0 */&lt;BR /&gt;#define CTU0_CLR3 0x4000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Last command */&lt;BR /&gt;#define CTU0_FTH 0x0005&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* FIFO_0 threshold is 5 to accept 6 ADC results */&lt;BR /&gt;#define CTU0_FCR 0x0004&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* FIFO 0 threshold overflow interrupt enable */&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;FIFO0_ISR&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;void FIFO0_ISR(void)&lt;BR /&gt;{&lt;BR /&gt; SIUL2.GPDO[42].R = 1;&lt;BR /&gt; uint32_t fifo_status;&lt;/P&gt;&lt;P&gt;fifo_status = CTU_0.FST.R &amp;amp; 0xf;&lt;/P&gt;&lt;P&gt;if (fifo_status == 4) // if overflow&lt;BR /&gt; {&lt;BR /&gt; Result[0] = (uint32_t)CTU_0.FR[0].R;&lt;BR /&gt; Result[1] = (uint32_t)CTU_0.FL[0].R;&lt;BR /&gt; Result[2] = (uint32_t)CTU_0.FR[0].R;&lt;BR /&gt; Result[3] = (uint32_t)CTU_0.FL[0].R;&lt;BR /&gt; Result[4] = (uint32_t)CTU_0.FR[0].R;&lt;BR /&gt; Result[5] = (uint32_t)CTU_0.FL[0].R;&lt;BR /&gt; FlexPWM_0.SUB[0].VAL3.R = (uint16_t)(Result[5] &amp;amp; 0xfff);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// use the value of pot to change the duty of PWM&lt;/P&gt;&lt;P&gt;FlexPWM_0.MCTRL.B.LDOK = 0x7;&lt;/P&gt;&lt;P&gt;CTU_0.CR.B.GRE = 1; // CTU General Reload Enable&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;if (fifo_status == 8) // if overrun&lt;BR /&gt; {&lt;BR /&gt; CTU_0.FST.R = 8; // clear overrun flag&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;SIUL2.GPDO[42].R = 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;According to my configuration, there will be 6 ADC results saved in CTU_FIFO0 every time the overflow interrupt happened. And the last result entered in FIFO0 should be the value of the Pot(PE12).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I debug the project, I find the FIFO0_FR0 has the result of ADC0_CH11 and FIFO0_FL0&amp;nbsp;&lt;SPAN&gt;has the result of ADC1_CH12, these are&amp;nbsp;conform to my configuration. And somehow I found the overflow flag, overrun flag and full flag of FIFO0 are all set via the EmbSysRegister. And the PWM duty didn't change as I want.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know whether I&amp;nbsp;read the FIFO correctly. I'm quite confused about this FIFO and I want to know whether there are some methods to check the correctness of my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Max Lee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Mar 2018 06:42:50 GMT</pubDate>
    <dc:creator>maxlee</dc:creator>
    <dc:date>2018-03-23T06:42:50Z</dc:date>
    <item>
      <title>Problem of access FIFO of CTU with it works at dual conversion mode</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Problem-of-access-FIFO-of-CTU-with-it-works-at-dual-conversion/m-p/727598#M9826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to test the FlexPWM- CTU-ADC program. I configured the CTU for triggering on FlexPWM MRS and generate the Trigger0 to send 3 ADC dual conversion commands, and the results are saved in FIFO0. I set the threshold of FIFO0 to 5 and enable the FIFO0 overflow interrupt. Here is my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Configuration of CTU&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#define CTU0_TGSISR 0x00000001 /* Input 0 Rising Edge Enable - FlexPWM0_MRS */&lt;BR /&gt;#define CTU0_TGSCR 0x0000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Triggered Mode */&lt;BR /&gt;#define CTU0_T0CR 0x0000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* ADC and SGEN - same time with MRS*/&lt;BR /&gt;#define CTU0_TGSCCR 0x3E80&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* TGS Counter Compare Value - 16000 DEC - 100us */&lt;BR /&gt;#define CTU0_CLCR1 0x00000000&amp;nbsp; &amp;nbsp;/* Trigger 0 Commands List 1st command address */&lt;BR /&gt;#define CTU0_THCR1 0x00000065&amp;nbsp;&amp;nbsp; /* T0_E - T0_T2E - T0_ADCE */&lt;BR /&gt;#define CTU0_COTR 0x0064&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; /* Control ON-Time and Guard Time for external trigger */&lt;BR /&gt;#define CTU0_CTU0CR 0x0003&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; /* General Reload Enable - TGS Input Selection Register Reload Enable */&lt;BR /&gt;#define CTU0_CLR0 0x218B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* PhaseA current ADC0_CH11 - PhaseB current ADC1_CH12 - FIFO_0 */&lt;BR /&gt;#define CTU0_CLR1 0x21C1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* DC bus current ADC0_CH1 - DC bus voltage ADC1_CH14 - FIFO_0 */&lt;BR /&gt;#define CTU0_CLR2 0x20C0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Resolver sin ADC0_CH0 -&amp;nbsp;Pot&amp;nbsp;ADC1_CH6 - FIFO_0 */&lt;BR /&gt;#define CTU0_CLR3 0x4000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Last command */&lt;BR /&gt;#define CTU0_FTH 0x0005&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* FIFO_0 threshold is 5 to accept 6 ADC results */&lt;BR /&gt;#define CTU0_FCR 0x0004&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* FIFO 0 threshold overflow interrupt enable */&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;FIFO0_ISR&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;void FIFO0_ISR(void)&lt;BR /&gt;{&lt;BR /&gt; SIUL2.GPDO[42].R = 1;&lt;BR /&gt; uint32_t fifo_status;&lt;/P&gt;&lt;P&gt;fifo_status = CTU_0.FST.R &amp;amp; 0xf;&lt;/P&gt;&lt;P&gt;if (fifo_status == 4) // if overflow&lt;BR /&gt; {&lt;BR /&gt; Result[0] = (uint32_t)CTU_0.FR[0].R;&lt;BR /&gt; Result[1] = (uint32_t)CTU_0.FL[0].R;&lt;BR /&gt; Result[2] = (uint32_t)CTU_0.FR[0].R;&lt;BR /&gt; Result[3] = (uint32_t)CTU_0.FL[0].R;&lt;BR /&gt; Result[4] = (uint32_t)CTU_0.FR[0].R;&lt;BR /&gt; Result[5] = (uint32_t)CTU_0.FL[0].R;&lt;BR /&gt; FlexPWM_0.SUB[0].VAL3.R = (uint16_t)(Result[5] &amp;amp; 0xfff);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// use the value of pot to change the duty of PWM&lt;/P&gt;&lt;P&gt;FlexPWM_0.MCTRL.B.LDOK = 0x7;&lt;/P&gt;&lt;P&gt;CTU_0.CR.B.GRE = 1; // CTU General Reload Enable&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;if (fifo_status == 8) // if overrun&lt;BR /&gt; {&lt;BR /&gt; CTU_0.FST.R = 8; // clear overrun flag&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;SIUL2.GPDO[42].R = 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;According to my configuration, there will be 6 ADC results saved in CTU_FIFO0 every time the overflow interrupt happened. And the last result entered in FIFO0 should be the value of the Pot(PE12).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I debug the project, I find the FIFO0_FR0 has the result of ADC0_CH11 and FIFO0_FL0&amp;nbsp;&lt;SPAN&gt;has the result of ADC1_CH12, these are&amp;nbsp;conform to my configuration. And somehow I found the overflow flag, overrun flag and full flag of FIFO0 are all set via the EmbSysRegister. And the PWM duty didn't change as I want.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know whether I&amp;nbsp;read the FIFO correctly. I'm quite confused about this FIFO and I want to know whether there are some methods to check the correctness of my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Max Lee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 06:42:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Problem-of-access-FIFO-of-CTU-with-it-works-at-dual-conversion/m-p/727598#M9826</guid>
      <dc:creator>maxlee</dc:creator>
      <dc:date>2018-03-23T06:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem of access FIFO of CTU with it works at dual conversion mode</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Problem-of-access-FIFO-of-CTU-with-it-works-at-dual-conversion/m-p/727599#M9827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is for sure some missconfiguration in your code.&lt;/P&gt;&lt;P&gt;As the CTU FIFO is commonly used by customers.&lt;/P&gt;&lt;P&gt;We have posted reference example for it here on forum:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-104570"&gt;Example MPC5744P FlexPWM CTU ADC synchronization&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I have also wrote and document for this thema:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-102559"&gt;https://community.nxp.com/docs/DOC-102559&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MPC5643L implementation is same for MPC5744P. So you can use this document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After studying this, If you still struggle feel free to share your compiled code (even binary output file is ok), so I can check where is your issue on my board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2018 08:14:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Problem-of-access-FIFO-of-CTU-with-it-works-at-dual-conversion/m-p/727599#M9827</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2018-03-29T08:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem of access FIFO of CTU with it works at dual conversion mode</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Problem-of-access-FIFO-of-CTU-with-it-works-at-dual-conversion/m-p/727600#M9828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right. I&amp;nbsp;found a minor&amp;nbsp;mistake in my code and I've solved this problem. Everything work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2018 08:55:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Problem-of-access-FIFO-of-CTU-with-it-works-at-dual-conversion/m-p/727600#M9828</guid>
      <dc:creator>maxlee</dc:creator>
      <dc:date>2018-04-04T08:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem of access FIFO of CTU with it works at dual conversion mode</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Problem-of-access-FIFO-of-CTU-with-it-works-at-dual-conversion/m-p/727601#M9829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I had the same problem as Max Lee ,but by studying the two routines you provided, but no configuration errors were found.Here is my code.I just need to get three ADC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void CTU_Init(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Enable input */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.TGSISR.R = 0x00000001; /*I1_RE*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Compare registers */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.TCR[0].R = 160;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Counter */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.TGSCCR.R = 4000;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.TGSCRR.R = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.TGSCR.R&amp;nbsp; = 0x0100;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Prescaler Value is 1 and Triggered Mode */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Enable triggers */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.THCR1.R&amp;nbsp; = 0x00000061; /* Enable Triger 0 and set to ADC */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set ADC messages */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.CLR[0].A.R = 0x4000;/* Command 0 - last command in command sequence,sample ADC0-CH0, result to FIFO0 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.CLR[1].A.R = 0x0002;/* Command 1 - first command in command sequence, sample ADC0-CH2, result to FIFO0 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.CLR[2].A.R = 0x0007;/* Command 2 - next command in command sequence,sample ADC0-CH7, result to FIFO0 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.CLR[3].A.R = 0x4000; /* stop the sequence, first command of second sequence which is not started */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.FTH.R = 0x00000002; /* set FIFO 0 threshold to 2, overflow is set when 3 results comes */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.FCR.R = 0x00000004; /* FIFO 0 threshold overflow interrupt enable */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.CR.R = 0x0003; /* General reload and TGS input selection reload */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void FUN_HW_CTU_FIFO0_INTC(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; uint32_t fifo_status;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fifo_status = CTU_0.FST.R &amp;amp; 0xf;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fifo_status == 4)&amp;nbsp;&amp;nbsp; &amp;nbsp;// if overflow&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HW_AD_CRTA_u16 = (u16) (CTU_0.FR[0].R &amp;amp; 0xfff);//ADC_0.CDR[0].B.CDATA;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;HW_AD_CRTC_u16 = (u16) (CTU_0.FR[0].R &amp;amp; 0xfff);//ADC_0.CDR[2].B.CDATA&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HW_AD_CRTB_u16 = (u16) (CTU_0.FR[0].R &amp;amp; 0xfff);//ADC_0.CDR[7].B.CDATA;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CTU_0.CR.B.GRE&amp;nbsp; = 1;&amp;nbsp;&amp;nbsp; &amp;nbsp;// CTU General Reload Enable&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fifo_status == 8)&amp;nbsp;&amp;nbsp; &amp;nbsp;// if overrun&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CTU_0.FST.R = 8;&amp;nbsp;&amp;nbsp; &amp;nbsp;// clear overrun flag&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;CTU_EFR = CTU_0.EFR.R;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2019 06:21:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Problem-of-access-FIFO-of-CTU-with-it-works-at-dual-conversion/m-p/727601#M9829</guid>
      <dc:creator>ybb34713</dc:creator>
      <dc:date>2019-12-09T06:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem of access FIFO of CTU with it works at dual conversion mode</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Problem-of-access-FIFO-of-CTU-with-it-works-at-dual-conversion/m-p/1156875#M16549</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/125513"&gt;@maxlee&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I know it's been two years since this post, but can you please detail the issue that caused this behaviour?&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Marius&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 10:26:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Problem-of-access-FIFO-of-CTU-with-it-works-at-dual-conversion/m-p/1156875#M16549</guid>
      <dc:creator>mariuslucianand</dc:creator>
      <dc:date>2020-09-22T10:26:45Z</dc:date>
    </item>
  </channel>
</rss>

