<?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>Processor Expert Software中的主题 Async Serial: GetCharsInRxBuf never &amp;gt; 0</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/Async-Serial-GetCharsInRxBuf-never-gt-0/m-p/240026#M1304</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is wrong with the following picture??? It spits out "Hello World" but never receives any of my typing to echo!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;/*lint -restore Enable MISRA rule (6.3) checking. */&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static unsigned char bUARTdebugInputCount = 0 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LDD_TDeviceData * pUARTdebugDeviceDataStructure ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char strHelloWorld[] = "Hello, World!\r\nLEDsAsynchroSerial here!\r\n" ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte bReceivedByte ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned uCharsInRxBuf ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PE_low_level_init();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*** End of Processor Expert internal initialization.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Write your code here */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pUARTdebugDeviceDataStructure = ASerialLdd1_Init( NULL );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ASerialLdd1_SendBlock( pUARTdebugDeviceDataStructure, strHelloWorld, sizeof( strHelloWorld ) ) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while( ( uCharsInRxBuf = UARTdebug_GetCharsInRxBuf() ) &amp;gt; 0 ) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ++bUARTdebugInputCount ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UARTdebug_RecvChar( &amp;amp;bReceivedByte ) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UARTdebug_SendChar( bReceivedByte ) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Mar 2013 23:42:03 GMT</pubDate>
    <dc:creator>pklammer</dc:creator>
    <dc:date>2013-03-25T23:42:03Z</dc:date>
    <item>
      <title>Async Serial: GetCharsInRxBuf never &gt; 0</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Async-Serial-GetCharsInRxBuf-never-gt-0/m-p/240026#M1304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is wrong with the following picture??? It spits out "Hello World" but never receives any of my typing to echo!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;/*lint -restore Enable MISRA rule (6.3) checking. */&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static unsigned char bUARTdebugInputCount = 0 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LDD_TDeviceData * pUARTdebugDeviceDataStructure ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char strHelloWorld[] = "Hello, World!\r\nLEDsAsynchroSerial here!\r\n" ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte bReceivedByte ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned uCharsInRxBuf ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PE_low_level_init();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*** End of Processor Expert internal initialization.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Write your code here */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pUARTdebugDeviceDataStructure = ASerialLdd1_Init( NULL );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ASerialLdd1_SendBlock( pUARTdebugDeviceDataStructure, strHelloWorld, sizeof( strHelloWorld ) ) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while( ( uCharsInRxBuf = UARTdebug_GetCharsInRxBuf() ) &amp;gt; 0 ) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ++bUARTdebugInputCount ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UARTdebug_RecvChar( &amp;amp;bReceivedByte ) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UARTdebug_SendChar( bReceivedByte ) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 23:42:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Async-Serial-GetCharsInRxBuf-never-gt-0/m-p/240026#M1304</guid>
      <dc:creator>pklammer</dc:creator>
      <dc:date>2013-03-25T23:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Async Serial: GetCharsInRxBuf never &gt; 0</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Async-Serial-GetCharsInRxBuf-never-gt-0/m-p/240027#M1305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While waiting for help, I'm tracing code to see if I can figure it out myself ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following examples and documentation and help as best I could, I coded the line ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pUARTdebugDeviceDataStructure = ASerialLdd1_Init( NULL );&lt;/P&gt;&lt;P&gt;... not least because I needed that pointer-to-structure initialized to use on the next line for the SendBlock call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT!&lt;/P&gt;&lt;P&gt;I am very surprised to find, in Cpu.c/void PE_low_level_init(void) ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* ### Asynchro serial "UARTdebug" init code ... */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UARTdebug_Init();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __EI();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... and in void UARTdebug_Init(void) ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [...]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ASerialLdd1_DeviceDataPtr = ASerialLdd1_Init(NULL); /* Calling init method of the inherited component */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HWEnDi();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Enable/disable device according to status flags */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In other words, I'm calling ASerialLdd1_Init() but PEx Generatded_Code is calling ASerialLdd1_Init(), too?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;That doesn't seem right; is it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 00:31:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Async-Serial-GetCharsInRxBuf-never-gt-0/m-p/240027#M1305</guid>
      <dc:creator>pklammer</dc:creator>
      <dc:date>2013-03-26T00:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Async Serial: GetCharsInRxBuf never &gt; 0</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Async-Serial-GetCharsInRxBuf-never-gt-0/m-p/240028#M1306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I assume you are using the AsynchroSerial component. This one inherits Serial_LDD component and uses it as an interface to the hardware – the AsynchroSerial component on Kinetis families is rather SW wrapper to support migration from families where LDD components were not supported.&lt;/P&gt;&lt;P&gt;I’m not very familiar with serial communication drivers, however from the code snippet you posted it looks like you are using both Serial_LDD and AsynchroSerial methods at the same time – I guess this is source of your problems. You have to use either the AsynchroSerial component and its API or the Serial_LDD component (without the AsynchroSerial) and its API – it is not possible to use both of them for the same UART device.&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 14:35:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Async-Serial-GetCharsInRxBuf-never-gt-0/m-p/240028#M1306</guid>
      <dc:creator>Lukas_Heczko</dc:creator>
      <dc:date>2013-03-26T14:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Async Serial: GetCharsInRxBuf never &gt; 0</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Async-Serial-GetCharsInRxBuf-never-gt-0/m-p/240029#M1307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a tough way to learn Processor Expert -- after-the-fact do-over, after I got it working "the wrong way"!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I know so far is, there is a list of components in the right-hand panel of eclipse, and none of them are marked "deprecated" or "API" or "wrapper" or "migration".&amp;nbsp; So how are we to know -- before we waste time on the wrong ones -- which are the recommended components for application development, and which are "dependent" components that get pulled in automatically, and which are "legacy" components not recommended for new projects?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 14:58:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Async-Serial-GetCharsInRxBuf-never-gt-0/m-p/240029#M1307</guid>
      <dc:creator>pklammer</dc:creator>
      <dc:date>2013-03-26T14:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Async Serial: GetCharsInRxBuf never &gt; 0</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/Async-Serial-GetCharsInRxBuf-never-gt-0/m-p/240030#M1308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree that the selection of the right component can be confusing for non-experienced Processor Expert users. &lt;/P&gt;&lt;P&gt;We are planning&amp;nbsp; improvements in the component library and its documentation to ease this task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Petr Hradsky&lt;/P&gt;&lt;P&gt;Processor Expert Support Team&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 10:03:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/Async-Serial-GetCharsInRxBuf-never-gt-0/m-p/240030#M1308</guid>
      <dc:creator>Petr_H</dc:creator>
      <dc:date>2013-04-18T10:03:02Z</dc:date>
    </item>
  </channel>
</rss>

