<?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: MPC5606S UART Interrupt problem in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618483#M5331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested your project on my side and it works correct to me. I have the same condition, CodeWarrior 10.7, USB Multilink and MPC5606S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Could you please try to create new empty project, compile for Flash target and try to download into the microcontroller?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Try to disconnect USB cable from USB multilink, wait for a while and connect it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Also could you please check PEMicro drivers and eventually update it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you get any other error than the one you posted above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Mar 2017 15:27:34 GMT</pubDate>
    <dc:creator>martin_kovar</dc:creator>
    <dc:date>2017-03-09T15:27:34Z</dc:date>
    <item>
      <title>MPC5606S UART Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618478#M5326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am trying to use MPC5606S UART&amp;nbsp;interrupt function, but can not enter the interrupt service program.&lt;/P&gt;&lt;P&gt;It can not enter the interrupt function to send（&amp;nbsp; void UART1_TransmitComplete(void)） and receive（void UART1_ReceiveComplete(void)） interrupt function, attachment is my project, please help me to see where the problem?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;#include "MPC5606S.h"&lt;BR /&gt;#include "IntcInterrupts.h"&lt;/P&gt;&lt;P&gt;int counterTX = 0;&lt;BR /&gt;int counterRX = 0;&lt;BR /&gt;char receiveBuffer[20];&lt;/P&gt;&lt;P&gt;void initModesAndClock(void) ;&lt;BR /&gt;void disableWatchdog(void);&lt;BR /&gt;void initPeriClkGen(void) ;&lt;BR /&gt;void UART1_Init(void);&lt;BR /&gt;void UART1_SendData(char data);&lt;BR /&gt;void UART1_TransmitComplete(void);&lt;BR /&gt;void UART1_ReceiveComplete(void);&lt;/P&gt;&lt;P&gt;void initModesAndClock(void) &lt;BR /&gt; {&lt;BR /&gt; //h04_GpioInit();&lt;BR /&gt; ME.MER.R = 0x0000001D; /* Enable DRUN, RUN0, SAFE, RESET modes */&lt;BR /&gt; /* Initialize PLL before turning it on: */&lt;BR /&gt; CGM.FMPLL[0].CR.R = 0x02400100; /* 8 MHz xtal: Set PLL0 to 64 MHz */ &lt;BR /&gt; ME.RUN[0].R = 0x001F0074; /* RUN0 cfg: 16MHzIRCON,OSC0ON,PLL0ON,syclk=PLL0 */&lt;BR /&gt; ME.RUNPC[1].R = 0x00000010; /* Peri. Cfg. 1 settings: only run in RUN0 mode */ &lt;BR /&gt; //ME.PCTL[32].R = 0x01; /* MPC56xxB/P/S ADC 0: select ME.RUNPC[1] */ &lt;BR /&gt; ME.PCTL[68].R = 0x01; /* MPC56xxB/S SIU: select ME.RUNPC[1] */ &lt;BR /&gt; ME.PCTL[49].R = 0x01; /* MPC56xxB/P/S FLEX1 : select ME.RUNPC[1] */ &lt;BR /&gt; /* Mode Transition to enter RUN0 mode: */&lt;BR /&gt; ME.MCTL.R = 0x40005AF0; /* Enter RUN0 Mode &amp;amp; Key */&lt;BR /&gt; ME.MCTL.R = 0x4000A50F; /* Enter RUN0 Mode &amp;amp; Inverted Key */ &lt;BR /&gt; while (ME.GS.B.S_MTRANS) {} /* Wait for mode transition to complete */ &lt;BR /&gt; /* Note: could wait here using timer and/or I_TC IRQ */&lt;BR /&gt; while(ME.GS.B.S_CURRENTMODE != 4) {} /* Verify RUN0 is the current mode */&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;void disableWatchdog(void) &lt;BR /&gt; {&lt;BR /&gt; SWT.SR.R = 0x0000c520; /* Write keys to clear soft lock bit */&lt;BR /&gt; SWT.SR.R = 0x0000d928; &lt;BR /&gt; SWT.CR.R = 0x8000010A; /* Clear watchdog enable (WEN) */&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;void initPeriClkGen(void) &lt;BR /&gt; {&lt;BR /&gt; CGM.SC_DC[0].R = 0x80; &lt;BR /&gt; CGM.SC_DC[1].R = 0x80; &lt;BR /&gt; CGM.SC_DC[2].R = 0x80; &lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; void UART1_Init(void)&lt;BR /&gt; {&lt;BR /&gt; volatile int i = 0;&lt;/P&gt;&lt;P&gt;LINFLEX_1.LINCR1.B.INIT = 1;&lt;BR /&gt; LINFLEX_1.LINCR1.B.SLEEP = 0;&lt;BR /&gt; &lt;BR /&gt; LINFLEX_1.LINIBRR.R = 0x000001A0; //baud rate 9600b/s (fsys 64MHz)&lt;BR /&gt; LINFLEX_1.LINFBRR.R = 0x0000000B;&lt;BR /&gt; &lt;BR /&gt; LINFLEX_1.UARTCR.B.UART = 1; //enable UART mode&lt;BR /&gt; LINFLEX_1.UARTCR.B.WL = 1; //set 8-bit data&lt;BR /&gt; &lt;BR /&gt; LINFLEX_1.UARTCR.B.TXEN = 1; //enable transmitter&lt;BR /&gt; LINFLEX_1.UARTCR.B.TDFL = 0b00; //set transmitter buffer (1)&lt;BR /&gt; LINFLEX_1.LINIER.B.DTIE = 1; //Transmit interrupt enable&lt;BR /&gt; &lt;BR /&gt; LINFLEX_1.UARTCR.B.RXEN = 1; //enable transmitter&lt;BR /&gt; LINFLEX_1.UARTCR.B.RDFL = 0b00; //set transmitter buffer (1) &lt;BR /&gt; &lt;BR /&gt; LINFLEX_1.LINIER.B.DRIE = 1; //Receive interrupt enable&lt;BR /&gt; &lt;BR /&gt; LINFLEX_1.LINCR1.B.INIT = 0; //disable init mode&lt;BR /&gt; for(i ; i &amp;lt; 5000; i++) //wait fo apply settings&lt;BR /&gt; {&lt;BR /&gt; &lt;BR /&gt; } &lt;BR /&gt; }&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; void UART1_SendData(char data)&lt;BR /&gt; {&lt;BR /&gt; LINFLEX_1.BDRL.B.DATA0 = data; //send data&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;void UART1_TransmitComplete(void)&lt;BR /&gt; {&lt;BR /&gt; LINFLEX_1.UARTSR.R = 0x00000002; //clear interrupt flag&lt;BR /&gt; &lt;BR /&gt; if(counterTX &amp;lt; 20) //check if less then 20 char was sent&lt;BR /&gt; {&lt;BR /&gt; UART1_SendData((char)counterTX); //send next data after received&lt;BR /&gt; counterTX++;&lt;BR /&gt; } &lt;BR /&gt; }&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; void UART1_ReceiveComplete(void)&lt;BR /&gt; {&lt;BR /&gt; LINFLEX_1.UARTSR.R = 0x00000004; //clear interrupt flag&lt;BR /&gt; &lt;BR /&gt; receiveBuffer[counterRX] = LINFLEX_1.BDRM.B.DATA4; //copy received data to receiveBuffer&lt;BR /&gt; &lt;BR /&gt; counterRX++; &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;int main(void) {&lt;BR /&gt; volatile int i = 0,j=0;&lt;/P&gt;&lt;P&gt;initModesAndClock(); /* Initialize mode entries and system clock */&lt;BR /&gt; disableWatchdog(); /* Disable watchdog */&lt;BR /&gt; initPeriClkGen(); /* Initialize peripheral clock generation for DSPIs */&lt;BR /&gt; &lt;BR /&gt; UART1_Init();&lt;BR /&gt; SIU.PCR[29].R = 0x0600; //LIN1 TX&lt;BR /&gt; SIU.PCR[28].R = 0x0100; //LIN1 RX&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; INTC_InstallINTCInterruptHandler(UART1_ReceiveComplete,99,15);&lt;BR /&gt; INTC_InstallINTCInterruptHandler(UART1_TransmitComplete,100,14);&lt;BR /&gt; &lt;BR /&gt; INTC.CPR.R = 0; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; UART1_SendData((char)counterTX);&lt;BR /&gt; &lt;BR /&gt; /* Loop forever */&lt;BR /&gt; while(1)&lt;BR /&gt; {&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338320"&gt;MPC5606S-UART_Interrupt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2017 04:42:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618478#M5326</guid>
      <dc:creator>skysword</dc:creator>
      <dc:date>2017-03-03T04:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5606S UART Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618479#M5327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flash target works correct. If you want to use RAM target, you have to modify RAM_VLE.prefix in your project and recompile it. Please see figure below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15581i31FD43EBA0D584D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Mar 2017 09:46:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618479#M5327</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-03-03T09:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5606S UART Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618480#M5328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Thank you for solving my problem.&lt;/P&gt;&lt;P&gt;Use RAM target,In accordance with your way to modify the &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt; RAM_VLE.prefix&lt;/SPAN&gt; can work properly .&lt;/P&gt;&lt;P&gt;But when I use flash target to debug, the emergence of such a mistake, this is why?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15019iC14F47E47B1A3AFB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a problem with you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Mar 2017 01:37:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618480#M5328</guid>
      <dc:creator>skysword</dc:creator>
      <dc:date>2017-03-04T01:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5606S UART Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618481#M5329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this error appears only, if you use Flash target? Is it correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Was the code for flash target correctly compiled? Which debug probe you use? Did you try to exit CodeWarrior, start it again and connect to board? Sometimes some strange mistakes appears with PEMicro debug probe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please write me back as much details as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2017 07:33:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618481#M5329</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-03-08T07:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5606S UART Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618482#M5330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Yes, when I used flash target just this error.&lt;/P&gt;&lt;P&gt;The code can be compiled correctly under flash target.I don't know what probe is, because I use this CodeWarrior time is not too long.I tried many times to exit CodeWarrior, and then restart the connection board, but the same phenomenon.&lt;/P&gt;&lt;P&gt;My IDE is codewarrior 10.7.&lt;/P&gt;&lt;P&gt;Microcontroller is MPC5606S.&lt;/P&gt;&lt;P&gt;Debugging tool is PE micro USB multilink.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;Annex is the project I use. You can give me a project, the right to use flash target debugging.&lt;/P&gt;&lt;P&gt;&amp;nbsp;suspect that there are errors in my engineering parameters. Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 01:57:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618482#M5330</guid>
      <dc:creator>skysword</dc:creator>
      <dc:date>2017-03-09T01:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5606S UART Interrupt problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618483#M5331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested your project on my side and it works correct to me. I have the same condition, CodeWarrior 10.7, USB Multilink and MPC5606S.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Could you please try to create new empty project, compile for Flash target and try to download into the microcontroller?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Try to disconnect USB cable from USB multilink, wait for a while and connect it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Also could you please check PEMicro drivers and eventually update it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you get any other error than the one you posted above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 15:27:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5606S-UART-Interrupt-problem/m-p/618483#M5331</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-03-09T15:27:34Z</dc:date>
    </item>
  </channel>
</rss>

