<?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 K22DN512 not responding to SWD commands when nRESET not asserted in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22DN512-not-responding-to-SWD-commands-when-nRESET-not-asserted/m-p/370837#M19243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm attempting to bring up a new board of ours that has a K22DN512VLH5 on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using Keil uVision4 with a ULink-me programmer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we try and program the chip, I get a "SWD communications fail" error. Scoping the SWD and reset lines, I see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) reset asserted&lt;/P&gt;&lt;P&gt;2) line reset (50 clock cycles, data high)&lt;/P&gt;&lt;P&gt;3) JTAG to SWD switch.&lt;/P&gt;&lt;P&gt;4) line reset&lt;/P&gt;&lt;P&gt;5) 8 low clock cycles&lt;/P&gt;&lt;P&gt;6) SWD read DP addr 0 (idcode reg), ACK, correct data.&lt;/P&gt;&lt;P&gt;7) ... more stuff that I haven't decoded. Probably checking the MDM-AP status register and setting C_DEBUGEN and CV_VECTORRESET in the AHB-AP.&lt;/P&gt;&lt;P&gt;8) deassert reset&lt;/P&gt;&lt;P&gt;9) 200ms gap&lt;/P&gt;&lt;P&gt;10) SWD write DP addr 4 (ctrl/status reg) --- unlike before the target does not ACK, nor send WAIT or FAIL, it just doesn't respond.&lt;/P&gt;&lt;P&gt;11) line reset --- recover from error&lt;/P&gt;&lt;P&gt;12) 8 low cycles&lt;/P&gt;&lt;P&gt;13) &lt;SPAN style="font-size: 13.3333339691162px;"&gt;6) SWD read DP addr 0 (idcode reg),&amp;nbsp; --- Again no response at all.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333339691162px;"&gt;... more attempts but the target never replies.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reasons I can think of for this behavior based on searching are:&lt;/P&gt;&lt;P&gt;1) Protection bits -- Pretty sure this isn't my problem because when I accidentally protect something, I get asked if I want to do a mass erase when programming.&lt;/P&gt;&lt;P&gt;2) Invalid code causing target to reset continuously breaking SWD connection -- Pretty sure this isn't my problem either as I've scoped the reset line and don't see it changing except for when we drive it low with the programmer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm out of ideas really. Any suggestions on what to try would be fantastic. I have the ability to read / write DP / AP without using the programmer, so I can add in custom calls to read states of anything you think could be helpful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Sep 2014 10:18:40 GMT</pubDate>
    <dc:creator>andrewparlane</dc:creator>
    <dc:date>2014-09-16T10:18:40Z</dc:date>
    <item>
      <title>K22DN512 not responding to SWD commands when nRESET not asserted</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22DN512-not-responding-to-SWD-commands-when-nRESET-not-asserted/m-p/370837#M19243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm attempting to bring up a new board of ours that has a K22DN512VLH5 on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using Keil uVision4 with a ULink-me programmer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we try and program the chip, I get a "SWD communications fail" error. Scoping the SWD and reset lines, I see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) reset asserted&lt;/P&gt;&lt;P&gt;2) line reset (50 clock cycles, data high)&lt;/P&gt;&lt;P&gt;3) JTAG to SWD switch.&lt;/P&gt;&lt;P&gt;4) line reset&lt;/P&gt;&lt;P&gt;5) 8 low clock cycles&lt;/P&gt;&lt;P&gt;6) SWD read DP addr 0 (idcode reg), ACK, correct data.&lt;/P&gt;&lt;P&gt;7) ... more stuff that I haven't decoded. Probably checking the MDM-AP status register and setting C_DEBUGEN and CV_VECTORRESET in the AHB-AP.&lt;/P&gt;&lt;P&gt;8) deassert reset&lt;/P&gt;&lt;P&gt;9) 200ms gap&lt;/P&gt;&lt;P&gt;10) SWD write DP addr 4 (ctrl/status reg) --- unlike before the target does not ACK, nor send WAIT or FAIL, it just doesn't respond.&lt;/P&gt;&lt;P&gt;11) line reset --- recover from error&lt;/P&gt;&lt;P&gt;12) 8 low cycles&lt;/P&gt;&lt;P&gt;13) &lt;SPAN style="font-size: 13.3333339691162px;"&gt;6) SWD read DP addr 0 (idcode reg),&amp;nbsp; --- Again no response at all.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333339691162px;"&gt;... more attempts but the target never replies.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reasons I can think of for this behavior based on searching are:&lt;/P&gt;&lt;P&gt;1) Protection bits -- Pretty sure this isn't my problem because when I accidentally protect something, I get asked if I want to do a mass erase when programming.&lt;/P&gt;&lt;P&gt;2) Invalid code causing target to reset continuously breaking SWD connection -- Pretty sure this isn't my problem either as I've scoped the reset line and don't see it changing except for when we drive it low with the programmer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm out of ideas really. Any suggestions on what to try would be fantastic. I have the ability to read / write DP / AP without using the programmer, so I can add in custom calls to read states of anything you think could be helpful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 10:18:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22DN512-not-responding-to-SWD-commands-when-nRESET-not-asserted/m-p/370837#M19243</guid>
      <dc:creator>andrewparlane</dc:creator>
      <dc:date>2014-09-16T10:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: K22DN512 not responding to SWD commands when nRESET not asserted</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22DN512-not-responding-to-SWD-commands-when-nRESET-not-asserted/m-p/370838#M19244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you place a pull-up reset on the SWD_DIO line?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Oct 2014 19:22:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22DN512-not-responding-to-SWD-commands-when-nRESET-not-asserted/m-p/370838#M19244</guid>
      <dc:creator>apanecatl</dc:creator>
      <dc:date>2014-10-03T19:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: K22DN512 not responding to SWD commands when nRESET not asserted</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22DN512-not-responding-to-SWD-commands-when-nRESET-not-asserted/m-p/370839#M19245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem was caused by having the ezport_cs line pulled down. Although even after fixing this I was still having problems. Unfortunately this project has taken a back burner for now, and i haven't been able to fully solve it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 09:16:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22DN512-not-responding-to-SWD-commands-when-nRESET-not-asserted/m-p/370839#M19245</guid>
      <dc:creator>andrewparlane</dc:creator>
      <dc:date>2014-10-27T09:16:36Z</dc:date>
    </item>
  </channel>
</rss>

