<?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>LPC MicrocontrollersのトピックRe: UART3 and CMSIS</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/UART3-and-CMSIS/m-p/520404#M3623</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Homayon on Sun Jun 08 09:07:51 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I've enabled PCONP register. The problem is not&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:43:15 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:43:15Z</dc:date>
    <item>
      <title>UART3 and CMSIS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/UART3-and-CMSIS/m-p/520402#M3621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Homayon on Sun Jun 08 08:14:22 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I wrote a program to launch UART3 with CMSIS but does not work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But UART0, 1 do they do. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In your opinion, where is my problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca" style="border:1px solid black;background-color:#cacaca;border:1px solid black;background-color:#cacaca;background-color:#cacaca;border:1px solid black;background-color:#cacaca;border:1px solid black;"&gt; &lt;PRE&gt;#include &amp;lt;lpc17xx.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;ctype.h&amp;gt;
#include "LPC17xx_pinsel.h"
#include "LPC17xx_uart.h"
#include "debug_frmwrk.h"

char Buffer0[500];
char Buffer1[500];
char Buffer3[500];
char lcd[20];
uint8_t input0;
uint8_t input1;
uint8_t input3;

void upper(char Buf[],int LeN){// tabe tabdel horofef kochaak be bozorg
for(LeN=0;LeN&amp;lt;501;LeN++){
Buf[LeN]=toupper(Buf[LeN]);
}
}

void C_buf(char Buf[]){// Empty Buffer
int LeN;
LeN=strlen(Buf);
for(LeN=0;LeN&amp;lt;501;LeN++){
Buf[LeN]=0;
}
}
//************************************************************************
void UART0_IRQHandler(void)
{
int A;
input0 = UART_ReceiveByte(LPC_UART0);
if(input0&amp;gt;0x20 &amp;amp; input0&amp;lt;0x7f){
A=strlen(Buffer0);
&amp;nbsp; Buffer0[A]=input0;
upper(Buffer0,500);
&amp;nbsp; UARTPuts_(LPC_UART0,Buffer0);
//UARTPuts_(LPC_UART0,"HOMAYON");
}
}
//************************************************************************
void UART1_IRQHandler(void)
{
int A;
input1 = UART_ReceiveByte((LPC_UART_TypeDef*)LPC_UART1);
if(input1&amp;gt;0x20 &amp;amp; input1&amp;lt;0x7f){
A=strlen(Buffer1);
&amp;nbsp; Buffer1[A]=input1;
upper(Buffer1,500);

&amp;nbsp; UARTPuts_(LPC_UART0,Buffer1);
//UARTPuts_((LPC_UART_TypeDef *)LPC_UART1, Buffer1);
}
}
//************************************************************************
void UART3_IRQHandler(void)
{
int A;
input3 = UART_ReceiveByte(LPC_UART3);
if(input3&amp;gt;0x20 &amp;amp; input3&amp;lt;0x7f){
A=strlen(Buffer3);
&amp;nbsp; Buffer3[A]=input3;
upper(Buffer3,500);

&amp;nbsp; UARTPuts_(LPC_UART3,Buffer3);
//UARTPuts_((LPC_UART_TypeDef *)LPC_UART1, Buffer1);
}
}

int main(void){
int len;
UART_CFG_Type UART_InitStruct;
UART_FIFO_CFG_Type UARTFIFOConfigStruct;
PINSEL_CFG_Type PinCfg;
uint32_t CLKPWR_PCONP_PCUART3;
debug_frmwrk_init();
//-------------------------&amp;nbsp;&amp;nbsp;&amp;nbsp; UART0&amp;nbsp;&amp;nbsp; -----------------------------------------------------------

UARTFIFOConfigStruct.FIFO_DMAMode = DISABLE;
UARTFIFOConfigStruct.FIFO_Level = UART_FIFO_TRGLEV0;
UARTFIFOConfigStruct.FIFO_ResetRxBuf = ENABLE;
UARTFIFOConfigStruct.FIFO_ResetTxBuf = ENABLE;

UART_FIFOConfig(LPC_UART0, &amp;amp;UARTFIFOConfigStruct);
UART_IntConfig(LPC_UART0, UART_INTCFG_RBR, ENABLE);

NVIC_EnableIRQ(UART0_IRQn);
UART_TxCmd(LPC_UART0,ENABLE);

//-------------------------&amp;nbsp;&amp;nbsp;&amp;nbsp; UART1&amp;nbsp;&amp;nbsp; -----------------------------------------------------------

PinCfg.Portnum=2;
PinCfg.Pinnum=0;
PinCfg.Funcnum=2;
PinCfg.OpenDrain=0;
PinCfg.Pinmode=0;
PINSEL_ConfigPin(&amp;amp;PinCfg);//TXD1
PinCfg.Pinnum=1;
PINSEL_ConfigPin(&amp;amp;PinCfg);//RXD1


UART_InitStruct.Baud_rate=9600;
UART_InitStruct.Databits = UART_DATABIT_8;
UART_InitStruct.Parity = UART_PARITY_NONE;
UART_InitStruct.Stopbits = UART_STOPBIT_1;


UART_Init((LPC_UART_TypeDef *)LPC_UART1, &amp;amp;UART_InitStruct);
UART_FIFOConfig((LPC_UART_TypeDef *)LPC_UART1, &amp;amp;UARTFIFOConfigStruct);
UART_IntConfig((LPC_UART_TypeDef *)LPC_UART1, UART_INTCFG_RBR, ENABLE);

NVIC_EnableIRQ(UART1_IRQn);
UART_TxCmd((LPC_UART_TypeDef *)LPC_UART1, ENABLE);

//-------------------------&amp;nbsp;&amp;nbsp;&amp;nbsp; UART3&amp;nbsp;&amp;nbsp; -----------------------------------------------------------

CLKPWR_ConfigPPWR(CLKPWR_PCONP_PCUART3,ENABLE);
PinCfg.Portnum=4;
PinCfg.Pinnum=28;
PinCfg.Funcnum=3;
PinCfg.OpenDrain=0;
PinCfg.Pinmode=0;
PINSEL_ConfigPin(&amp;amp;PinCfg);//TXD3
PinCfg.Pinnum=29;
PINSEL_ConfigPin(&amp;amp;PinCfg);//RXD3

UART_InitStruct.Baud_rate=115200;
UART_InitStruct.Databits = UART_DATABIT_8;
UART_InitStruct.Parity = UART_PARITY_NONE;
UART_InitStruct.Stopbits = UART_STOPBIT_1;


UART_Init(LPC_UART3, &amp;amp;UART_InitStruct);
UART_FIFOConfig(LPC_UART3, &amp;amp;UARTFIFOConfigStruct);
UART_IntConfig(LPC_UART3, UART_INTCFG_RBR, ENABLE);


NVIC_EnableIRQ(UART3_IRQn);
UART_TxCmd(LPC_UART3, ENABLE);

//---------------------------------------------------------------------------------------------


while(1){
UARTPuts_(LPC_UART3,"HOMAYON");
UART_Send(LPC_UART3,"HOMAYON",7,BLOCKING);
len=strlen(Buffer0);
if(len&amp;gt;200){
C_buf(Buffer0);
}

}
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;BR /&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-337965" rel="nofollow noopener noreferrer" target="_blank"&gt;RS485%20%5B1%5D.rar&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:43:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/UART3-and-CMSIS/m-p/520402#M3621</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: UART3 and CMSIS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/UART3-and-CMSIS/m-p/520403#M3622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Sun Jun 08 08:24:45 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Homayon&lt;/STRONG&gt;&lt;BR /&gt;In your opinion, where is my problem?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Usually PCONP:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fusing-uart3" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/using-uart3&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:43:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/UART3-and-CMSIS/m-p/520403#M3622</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: UART3 and CMSIS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/UART3-and-CMSIS/m-p/520404#M3623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Homayon on Sun Jun 08 09:07:51 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I've enabled PCONP register. The problem is not&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:43:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/UART3-and-CMSIS/m-p/520404#M3623</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: UART3 and CMSIS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/UART3-and-CMSIS/m-p/520405#M3624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Sun Jun 08 09:45:48 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you scope P[4]28 already?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:43:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/UART3-and-CMSIS/m-p/520405#M3624</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:43:16Z</dc:date>
    </item>
  </channel>
</rss>

