<?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: LPUART0_RxTx_IRQHandler</title>
    <link>https://community.nxp.com/t5/S32K/LPUART0-RxTx-IRQHandler/m-p/861010#M3722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kevin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added a comment in my post.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/473706"&gt;Receiving multiple bytes with LPUART0 interrupt&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Jing Yin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Feb 2019 01:16:02 GMT</pubDate>
    <dc:creator>jingyinwong</dc:creator>
    <dc:date>2019-02-15T01:16:02Z</dc:date>
    <item>
      <title>LPUART0_RxTx_IRQHandler</title>
      <link>https://community.nxp.com/t5/S32K/LPUART0-RxTx-IRQHandler/m-p/861009#M3721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dear reader(s),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For s32k146, I have set up three UART[0,1,2] ports almost the same way except the NVIC portion (vector location).&amp;nbsp; Rx Isr was called in UART1 and UART2.&amp;nbsp; But the Rx Isr for UART0 has never been called, and yet Rx() &amp;amp; Tx() works perfectly. I can use Tx() and Rx() on UART0 with no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below codes are for UART0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideal?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void LPUART0_PORT_init(void)&lt;BR /&gt;{&lt;BR /&gt; /*!&lt;BR /&gt; * Pins definitions&lt;BR /&gt; * ===================================================&lt;BR /&gt; *&lt;BR /&gt; * Pin number | Function&lt;BR /&gt;*&lt;BR /&gt; * Possible pin location&lt;BR /&gt; * PTB1 | UART0 TX Mapped to pin 10 on J4&lt;BR /&gt; * PTB0 | UART0 RX Mapped to pin 7 on J4&lt;BR /&gt; */&lt;/P&gt;&lt;P&gt;PCC-&amp;gt;PCCn[PCC_PORTC_INDEX ]|=PCC_PCCn_CGC_MASK; /* Enable clock for PORTC */&lt;BR /&gt; PORTC-&amp;gt;PCR[3]|=PORT_PCR_MUX(4); /* Port C3: MUX = ALT4, UART0 TX */&lt;BR /&gt; PORTC-&amp;gt;PCR[2]|=PORT_PCR_MUX(4); /* Port C2: MUX = ALT4, UART0 RX */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void LPUART0_NVIC_init_IRQs(void)&lt;BR /&gt;{&lt;BR /&gt; S32_NVIC-&amp;gt;ICPR[1] = 1 &amp;lt;&amp;lt; (31 % 32); /* IRQ31: clr any pending IRQ*/&lt;BR /&gt; S32_NVIC-&amp;gt;ISER[1] = 1 &amp;lt;&amp;lt; (31 % 32); /* IRQ31: enable IRQ */&lt;BR /&gt; S32_NVIC-&amp;gt;IP[31] = 0xA; /* IRQ31: priority 10 of 0-15*/&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void LPUART0_init(void) /* Init. summary: 9600 baud, 1 stop bit, 8 bit format, no parity */&lt;BR /&gt;{&lt;BR /&gt; PCC-&amp;gt;PCCn[PCC_LPUART0_INDEX] &amp;amp;= ~PCC_PCCn_CGC_MASK; /* Ensure clk disabled for config */&lt;/P&gt;&lt;P&gt;PCC-&amp;gt;PCCn[PCC_LPUART0_INDEX] |= PCC_PCCn_PCS(2) /* Clock Src = 2 (SIRCDIV2_CLK) */&lt;BR /&gt; | PCC_PCCn_CGC_MASK; /* Enable clock for LPUART0 regs */&lt;/P&gt;&lt;P&gt;LPUART0-&amp;gt;BAUD = LPUART_BAUD_SBR(0x34) /* Initialize for 9600 baud, 1 stop: */&lt;BR /&gt; |LPUART_BAUD_RXEDGIE(1) /* Enable Rx interrupt */&lt;BR /&gt; |LPUART_BAUD_OSR(15); /* SBR=52 (0x34): baud divisor = 8M/9600/16 = ~52 */&lt;BR /&gt; /* OSR=15: Over sampling ratio = 15+1=16 */&lt;BR /&gt; /* SBNS=0: One stop bit */&lt;BR /&gt; /* BOTHEDGE=0: receiver samples only on rising edge */&lt;BR /&gt; /* M10=0: Rx and Tx use 7 to 9 bit data characters */&lt;BR /&gt; /* RESYNCDIS=0: Resync during rec'd data word supported */&lt;BR /&gt; /* LBKDIE, RXEDGIE=0: interrupts disable */&lt;BR /&gt; /* TDMAE, RDMAE, TDMAE=0: DMA requests disabled */&lt;BR /&gt; /* MAEN1, MAEN2, MATCFG=0: Match disabled */&lt;/P&gt;&lt;P&gt;LPUART0-&amp;gt;CTRL = LPUART_CTRL_RIE_MASK&lt;BR /&gt; |LPUART_CTRL_RE_MASK /* Bit 18 Receiver Enable*/&lt;BR /&gt; |LPUART_CTRL_TE_MASK; /* Bit 19 Transmitter Enable*/&lt;BR /&gt; /* Enable transmitter &amp;amp; receiver, no parity, 8 bit char: */&lt;BR /&gt; /* RE=1: Receiver enabled */&lt;BR /&gt; /* TE=1: Transmitter enabled */&lt;BR /&gt; /* PE,PT=0: No hw parity generation or checking */&lt;BR /&gt; /* M7,M,R8T9,R9T8=0: 8-bit data characters*/&lt;BR /&gt; /* DOZEEN=0: LPUART enabled in Doze mode */&lt;BR /&gt; /* ORIE,NEIE,FEIE,PEIE,TIE,TCIE,RIE,ILIE,MA1IE,MA2IE=0: no IRQ*/&lt;BR /&gt; /* TxDIR=0: TxD pin is input if in single-wire mode */&lt;BR /&gt; /* TXINV=0: TRansmit data not inverted */&lt;BR /&gt; /* RWU,WAKE=0: normal operation; rcvr not in statndby */&lt;BR /&gt; /* IDLCFG=0: one idle character */&lt;BR /&gt; /* ILT=0: Idle char bit count starts after start bit */&lt;BR /&gt; /* SBK=0: Normal transmitter operation - no break char */&lt;BR /&gt; /* LOOPS,RSRC=0: no loop back */&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2019 21:42:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPUART0-RxTx-IRQHandler/m-p/861009#M3721</guid>
      <dc:creator>klau</dc:creator>
      <dc:date>2019-02-13T21:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART0_RxTx_IRQHandler</title>
      <link>https://community.nxp.com/t5/S32K/LPUART0-RxTx-IRQHandler/m-p/861010#M3722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kevin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have added a comment in my post.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/473706"&gt;Receiving multiple bytes with LPUART0 interrupt&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Jing Yin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2019 01:16:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPUART0-RxTx-IRQHandler/m-p/861010#M3722</guid>
      <dc:creator>jingyinwong</dc:creator>
      <dc:date>2019-02-15T01:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART0_RxTx_IRQHandler</title>
      <link>https://community.nxp.com/t5/S32K/LPUART0-RxTx-IRQHandler/m-p/861011#M3723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kevin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The NVIC init function is not completely correct. The NVIC non-IPR register number is 0 for LPUART0.&lt;/P&gt;&lt;P&gt;For the LPUART1 and LPUART2 is this value 1. You can refer to&lt;EM&gt; S32K1xx_DMA_Interrupt_mapping&lt;/EM&gt; document attached in the RM rev 9.&lt;/P&gt;&lt;P&gt;And the priority level should&amp;nbsp;be set as 0xA0 in your case because for the priority level we need to set&amp;nbsp;4 MSB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;S32_NVIC-&amp;gt;ICPR[0] = 1 &amp;lt;&amp;lt; (31 % 32); /* IRQ31: clr any pending IRQ*/&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;S32_NVIC-&amp;gt;ISER[0] = 1 &amp;lt;&amp;lt; (31 % 32); /* IRQ31: enable IRQ */&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;S32_NVIC-&amp;gt;IP[31] = 0xA0; /* IRQ31: priority 10 of 0-15*/&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to add a universal function:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P style="margin: 2.0pt 0in 2.0pt 0in;"&gt;&lt;SPAN style="color: #7f0055; font-size: 10.0pt;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; &lt;STRONG&gt;Enable_Interrupt&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #005032;"&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt; vector_number, uint8_t priority)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2.0pt 0in 2.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2.0pt 0in 2.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S32_NVIC-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #0000c0;"&gt;ICPR&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;[vector_number / 32] = (1 &amp;lt;&amp;lt; (vector_number % 32));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2.0pt 0in 2.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S32_NVIC-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #0000c0;"&gt;ISER&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;[vector_number / 32] = (1 &amp;lt;&amp;lt; (vector_number % 32));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2.0pt 0in 2.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S32_NVIC-&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #0000c0;"&gt;IP&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;[vector_number] = (priority &amp;lt;&amp;lt; 4);&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3f7f5f;"&gt;// Priority level 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 2.0pt 0in 2.0pt 0in;"&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe it helps you.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2019 12:45:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPUART0-RxTx-IRQHandler/m-p/861011#M3723</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2019-02-15T12:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART0_RxTx_IRQHandler</title>
      <link>https://community.nxp.com/t5/S32K/LPUART0-RxTx-IRQHandler/m-p/861012#M3724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Diana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have changed the mentioned function as below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void LPUART0_NVIC_init_IRQs(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;S32_NVIC-&amp;gt;ICPR[1] = 1 &amp;lt;&amp;lt; (31 % 32);  /* IRQ31: clr any pending IRQ*/&lt;/P&gt;&lt;P&gt;S32_NVIC-&amp;gt;ISER[1] = 1 &amp;lt;&amp;lt; (31 % 32);  /* IRQ31: enable IRQ */&lt;/P&gt;&lt;P&gt;S32_NVIC-&amp;gt;IP[31] = 0xA0;              /* IRQ31: priority 10 of 0-15*/&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I still do not see the ISR is called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the S32K146EVB, and got datasheets from here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/s32-automotive-platform/s32k146-evaluation-board:S32K146EVB" target="test_blank"&gt;https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/s32-automotive-platform/s32k146-evaluation-board:S32K146EVB&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can not find "&lt;STRONG&gt;S32K1xx_DMA_Interrupt_mapping&lt;/STRONG&gt; document attached in the RM&lt;/P&gt;&lt;P&gt;rev 9." there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you change "UART1" to "UART0" in the example project&lt;/P&gt;&lt;P&gt;"S32K146_Project_LPUART",&lt;/P&gt;&lt;P&gt;then try it please?&lt;/P&gt;&lt;P&gt;You also need to change the pins for this test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Fri, Feb 15, 2019 at 7:46 AM dianabatrlova &amp;lt;admin@community.nxp.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2019 14:53:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPUART0-RxTx-IRQHandler/m-p/861012#M3724</guid>
      <dc:creator>klau</dc:creator>
      <dc:date>2019-02-15T14:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: LPUART0_RxTx_IRQHandler</title>
      <link>https://community.nxp.com/t5/S32K/LPUART0-RxTx-IRQHandler/m-p/861013#M3725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Diana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I overlooked the value 0 in your last reply. Sorry about that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your suggestions actually make UART0 works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Fri, Feb 15, 2019 at 7:46 AM dianabatrlova &amp;lt;admin@community.nxp.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2019 17:17:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPUART0-RxTx-IRQHandler/m-p/861013#M3725</guid>
      <dc:creator>klau</dc:creator>
      <dc:date>2019-02-15T17:17:53Z</dc:date>
    </item>
  </channel>
</rss>

