<?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 Flashing LPC802 with pyOcd in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flashing-LPC802-with-pyOcd/m-p/2184986#M58857</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm working with an LPC802, using MCUXpresso IDE and some external scripts relying on PyOcd v0.34.3. I'm connecting to the LPC802 with an MCU-link probe connected through the SWD pins.&lt;/P&gt;&lt;P&gt;The program I've developped works fine when I'm flashing it from MCUXpresso, but doesn't work when flashed with pyOcd. I tried writting the most basic program with pyOcd, but it still fails to work properly. My program :&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;LI-CODE lang="python"&gt;options={"frequency": 1000000, "target_override": "LPC802", "hide_programming_progress": False}

with ConnectHelper.session_with_chosen_probe(options=options) as session:
target = session.board.target
target.reset_and_halt()

loader = FlashLoader(session, chip_erase="chip")
loader.add_data(0x400, [0xAA,0xBB,0xCC,0xDD])
loader.commit()&lt;/LI-CODE&gt;&lt;P&gt;I should just be able to write a single word&amp;nbsp; into flash.&lt;/P&gt;&lt;P&gt;After mass erase (pyocd erase --mass -t LPC802), running my script and using pyocd commander (pyocd commander -t LPC802 --connect=pre-reset) to check the value, i can see it's not written properly :&lt;/P&gt;&lt;P&gt;Connected to LPC802 [Halted]:&lt;BR /&gt;pyocd&amp;gt; read32 0x400&lt;BR /&gt;00000400: 50040a0a&lt;/P&gt;&lt;P&gt;After running my program a second time, the value is finally wirtten properly :&lt;/P&gt;&lt;P&gt;Connected to LPC802 [Halted]:&lt;BR /&gt;pyocd&amp;gt; read32 0x400&lt;BR /&gt;00000400: ddccbbaa&lt;/P&gt;&lt;P&gt;The intermediate value is not always the same. I'm facing the same issue with other LPC802.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried different things, but now I'm clueless on how to keep investigating on this subject. I would really appreciate if you had any idea of what is going on here.&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Oct 2025 15:52:26 GMT</pubDate>
    <dc:creator>JeanMichel</dc:creator>
    <dc:date>2025-10-13T15:52:26Z</dc:date>
    <item>
      <title>Flashing LPC802 with pyOcd</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flashing-LPC802-with-pyOcd/m-p/2184986#M58857</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm working with an LPC802, using MCUXpresso IDE and some external scripts relying on PyOcd v0.34.3. I'm connecting to the LPC802 with an MCU-link probe connected through the SWD pins.&lt;/P&gt;&lt;P&gt;The program I've developped works fine when I'm flashing it from MCUXpresso, but doesn't work when flashed with pyOcd. I tried writting the most basic program with pyOcd, but it still fails to work properly. My program :&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;LI-CODE lang="python"&gt;options={"frequency": 1000000, "target_override": "LPC802", "hide_programming_progress": False}

with ConnectHelper.session_with_chosen_probe(options=options) as session:
target = session.board.target
target.reset_and_halt()

loader = FlashLoader(session, chip_erase="chip")
loader.add_data(0x400, [0xAA,0xBB,0xCC,0xDD])
loader.commit()&lt;/LI-CODE&gt;&lt;P&gt;I should just be able to write a single word&amp;nbsp; into flash.&lt;/P&gt;&lt;P&gt;After mass erase (pyocd erase --mass -t LPC802), running my script and using pyocd commander (pyocd commander -t LPC802 --connect=pre-reset) to check the value, i can see it's not written properly :&lt;/P&gt;&lt;P&gt;Connected to LPC802 [Halted]:&lt;BR /&gt;pyocd&amp;gt; read32 0x400&lt;BR /&gt;00000400: 50040a0a&lt;/P&gt;&lt;P&gt;After running my program a second time, the value is finally wirtten properly :&lt;/P&gt;&lt;P&gt;Connected to LPC802 [Halted]:&lt;BR /&gt;pyocd&amp;gt; read32 0x400&lt;BR /&gt;00000400: ddccbbaa&lt;/P&gt;&lt;P&gt;The intermediate value is not always the same. I'm facing the same issue with other LPC802.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried different things, but now I'm clueless on how to keep investigating on this subject. I would really appreciate if you had any idea of what is going on here.&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Oct 2025 15:52:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flashing-LPC802-with-pyOcd/m-p/2184986#M58857</guid>
      <dc:creator>JeanMichel</dc:creator>
      <dc:date>2025-10-13T15:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Flashing LPC802 with pyOcd</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flashing-LPC802-with-pyOcd/m-p/2185091#M58858</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/255763"&gt;@JeanMichel&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;pyOCD is not a tool recommended or fully supported by NXP to be used on our MCUs. I highly recommend using MCUXpresso IDE instead.&lt;/P&gt;
&lt;P&gt;That said, here's a thread that might be useful for your inquiry:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/How-to-flash-a-LPC1114-with-pyocd-or-openocd-using-mcu-link/m-p/1654022" target="_blank"&gt;How to flash a LPC1114 with pyocd or openocd using mcu-link probe? - NXP Community&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Oct 2025 19:25:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flashing-LPC802-with-pyOcd/m-p/2185091#M58858</guid>
      <dc:creator>EdwinHz</dc:creator>
      <dc:date>2025-10-13T19:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Flashing LPC802 with pyOcd</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flashing-LPC802-with-pyOcd/m-p/2185491#M58859</link>
      <description>&lt;P&gt;Thank you for your response. I've already done all the setup part of making pyOcd and NXP probe/microcontrollers work together, as the scripts I'm using were working fine on other NXP microcontrollers (LPC55S06 and LPC824).&amp;nbsp;I understand that NXP doesn't support pyOcd though, so I'll try to get support on the pyOcd community.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2025 08:19:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flashing-LPC802-with-pyOcd/m-p/2185491#M58859</guid>
      <dc:creator>JeanMichel</dc:creator>
      <dc:date>2025-10-14T08:19:32Z</dc:date>
    </item>
  </channel>
</rss>

