<?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のトピックUSB CDC VCOM error &amp;quot;The semaphore timeout period has expired&amp;quot; from .NET host</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-CDC-VCOM-error-quot-The-semaphore-timeout-period-has-expired/m-p/1278225#M45036</link>
    <description>&lt;P&gt;When trying to send anything to an opened serial port from a simple .NET/C# application, on most Windows PCs I get the error&lt;/P&gt;&lt;P&gt;Unhandled Exception: System.IO.IOException: The semaphore timeout period has expired.&lt;/P&gt;&lt;P&gt;at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)&lt;BR /&gt;at System.IO.Ports.SerialStream.EndWrite(IAsyncResult asyncResult)&lt;BR /&gt;at System.IO.Ports.SerialStream.Write(Byte[] array, Int32 offset, Int32 count, Int32 timeout)&lt;BR /&gt;at System.IO.Ports.SerialPort.Write(String text)&lt;BR /&gt;at System.IO.Ports.SerialPort.WriteLine(String text)&lt;BR /&gt;at TestSerial.Executer.Go(UInt32 COMPort, UInt32 BaudRate, List`1 Operations)&lt;BR /&gt;at TestSerial.Program.Main(String[] args)&lt;/P&gt;&lt;P&gt;This is using the standard SDK example lpcxpresso54628_dev_composite_cdc_vcom_cdc_vcom_bm with the following single code change in usb_device_config.h:&lt;/P&gt;&lt;P&gt;/*! @brief LPC USB IP3511 FS instance count */&lt;BR /&gt;#define USB_DEVICE_CONFIG_LPCIP3511FS (0U)&lt;/P&gt;&lt;P&gt;/*! @brief LPC USB IP3511 HS instance count */&lt;BR /&gt;#define USB_DEVICE_CONFIG_LPCIP3511HS (1U)&lt;/P&gt;&lt;P&gt;So instead of the FS port I use the HS port, everything else is 100% the SDK code.&lt;/P&gt;&lt;P&gt;This problem does not happen with native C++ applications or with Python/pyserial which also uses native programming underneath, it only happens with .NET applications using System.IO like my test or Termie from codeproject.&lt;/P&gt;&lt;P&gt;It also doesn't happen with all PCs, but from 4 I tried it happened on 3 of them even though they all use the same standard class USB virtual serial port driver usbser.sys version 10.0.19041.906 from Windows 10.&lt;/P&gt;&lt;P&gt;This doesn't happen with other non-NXP VCOM interfaces like FTDI ones so it must be something specific to the NXP-provided implementation.&lt;/P&gt;&lt;P&gt;Using an LPCXpresso54628 eval board.&lt;/P&gt;</description>
    <pubDate>Tue, 18 May 2021 12:23:27 GMT</pubDate>
    <dc:creator>Chris-at-EmSA</dc:creator>
    <dc:date>2021-05-18T12:23:27Z</dc:date>
    <item>
      <title>USB CDC VCOM error "The semaphore timeout period has expired" from .NET host</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/USB-CDC-VCOM-error-quot-The-semaphore-timeout-period-has-expired/m-p/1278225#M45036</link>
      <description>&lt;P&gt;When trying to send anything to an opened serial port from a simple .NET/C# application, on most Windows PCs I get the error&lt;/P&gt;&lt;P&gt;Unhandled Exception: System.IO.IOException: The semaphore timeout period has expired.&lt;/P&gt;&lt;P&gt;at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)&lt;BR /&gt;at System.IO.Ports.SerialStream.EndWrite(IAsyncResult asyncResult)&lt;BR /&gt;at System.IO.Ports.SerialStream.Write(Byte[] array, Int32 offset, Int32 count, Int32 timeout)&lt;BR /&gt;at System.IO.Ports.SerialPort.Write(String text)&lt;BR /&gt;at System.IO.Ports.SerialPort.WriteLine(String text)&lt;BR /&gt;at TestSerial.Executer.Go(UInt32 COMPort, UInt32 BaudRate, List`1 Operations)&lt;BR /&gt;at TestSerial.Program.Main(String[] args)&lt;/P&gt;&lt;P&gt;This is using the standard SDK example lpcxpresso54628_dev_composite_cdc_vcom_cdc_vcom_bm with the following single code change in usb_device_config.h:&lt;/P&gt;&lt;P&gt;/*! @brief LPC USB IP3511 FS instance count */&lt;BR /&gt;#define USB_DEVICE_CONFIG_LPCIP3511FS (0U)&lt;/P&gt;&lt;P&gt;/*! @brief LPC USB IP3511 HS instance count */&lt;BR /&gt;#define USB_DEVICE_CONFIG_LPCIP3511HS (1U)&lt;/P&gt;&lt;P&gt;So instead of the FS port I use the HS port, everything else is 100% the SDK code.&lt;/P&gt;&lt;P&gt;This problem does not happen with native C++ applications or with Python/pyserial which also uses native programming underneath, it only happens with .NET applications using System.IO like my test or Termie from codeproject.&lt;/P&gt;&lt;P&gt;It also doesn't happen with all PCs, but from 4 I tried it happened on 3 of them even though they all use the same standard class USB virtual serial port driver usbser.sys version 10.0.19041.906 from Windows 10.&lt;/P&gt;&lt;P&gt;This doesn't happen with other non-NXP VCOM interfaces like FTDI ones so it must be something specific to the NXP-provided implementation.&lt;/P&gt;&lt;P&gt;Using an LPCXpresso54628 eval board.&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 12:23:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/USB-CDC-VCOM-error-quot-The-semaphore-timeout-period-has-expired/m-p/1278225#M45036</guid>
      <dc:creator>Chris-at-EmSA</dc:creator>
      <dc:date>2021-05-18T12:23:27Z</dc:date>
    </item>
  </channel>
</rss>

