<?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 To enable RTCS logging, after calling RTCSLOG_enable(), how to access the logs? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/To-enable-RTCS-logging-after-calling-RTCSLOG-enable-how-to/m-p/2121658#M67674</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am having some random TCP connection off issues with MQX RTCS connected to a Windows host.&lt;/P&gt;&lt;P&gt;I have enabled keepalive to be sent every 1 minute, and so when idle it will automatically send a keepalive out and receive an Ack normally, but randomly I won't receive the Ack, and thus my blocking call recv() would fail with error code&amp;nbsp;0x00001649, which means&amp;nbsp;RTCSERR_TCP_TIMED_OUT based on below definition:&lt;/P&gt;&lt;P&gt;// #define RTCS_ERROR_BASE (0x00001000ul)&lt;BR /&gt;// #define RTCSERR_TCP_TIMED_OUT (RTCS_ERROR_BASE|0x649) /* Connection timed out */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wireshark capture is showing the connection was idle for more than a few minutes before this error was reported.&lt;/P&gt;&lt;P&gt;To troubleshoot, I planned to call&amp;nbsp;RTCSLOG_enable() to enable the RTCS logging to see what's going on, but the problem is: where is the generated logs, and how to access the logs?&lt;BR /&gt;&lt;BR /&gt;I could not find clues from MQX_RTOS_5.2_reference_manual.pdf document.&lt;BR /&gt;&lt;BR /&gt;Many thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jun 2025 21:04:16 GMT</pubDate>
    <dc:creator>Chin_Z</dc:creator>
    <dc:date>2025-06-23T21:04:16Z</dc:date>
    <item>
      <title>To enable RTCS logging, after calling RTCSLOG_enable(), how to access the logs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/To-enable-RTCS-logging-after-calling-RTCSLOG-enable-how-to/m-p/2121658#M67674</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am having some random TCP connection off issues with MQX RTCS connected to a Windows host.&lt;/P&gt;&lt;P&gt;I have enabled keepalive to be sent every 1 minute, and so when idle it will automatically send a keepalive out and receive an Ack normally, but randomly I won't receive the Ack, and thus my blocking call recv() would fail with error code&amp;nbsp;0x00001649, which means&amp;nbsp;RTCSERR_TCP_TIMED_OUT based on below definition:&lt;/P&gt;&lt;P&gt;// #define RTCS_ERROR_BASE (0x00001000ul)&lt;BR /&gt;// #define RTCSERR_TCP_TIMED_OUT (RTCS_ERROR_BASE|0x649) /* Connection timed out */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wireshark capture is showing the connection was idle for more than a few minutes before this error was reported.&lt;/P&gt;&lt;P&gt;To troubleshoot, I planned to call&amp;nbsp;RTCSLOG_enable() to enable the RTCS logging to see what's going on, but the problem is: where is the generated logs, and how to access the logs?&lt;BR /&gt;&lt;BR /&gt;I could not find clues from MQX_RTOS_5.2_reference_manual.pdf document.&lt;BR /&gt;&lt;BR /&gt;Many thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 21:04:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/To-enable-RTCS-logging-after-calling-RTCSLOG-enable-how-to/m-p/2121658#M67674</guid>
      <dc:creator>Chin_Z</dc:creator>
      <dc:date>2025-06-23T21:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: To enable RTCS logging, after calling RTCSLOG_enable(), how to access the logs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/To-enable-RTCS-logging-after-calling-RTCSLOG-enable-how-to/m-p/2121793#M67675</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/251953"&gt;@Chin_Z&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your post. According to the&amp;nbsp;&lt;A href="https://www.nxp.com.cn/docs/en/user-guide/MQXRTCSUG.pdf" target="_blank"&gt;MQX_RTCS_User_Guide 5.2 - Jan 2022&lt;/A&gt;, "&lt;STRONG&gt;RTCS log entries are written into the kernel log.&lt;/STRONG&gt; Therefore, the kernel log must have been created prior to enabling RTCS logging. In addition, the socket API log entries belong to the kernel log functions group in the kernel. To log socket API calls, this group must be enabled using the MQX function&lt;BR /&gt;_klog_control()."&lt;/P&gt;
&lt;P&gt;Then according to the&amp;nbsp;&lt;A href="https://www.nxp.com.cn/docs/en/user-guide/MQXUG.pdf" target="_blank"&gt;Freescale MQX RTOS User's Guide&lt;/A&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Celeste_Liu_0-1750734440602.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/344282i25464EE31D13AFD6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Celeste_Liu_0-1750734440602.png" alt="Celeste_Liu_0-1750734440602.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can go to this directory: mqx\examples\klog&amp;nbsp; to find the kernel log file.&lt;/P&gt;
&lt;P&gt;Hope it can help you. If my answer still not solve your problem, you can try to directly contact&amp;nbsp;&lt;A href="mailto:mqxsales@nxp.com" target="_blank"&gt;mqxsales@nxp.com&lt;/A&gt;&amp;nbsp; for help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BRs,&lt;/P&gt;
&lt;P&gt;Celeste&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;----------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!&lt;BR /&gt;----------------------------------------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 03:11:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/To-enable-RTCS-logging-after-calling-RTCSLOG-enable-how-to/m-p/2121793#M67675</guid>
      <dc:creator>Celeste_Liu</dc:creator>
      <dc:date>2025-06-24T03:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: To enable RTCS logging, after calling RTCSLOG_enable(), how to access the logs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/To-enable-RTCS-logging-after-calling-RTCSLOG-enable-how-to/m-p/2122408#M67677</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/237877"&gt;@Celeste_Liu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the reply, this helps a lot.&lt;/P&gt;&lt;P&gt;I followed the steps and made some progress.&lt;/P&gt;&lt;P&gt;Now I can see some loggings for interrupts, but nothing from RTCS, even though I have turned on all logging for RTCS.&lt;/P&gt;&lt;P&gt;I have made sure that in user_config.h file:&lt;BR /&gt;#define RTCSCFG_LOGGING 1&lt;/P&gt;&lt;P&gt;#ifndef NDEBUG&lt;BR /&gt;#define MQX_KERNEL_LOGGING 1&lt;BR /&gt;#endif&lt;BR /&gt;I built the library in DEBUG configuration.&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;void Task_Log_Display(uint32_t initial_data)&lt;BR /&gt;{&lt;BR /&gt;_mqx_uint result;&lt;BR /&gt;_mqx_uint i;&lt;/P&gt;&lt;P&gt;/* Create the kernel log */&lt;BR /&gt;result = _klog_create(2 * 1024, 0);&lt;BR /&gt;if (result != MQX_OK) {&lt;BR /&gt;printf("Main task: _klog_create failed %08x", result);&lt;BR /&gt;_task_block();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Clear all the control bits and then set particular ones: */&lt;BR /&gt;_klog_control(0xFFFFFFFF, FALSE);&lt;BR /&gt;/* Enable kernel logging */&lt;BR /&gt;_klog_control(KLOG_ENABLED | KLOG_FUNCTIONS_ENABLED | RTCSLOG_FNBASE | KLOG_INTERRUPTS_ENABLED, TRUE);&lt;BR /&gt;&lt;BR /&gt;/* Tell RTCS to start logging */&lt;BR /&gt;RTCSLOG_enable(RTCS_LOGCTRL_ALL);&lt;/P&gt;&lt;P&gt;/* Write data into kernel log */&lt;BR /&gt;for (i = 0; i &amp;lt; 10; i++) {&lt;BR /&gt;_time_delay_ticks(5 * i);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Read data from the kernel log */&lt;BR /&gt;printf("\nKernel log contains:\n");&lt;BR /&gt;while (_klog_display()) {&lt;BR /&gt;_time_delay(100);&lt;BR /&gt;printf("k");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;_task_block();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Any more clues?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chin&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 17:22:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/To-enable-RTCS-logging-after-calling-RTCSLOG-enable-how-to/m-p/2122408#M67677</guid>
      <dc:creator>Chin_Z</dc:creator>
      <dc:date>2025-06-24T17:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: To enable RTCS logging, after calling RTCSLOG_enable(), how to access the logs?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/To-enable-RTCS-logging-after-calling-RTCSLOG-enable-how-to/m-p/2122651#M67678</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/251953"&gt;@Chin_Z&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Sorry, I don't have any new clues at my end.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest you contact our MQX partner, Embedded Access for fast support.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://embedded-access.com/" target="_blank" rel="nofollow noopener noreferrer"&gt;Embedded Access - MQX Design, Products, &amp;amp; Services&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;or contact with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:mqxsales@nxp.com" target="_blank" rel="nofollow noopener noreferrer"&gt;mqxsales@nxp.com&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Thanks for your understanding in advance.&lt;/P&gt;
&lt;P&gt;BRs,&lt;/P&gt;
&lt;P&gt;Celeste&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 02:08:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/To-enable-RTCS-logging-after-calling-RTCSLOG-enable-how-to/m-p/2122651#M67678</guid>
      <dc:creator>Celeste_Liu</dc:creator>
      <dc:date>2025-06-25T02:08:20Z</dc:date>
    </item>
  </channel>
</rss>

