<?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>MCUXpresso SDKのトピックRe: USART CMSIS driver incompletely implemented (ARM_USART_SignalEvent)?</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/USART-CMSIS-driver-incompletely-implemented-ARM-USART/m-p/1410754#M3585</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Yes,you can add it by yourself, or you can directly refer to SDK demo, write interrupt function by yourself, and check the flag in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
    <pubDate>Wed, 09 Feb 2022 07:40:14 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2022-02-09T07:40:14Z</dc:date>
    <item>
      <title>USART CMSIS driver incompletely implemented (ARM_USART_SignalEvent)?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/USART-CMSIS-driver-incompletely-implemented-ARM-USART/m-p/1406542#M3563</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;this is related to SDK for LPC5526. I don't know the CMSIS implementation for other MCUs. I assume that it's pretty similar at least for the same MCU family.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TL;DR&lt;/STRONG&gt;: SDK does not implement all mandatory "&lt;SPAN&gt;Signal USART Events" but only&amp;nbsp;ARM_USART_EVENT_SEND_COMPLETE and&amp;nbsp;ARM_USART_EVENT_RECEIVE_COMPLETE. For example, search the SDK code base for&amp;nbsp;ARM_USART_EVENT_RX_OVERFLOW. It is defined but not used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Long story:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Peripheral tool uses &lt;A href="https://arm-software.github.io/CMSIS_5/Driver/html/group__usart__interface__gr.html#gad796cd023f8f6300a6caadcc39d43cbf" target="_self"&gt;CMSIS USART API&lt;/A&gt; to initialize serial interface:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;static void FLEXCOMM0_init(void) {
  /* Interrupt vector FLEXCOMM0_IRQn priority settings in the NVIC. */
  NVIC_SetPriority(FLEXCOMM0_IRQN, FLEXCOMM0_IRQ_PRIORITY);
  /* Initialize CMSIS USART */
  FLEXCOMM0_PERIPHERAL.Initialize(USART0_SignalEvent);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The signature of &lt;FONT face="courier new,courier"&gt;Initialize()&lt;/FONT&gt;&amp;nbsp;is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;int32_t ARM_USART_Initialize ( ARM_USART_SignalEvent_t &lt;STRONG&gt;cb_event&lt;/STRONG&gt; )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The callback &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;cb_event&lt;/FONT&gt;&lt;/STRONG&gt; is called from the SDK in &lt;EM&gt;fsl_usart_cmsis.c&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;static void KSDK_USART_NonBlockingCallback(USART_Type *base, usart_handle_t *handle, status_t status, void *userData)
{
    uint32_t event = 0U;

    if (kStatus_USART_TxIdle == status)
    {
        event = ARM_USART_EVENT_SEND_COMPLETE;
    }
    if (kStatus_USART_RxIdle == status)
    {
        event = ARM_USART_EVENT_RECEIVE_COMPLETE;
    }

    /* User data is actually CMSIS driver callback. */
    if (userData != NULL)
    {
        ((ARM_USART_SignalEvent_t)userData)(event);
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see, this function supports only the two events I listed above.&lt;/P&gt;&lt;P&gt;Conclusion: This implementation does not support all events that are declared "always supported" in ARM's CMSIS driver documentation. The implementation is thus incomplete.&lt;/P&gt;&lt;P&gt;Or am I missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 09:55:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/USART-CMSIS-driver-incompletely-implemented-ARM-USART/m-p/1406542#M3563</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2022-01-28T09:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: USART CMSIS driver incompletely implemented (ARM_USART_SignalEvent)?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/USART-CMSIS-driver-incompletely-implemented-ARM-USART/m-p/1408937#M3578</link>
      <description>&lt;P&gt;&lt;SPAN&gt;When an RX fifo overrun occurs, the callback is called as below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielholala_0-1643969105213.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/169554i059BAACD05BF68CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="danielholala_0-1643969105213.png" alt="danielholala_0-1643969105213.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To support this event,&amp;nbsp;I&amp;nbsp;added this code to&amp;nbsp;&lt;FONT face="courier new,courier"&gt;KSDK_USART_NonBlockingCallback()&lt;/FONT&gt;&amp;nbsp;in&amp;nbsp;&lt;EM&gt;fsl_usart_cmsis.c:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    if (kStatus_USART_RxError == status)
    {
    	event = ARM_USART_EVENT_RX_OVERFLOW;
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 10:08:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/USART-CMSIS-driver-incompletely-implemented-ARM-USART/m-p/1408937#M3578</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2022-02-04T10:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: USART CMSIS driver incompletely implemented (ARM_USART_SignalEvent)?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/USART-CMSIS-driver-incompletely-implemented-ARM-USART/m-p/1410754#M3585</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Yes,you can add it by yourself, or you can directly refer to SDK demo, write interrupt function by yourself, and check the flag in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 07:40:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/USART-CMSIS-driver-incompletely-implemented-ARM-USART/m-p/1410754#M3585</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2022-02-09T07:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: USART CMSIS driver incompletely implemented (ARM_USART_SignalEvent)?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/USART-CMSIS-driver-incompletely-implemented-ARM-USART/m-p/1410791#M3586</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/27788"&gt;@Alice_Yang&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I appreciate your response. Of course, we, the NXP customers, have to accept the software that you provide as is, even if the implementation is incomplete. From the customer perspective, however, this is an unsatifactory situation.&lt;/P&gt;&lt;P&gt;I hope you forward this information to the SDK team for review and further improvement of the driver.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 08:16:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/USART-CMSIS-driver-incompletely-implemented-ARM-USART/m-p/1410791#M3586</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2022-02-09T08:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: USART CMSIS driver incompletely implemented (ARM_USART_SignalEvent)?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/USART-CMSIS-driver-incompletely-implemented-ARM-USART/m-p/1594098#M4168</link>
      <description>&lt;P&gt;This issue seems to have been fixed in SDK 2.12.0, see &lt;A href="https://github.com/nxp-mcuxpresso/mcux-sdk/blob/MCUX_2.12.0/cmsis_drivers/flexcomm/fsl_usart_cmsis.c#L551" target="_self"&gt;SDK on Github&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 16:37:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/USART-CMSIS-driver-incompletely-implemented-ARM-USART/m-p/1594098#M4168</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2023-02-06T16:37:36Z</dc:date>
    </item>
  </channel>
</rss>

