<?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 Re: LPC-Link 2 SWDIO stuck off... possible firmware bug in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Link-2-SWDIO-stuck-off-possible-firmware-bug/m-p/588678#M28252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wellsk on Mon Jul 22 10:33:00 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for posting these issues - we'll look at this and provide an updated firmware image in the next few weeks with (at least) these fixes if needed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:46:10 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:46:10Z</dc:date>
    <item>
      <title>LPC-Link 2 SWDIO stuck off... possible firmware bug</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Link-2-SWDIO-stuck-off-possible-firmware-bug/m-p/588677#M28251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by majbthrd on Sun Jul 21 12:53:34 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an LPC-Link 2 with the CMSIS-DAP firmware.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Periodically, it stops working and the only solution is to unplug it and plug it back it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I probed the SWD pins when it stopped working, and noticed that SWDIO was stuck high.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the Keil/ARM code for the LPC-Link 2 (or at least what parts of it I could find online), it looks like there is an implementation bug in the CMSIS-DAP firmware.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DAP_SETUP() and PIN_SWDIO_OUT_ENABLE() are LPC-Link 2 macros that turn on drive for SWDIO.&amp;nbsp; SWDIO_OUT_DISABLE() turns drive off.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DAP_SETUP() must get called at reset.&amp;nbsp; PIN_SWDIO_OUT_ENABLE() and SWDIO_OUT_DISABLE() get called in the function SWD_Transfer##speed().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that not all execution paths in SWD_Transfer##speed() leave SWDIO_OUT in the same state.&amp;nbsp; If SWD_Transfer##speed() returns after calling SWDIO_OUT_DISABLE (such as might happen after the target device fails to ACK any transfer), SWDIO is stuck off!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When subsequent SWD_Transfer##speed() calls happens, the code tries to transmit bits, but it will always fail because SWDIO_OUT is disabled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Recovery requires resetting (which means unplugging the power to the LPC-Link 2).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another possible kludgy workaround is to for the host to issue a DAP_Disconnect command.&amp;nbsp; This would take advantage of yet another bug in the LPC-Link 2 driver code.&amp;nbsp; The PORT_OFF() macro is supposed to turn off SWDIO_OUT, but instead it turns it on! :(&amp;nbsp; I don't want to recommend this approach, as it DEPENDS on a bug, and that is another bug that should be fixed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps NXP can fix the firmware and issue an update?&amp;nbsp; Users are powerless to do this themselves because there is no complete source code, it depends on a proprietary tool chain, and the board uses a pre-production undocumented microcontroller (LPC4370).&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:46:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Link-2-SWDIO-stuck-off-possible-firmware-bug/m-p/588677#M28251</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: LPC-Link 2 SWDIO stuck off... possible firmware bug</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Link-2-SWDIO-stuck-off-possible-firmware-bug/m-p/588678#M28252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wellsk on Mon Jul 22 10:33:00 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for posting these issues - we'll look at this and provide an updated firmware image in the next few weeks with (at least) these fixes if needed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:46:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPC-Link-2-SWDIO-stuck-off-possible-firmware-bug/m-p/588678#M28252</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:46:10Z</dc:date>
    </item>
  </channel>
</rss>

