<?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>MQX Software Solutions中的主题 Re: UART - mqx write not accessing the UART registers</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222293#M5917</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 went to the example rs485 under the mqx examples. Rebuilt the bsp to use ittya, Did&lt;/P&gt;&lt;P&gt;#define RS485_CHANNEL "ittya:"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rebuilt the bsp then the app. I see the device file block pointer assigned so I know the bsp is ok on that level. But there is nothing coming out on the pin. I think the problem is that the pin is not assigned correctly. We are using PTA14 as UART0_TX, which is ALT3. But I did not tell MQX anywhere that that was what I was using. How to I create the assignment? I know how to do this manually outside of MQX in an init function, but not within MQX. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is the problem. Can anyone tell me how to set up the assignment please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jan 2013 04:00:58 GMT</pubDate>
    <dc:creator>Cdn_aye</dc:creator>
    <dc:date>2013-01-22T04:00:58Z</dc:date>
    <item>
      <title>UART - mqx write not accessing the UART registers</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222288#M5912</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 have a logic analyzer on TX0 capturing the output of uart0, but I under mqx 3.8.1 I don't see any output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get a 0 for the return status on all the mqx calls which I think is a success. The file open works, the baud rate is set and read back ok, same with the status on the write. But nothing is coming out the Tx line. When I step into the mqx _io_write, all I can see happening is the length of the buffer is being calculated, it never access's any uart registers, it is almost as if the mqx uart code is not being compiled but I can't see where any conditional exclusion occurs, yet the RTOS returns a 0 on the write call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;I have this in the user_config.h, I am assuming that ttya: is channel 0 of the uart., the bsp and psp were recompiled without error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define BSP_DEFAULT_IO_CHANNEL&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; "ttya:"&lt;/P&gt;&lt;P&gt;#define BSP_DEFAULT_IO_CHANNEL_DEFINED&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* MGCT: &amp;lt;generated_code&amp;gt; */&lt;/P&gt;&lt;P&gt;#define BSPCFG_ENABLE_TTYA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void rs232_write (void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;static MQX_FILE_PTR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p_fd_rs232 = NULL;&lt;/P&gt;&lt;P&gt;static char&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; ac_data_buffer[10] = "AT\n", *pac_data_buffer;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // "AT&amp;amp;F*";&lt;/P&gt;&lt;P&gt;static sint32&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; s32_result;&lt;/P&gt;&lt;P&gt;static uint32&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; u32_result;&lt;/P&gt;&lt;P&gt;static uint32&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; u32_param, u32_char_rcvd = 0;&lt;/P&gt;&lt;P&gt;static bool&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; temp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pac_data_buffer = ac_data_buffer;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fflush(stdout);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; p_fd_rs232&amp;nbsp; = fopen( SERIAL__CHANNEL, NULL );&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // HW, will not use flow cntrl&lt;/P&gt;&lt;P&gt;// **rwl&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p_fd_rs232&amp;nbsp; = fopen( SERIAL__CHANNEL, BSP_DEFAULT_IO_OPEN_MODE );&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // HW, will not use flow cntrl&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( p_fd_rs232 == NULL ){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vFn_Printff();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //"error");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fflush(stdout);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u32_param = 9600;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s32_result = ioctl( p_fd_rs232, IO_IOCTL_SERIAL_SET_BAUD, &amp;amp;u32_param );// set, wait for transfer complete flag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s32_result = ioctl( p_fd_rs232, IO_IOCTL_SERIAL_GET_BAUD, &amp;amp;u32_param );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fflush(stdout);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1){&lt;/P&gt;&lt;P&gt;// **rwl&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s32_result = write( p_fd_rs232, ac_data_buffer, (long)strlen(ac_data_buffer) );&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // write data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s32_result = _io_write( p_fd_rs232, ac_data_buffer, (long)strlen(ac_data_buffer) );&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // write data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _time_delay(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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, 10 Jan 2013 07:04:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222288#M5912</guid>
      <dc:creator>Cdn_aye</dc:creator>
      <dc:date>2013-01-10T07:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: UART - mqx write not accessing the UART registers</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222289#M5913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Robert Lewis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To start the discussion, are UART registers set properly ? What's the value of SERIAL__CHANNEL ?&lt;/P&gt;&lt;P&gt;Set breakpoint in _io_write in the end (return statement).&amp;nbsp; This call should jump to the _io_serial_polled_write() function located in /io/serial/polled/serl_pol.c . Is that it? What are the parameters there, do they designate values of your _io_write call parameters? From there, depending of your serial flags, polled_dev_ptr-&amp;gt;DEV_PUTC is invoked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2013 07:52:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222289#M5913</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2013-01-10T07:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: UART - mqx write not accessing the UART registers</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222290#M5914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kojito&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have&lt;/P&gt;&lt;P&gt;#define SERIAL__CHANNEL&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; "ttya:"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set SERIAL_ output device, sci0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't set a breakpoint in _io_write, when I step into _io_write, the only code I see is the string length calculation, then it returns. This is my main problem. I have rebuilt the bsp, psp and rebuilt the project; same thing. I am assuming that ttya is translated somewhere to uart0. But I can't see where that happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2013 20:46:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222290#M5914</guid>
      <dc:creator>Cdn_aye</dc:creator>
      <dc:date>2013-01-10T20:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: UART - mqx write not accessing the UART registers</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222291#M5915</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;ttya is "translated" in init_bsp.c. This preprocceses&lt;/P&gt;&lt;P&gt;_kuart_polled_install("ttya:", &amp;amp;_bsp_sci0_init, _bsp_sci0_init.QUEUE_SIZE). Debug this initialization if possible to find out if uart is initialized in the beginning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If io_write gives you issues to debug, place breakpoint in putc function inside polled serial driver (serl_pol_kuart).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you enable optimizations? If you plan to debug, libs and application should have optimizations off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jan 2013 07:02:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222291#M5915</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2013-01-11T07:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: UART - mqx write not accessing the UART registers</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222292#M5916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kojto&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was suddenly pulled off of the uart problem to work on something else. I am back and will let you know what I find. Thank you for responding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 00:30:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222292#M5916</guid>
      <dc:creator>Cdn_aye</dc:creator>
      <dc:date>2013-01-22T00:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: UART - mqx write not accessing the UART registers</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222293#M5917</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 went to the example rs485 under the mqx examples. Rebuilt the bsp to use ittya, Did&lt;/P&gt;&lt;P&gt;#define RS485_CHANNEL "ittya:"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rebuilt the bsp then the app. I see the device file block pointer assigned so I know the bsp is ok on that level. But there is nothing coming out on the pin. I think the problem is that the pin is not assigned correctly. We are using PTA14 as UART0_TX, which is ALT3. But I did not tell MQX anywhere that that was what I was using. How to I create the assignment? I know how to do this manually outside of MQX in an init function, but not within MQX. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is the problem. Can anyone tell me how to set up the assignment please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 04:00:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UART-mqx-write-not-accessing-the-UART-registers/m-p/222293#M5917</guid>
      <dc:creator>Cdn_aye</dc:creator>
      <dc:date>2013-01-22T04:00:58Z</dc:date>
    </item>
  </channel>
</rss>

