<?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: USBDM software problems with Kinetis E targets in OSBDM and TBDML</title>
    <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620052#M3420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pgo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it is the cpu. It doesn't use an external crystal. Just after reset it&lt;/P&gt;&lt;P&gt;toggles the LED1...LED4 in sequence, 50ms per led.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also attached the elf file, so you can load it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here it is the startup:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAKED void Reset_Handler()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;DI();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// disable watchdog as early as possible, but set the update bit&lt;/P&gt;&lt;P&gt;// to allow the application to enable it later.&lt;/P&gt;&lt;P&gt;WDOG_UNLOCK();&lt;/P&gt;&lt;P&gt;// the following write sequence must be completed within 128 bus clocks&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;CS2 = 0;&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;TOVAL = 0xFFFF;&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;WIN = 0;&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;CS1 = 0x20; // update bit set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Disale NMI pin function, keep RESET and SWD pins&lt;/P&gt;&lt;P&gt;SIM-&amp;gt;SOPT &amp;amp;= ~SIM_SOPT_NMIE_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;extern uint32_t _etext, _data, _edata, _bss, _ebss;&lt;/P&gt;&lt;P&gt;uint32_t *src = &amp;amp;_etext;&lt;/P&gt;&lt;P&gt;uint32_t *dst = &amp;amp;_data;&lt;/P&gt;&lt;P&gt;while (dst &amp;lt; &amp;amp;_edata) *dst++ = *src++;&lt;/P&gt;&lt;P&gt;for (dst = &amp;amp;_bss; dst &amp;lt; &amp;amp;_ebss; dst++) *dst = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    main();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void Default_Handler()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    while (1) {}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void NMI_Handler()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the only other important thing in the sources is that after exactly&lt;/P&gt;&lt;P&gt;one second from reset I disable the SWD pins and enable the FTM1 and GPIO&lt;/P&gt;&lt;P&gt;on them for an emulated UART for debugging. Although I don't know if it is&lt;/P&gt;&lt;P&gt;a problem because the SWD pins can be enabled/disabled at will, they aren't&lt;/P&gt;&lt;P&gt;write once like the NMI and reset pins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help. If you connect at your board the leds on the pins used in&lt;/P&gt;&lt;P&gt;my schematic, you should see them light only once after reset for a good&lt;/P&gt;&lt;P&gt;program. As I said, when programmed with the current 160 with the patched&lt;/P&gt;&lt;P&gt;script, I can see them light repeatdly, the sign that there is a reset at&lt;/P&gt;&lt;P&gt;some point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-04-14 6:26 GMT+03:00 pgo &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;NXP Community&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;Re: USBDM software problems with Kinetis E targets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from pgo&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/pgo?et=watches.email.thread&amp;gt; in *OSBDM&lt;/P&gt;&lt;P&gt;and TBDML* - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/896889?commentID=896889&amp;amp;et=watches.email.thread#comment-896889&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Apr 2017 05:39:59 GMT</pubDate>
    <dc:creator>raimonddragomir</dc:creator>
    <dc:date>2017-04-14T05:39:59Z</dc:date>
    <item>
      <title>USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620037#M3405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using USBDM only for Kinetis E targets. I started with KE02Z microcontrollers and was using .120 version for quite a while. Recently I started using the more advanced KE1xF familiy (cortex-m4) and installed .150 and then .160 just to see if there is support for it (unfortunately... not... yet).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is that when I came back to my KE02Z devices nothing worked reliable. In fact the only thing working seems to be mass erase... I downgraded back to .150 - no luck. I downgraded again to .120 - Voila!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the .120 works just fine with KE02Z devices, the 150/160 seems not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a JS16 based dongle. Not tried with an OpenSDA one. For my KE1xF devices I'm using indeed a FRDM board for KE1xZ (because they have the same support for 5V devices like the TWR18F boards) and an opensda version for segger j-link :smileyalert:&amp;nbsp;It's just a shame that the open source opensda firmware for these devices is not yet functional :smileysad:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I will see KE1xF support for USBDM soon!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, a very interesting feature would be a possibility to partition the FlexNVM system for using as eeprom. The chips come with the FlexNVM factory default as all dataflash, and if you really &amp;nbsp;want to use it as eeprom you need to run first a small application which configures it as such. Besides developing such an application, this implies another step in production programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Raimond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Mar 2017 13:04:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620037#M3405</guid>
      <dc:creator>raimonddragomir</dc:creator>
      <dc:date>2017-03-05T13:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620038#M3406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raimond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am very busy at the moment and don't have time to do much investigation but I did the following tests with the stand-alone programmer:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;FRDM-KE02Z40M board using the on-board programming hardware&lt;/LI&gt;&lt;LI&gt;FRDM-KE02Z board using the on-board programming hardware&lt;/LI&gt;&lt;LI&gt;FRDM-KE15Z board using the on-board programming hardware&lt;/LI&gt;&lt;LI&gt;Minimal S9KEAZN8 with JS16 programmer&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;Minimal S9KEAZN64 with JS16 programmer&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;They all programmed correctly with a synthetic test file that fully occupies the flash.&amp;nbsp; This was with version 4.12.1.160.&lt;/P&gt;&lt;P&gt;Did you update the BDM firmware when you tried the later versions of USBDM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will do a more thorough check when I have time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have access to a MK1xF device which is why it is not supported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 11:34:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620038#M3406</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2017-03-07T11:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620039#M3407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pgo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't seem the JS16 firmware is changed from 120 to 160. Is it? I'm&lt;/P&gt;&lt;P&gt;using a JS16 hardware.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really don't remember if the usbdm on my FRDM boards worked or not with&lt;/P&gt;&lt;P&gt;KE02Z devices. I tried my FRDM-KE15Z to make it work with a KE14F256 target&lt;/P&gt;&lt;P&gt;with no luck.  As I said, it even didn't work with the "official" opensda&lt;/P&gt;&lt;P&gt;distribution (and found on some forum that this is true, and the only&lt;/P&gt;&lt;P&gt;chance is a segger j-link firmware/software...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the combination that seems not to work is 150b/160 software with JS16&lt;/P&gt;&lt;P&gt;programming dongle for Kinetis E targets...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Raimond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-03-07 13:35 GMT+02:00 pgo &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;NXP Community&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;Re: USBDM software problems with Kinetis E targets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from pgo&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/pgo?et=watches.email.thread&amp;gt; in *OSBDM&lt;/P&gt;&lt;P&gt;and TBDML* - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/884391?commentID=884391&amp;amp;et=watches.email.thread#comment-884391&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 14:02:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620039#M3407</guid>
      <dc:creator>raimonddragomir</dc:creator>
      <dc:date>2017-03-07T14:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620040#M3408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raimond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide the exact part number of the device you find the programming fails on?&lt;/P&gt;&lt;P&gt;The circuit might also be useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2017 09:18:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620040#M3408</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2017-03-08T09:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620041#M3409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pgo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what failed was an MKE02Z16VLD2 and an MKE02Z64VLD2 (16K and 64K otherwise&lt;/P&gt;&lt;P&gt;the same chip).&lt;/P&gt;&lt;P&gt;One of them has NMI as output, but it's driving a load that has a 13K&lt;/P&gt;&lt;P&gt;equivalent resistance to GND. The other one is an input (the MISO pin at a&lt;/P&gt;&lt;P&gt;SPI port). That one receives the output of a SPI device.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also disable the NMI in my firmwares. This NMI thing is annoying, I don't&lt;/P&gt;&lt;P&gt;know why this NMI thing gets in the 21st century microcontrollers...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, I found an issue o these 5V micros: On some of my 5V designs, I setup&lt;/P&gt;&lt;P&gt;the LVD trip point to 4.3V. Later, I made a design with the same chip (an&lt;/P&gt;&lt;P&gt;MKE02Z16VLC2) but at 3.3V, and forgot the LVD trip point to 4.3V. Result:&lt;/P&gt;&lt;P&gt;the chip never came up from reset (or if it did it was for a very short&lt;/P&gt;&lt;P&gt;time - in fact it must be it, because that setting of the LVD was in my&lt;/P&gt;&lt;P&gt;application). Also, the reset line was kept as an output low - I found this&lt;/P&gt;&lt;P&gt;because when I tried an opensda dongle it turned up in bootloader mode!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution was to cut the 3.3V trace from the chip - I was lucky about it&lt;/P&gt;&lt;P&gt;because it was simple enough) and to connect a 5V to it. The chip started&lt;/P&gt;&lt;P&gt;normally and I was able to reprogram it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, it is a possibility of "bricking" a device like this. But I'm thinking,&lt;/P&gt;&lt;P&gt;because the application is really starting for a moment, is this a&lt;/P&gt;&lt;P&gt;possibility to unbrick the chip with USBDM? A solution would be that the&lt;/P&gt;&lt;P&gt;USBDM to connect to the chip under reset. But this seems that it is not&lt;/P&gt;&lt;P&gt;working, and I don't understand why. My command line is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"C:\Program Files\pgo\USBDM 4.12.1.150\UsbdmFlashProgrammer.exe"&lt;/P&gt;&lt;P&gt;-device=MKE02Z16M2 -useReset -erase=mass -program -execute a.axf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I understand that "useReset" is the flag that tells it to connect to&lt;/P&gt;&lt;P&gt;the chip under reset. Is it correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raimond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-03-08 11:19 GMT+02:00 pgo &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;NXP Community&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;Re: USBDM software problems with Kinetis E targets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from pgo&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/pgo?et=watches.email.thread&amp;gt; in *OSBDM&lt;/P&gt;&lt;P&gt;and TBDML* - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/884702?commentID=884702&amp;amp;et=watches.email.thread#comment-884702&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2017 09:42:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620041#M3409</guid>
      <dc:creator>raimonddragomir</dc:creator>
      <dc:date>2017-03-08T09:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620042#M3410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raimond,&lt;/P&gt;&lt;P&gt;I suspect it is the NMI that is upsetting the programming.&lt;/P&gt;&lt;P&gt;I have ordered a MKE02Z16VLD2 and will build a minimal prototype for testing but this will not occur for a while.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The NMI can't (normally) be disabled in by the USBDM programming since once disabled it cannot be enabled except by a power-on reset I believe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 09:15:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620042#M3410</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2017-03-22T09:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620043#M3411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;The NMI can't (normally) be disabled in by the USBDM programming since&lt;/P&gt;&lt;P&gt;once disabled it cannot be enabled except by a power-on reset I believe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;I don't  think so, the NMI and RESET enabling bits are write-once, but&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;after ANY reset. So as long as you reset the chip after programming, it&lt;/P&gt;&lt;P&gt;should work. I didn't test that, but you can test it when you'll work on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding this, the KE1x family is improved anyway, because the NMI and&lt;/P&gt;&lt;P&gt;RESET pins can be enabled/disabled in the FOPT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Raimond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 11:36:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620043#M3411</guid>
      <dc:creator>raimonddragomir</dc:creator>
      <dc:date>2017-03-22T11:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620044#M3412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raymond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are correct which leaves me puzzled since I checked that before posting.&amp;nbsp; I must have looked at the wrong data sheet :smileyhappy:&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is still a problem since the FOPT_NMI is unaffected by &lt;STRONG&gt;&lt;EM&gt;normal&lt;/EM&gt; &lt;/STRONG&gt;resets so the programmer would have to restore the value which would be an issue as it would lock the value.&amp;nbsp; The only approach would be to restore the value and then&amp;nbsp; do a reset to unlock it.&amp;nbsp; There isn't provision to do this in the debug sequence but it could be done for general programming where it wouldn't matter - except they share the same code.&amp;nbsp; I will have to think if this is practical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically the NMI pin is a pain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Mar 2017 22:19:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620044#M3412</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2017-03-23T22:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620045#M3413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree :smileyhappy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because the KE0x family is different from KE1x I would see two different&lt;/P&gt;&lt;P&gt;approaches:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KE0x:&lt;/P&gt;&lt;P&gt;1 disable NMI&lt;/P&gt;&lt;P&gt;2 do programming&lt;/P&gt;&lt;P&gt;3 reset&lt;/P&gt;&lt;P&gt;4 enable NMI&lt;/P&gt;&lt;P&gt;5 reset&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KE1x:&lt;/P&gt;&lt;P&gt;1 disable NMI: PORTD-&amp;gt;PCR[3] = 0x100; // ALT1=gpio&lt;/P&gt;&lt;P&gt;2 do programming&lt;/P&gt;&lt;P&gt;3 enable NMI: PORTD-&amp;gt;PCR[3] = 0x703; // ALT7=NMI, pull-up enable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KE1x is simpler,  no write-once bits, FOPT option...&lt;/P&gt;&lt;P&gt;You are right, FOPT is loaded only on POR, but there is no problem to&lt;/P&gt;&lt;P&gt;restore the NMI settings in code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Raimond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-03-24 0:20 GMT+02:00 pgo &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;NXP Community&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;Re: USBDM software problems with Kinetis E targets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from pgo&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/pgo?et=watches.email.thread&amp;gt; in *OSBDM&lt;/P&gt;&lt;P&gt;and TBDML* - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/890259?commentID=890259&amp;amp;et=watches.email.thread#comment-890259&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 05:56:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620045#M3413</guid>
      <dc:creator>raimonddragomir</dc:creator>
      <dc:date>2017-03-24T05:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620046#M3414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raymond,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;I have restored the old behaviour of disabling NMI for the MKE devices but it doesn't currently re-enable as there isn't a convenient point in the programming sequence to do it.&amp;nbsp; I don't want to modify the software - just the TCL scripts.&amp;nbsp; I will have to look at this more carefully but I will probably wait until I have a minimum chip on a proto-board.&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;The idea of disabling the pin function on the MK1x devices is interesting but I haven't thought it through.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;In any case I have just uploaded V12.160 to sourceforge which I would appreciate you testing and see if this is actually an issue with the NMI as suspected.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;If you want to play with this yourself you can try modifying the TCL scripts and possible the ARM devices XML.&amp;nbsp; Note that you would have to run the programmer directly from the &lt;STRONG&gt;&lt;EM&gt;executable&lt;/EM&gt; &lt;/STRONG&gt;as the Windows &lt;STRONG&gt;&lt;EM&gt;shortcut&lt;/EM&gt; &lt;/STRONG&gt;will automatically restore the old files!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 06:54:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620046#M3414</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2017-03-24T06:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620047#M3415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks pgo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will play with it a bit in the weekend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-03-24 8:55 GMT+02:00 pgo &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;NXP Community&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;Re: USBDM software problems with Kinetis E targets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from pgo&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/pgo?et=watches.email.thread&amp;gt; in *OSBDM&lt;/P&gt;&lt;P&gt;and TBDML* - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/890383?commentID=890383&amp;amp;et=watches.email.thread#comment-890383&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 07:27:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620047#M3415</guid>
      <dc:creator>raimonddragomir</dc:creator>
      <dc:date>2017-03-24T07:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620048#M3416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pgo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Didn't have much time, but I do tested on one board with a MKE02Z64VLD2&lt;/P&gt;&lt;P&gt;(NMI used as SPI_MISO).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;160 version is able to autodetect the chip, but it fail to mass-erase&lt;/P&gt;&lt;P&gt;and/or load the file with the following message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(the same reason for mass-erase - this seems to be new, I remember&lt;/P&gt;&lt;P&gt;mass-erase working...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using 120 version still works like a charm.... :smileyhappy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My firmware does nothing special about the reset, nmi and swd pins, except&lt;/P&gt;&lt;P&gt;disabling the nmi pin very shortly after reset. reset and swd pins are not&lt;/P&gt;&lt;P&gt;touched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a side remark, I am very happy about 120 version, which works very well&lt;/P&gt;&lt;P&gt;with my KE02 chips. I only switched to newer versions to see if they&lt;/P&gt;&lt;P&gt;support the KE1xF (the cortex-m4 F series, not Z series).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would keep an eye of the USBD development in this regard. I'm forced to&lt;/P&gt;&lt;P&gt;use a FRDM-KE15Z board with a segger j-link firmware for programming them&lt;/P&gt;&lt;P&gt;(this FRDM board because it has good 3V-5V target support in hardware).&lt;/P&gt;&lt;P&gt;Although I also tested the internal bootloader on these chips with good&lt;/P&gt;&lt;P&gt;success, it's hard to make my mind in choosing SWD or the bootloader. There&lt;/P&gt;&lt;P&gt;are FOPT values that can brick the chip if using only the bootloader&lt;/P&gt;&lt;P&gt;option...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Raimond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-03-24 9:26 GMT+02:00 Raimond Dragomir &amp;lt;raimond.dragomir@gmail.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;Thanks pgo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will play with it a bit in the weekend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;2017-03-24 8:55 GMT+02:00 pgo &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&amp;gt; NXP Community&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Re: USBDM software problems with Kinetis E targets&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; reply from pgo&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &amp;lt;https://community.nxp.com/people/pgo?et=watches.email.thread&amp;gt; in *OSBDM&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; and TBDML* - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &amp;lt;https://community.nxp.com/message/890383?commentID=890383&amp;amp;et=watches.email.thread#comment-890383&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Mar 2017 09:57:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620048#M3416</guid>
      <dc:creator>raimonddragomir</dc:creator>
      <dc:date>2017-03-26T09:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620049#M3417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raymond,&lt;/P&gt;&lt;P&gt;It has taken a while to get back to this.&lt;/P&gt;&lt;P&gt;I have just built a minimal MKE02Z64VLD2 board to test with.&lt;/P&gt;&lt;P&gt;I have located a problem in the &lt;STRONG&gt;&lt;EM&gt;C:\Program Files (x86)\pgo\USBDM 4.12.1.160\DeviceData\ARM\Kinetis-KExx-flash-scripts.tcl&lt;/EM&gt;&lt;/STRONG&gt; script used for the MKE02 chips.&lt;/P&gt;&lt;P&gt;I have attached the fixed file if you feel inclined to try it.&amp;nbsp; It should work with whatever version of USBDM is installed and work irrespective of the NMI pin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 12:03:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620049#M3417</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2017-04-12T12:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620050#M3418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I responded to the wrong thread...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it is again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi pgo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry to dissapoint you, but it's still not working. Something happens just&lt;/P&gt;&lt;P&gt;at the end of flash programming (I can see the progress because it's a ~16K&lt;/P&gt;&lt;P&gt;binary). Then it fails with this message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Programming of the target flash failed! Reason: Internal program error -&lt;/P&gt;&lt;P&gt;please report).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The interesting thing is that the programmed binary is almost working! Only&lt;/P&gt;&lt;P&gt;that it's resetting itself after probably one second. I saw this easily on&lt;/P&gt;&lt;P&gt;my board because I have a flashing led pattern in the first 200ms in my&lt;/P&gt;&lt;P&gt;application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also installed 140 version (I had 120) and I can confirm it's working.&lt;/P&gt;&lt;P&gt;Now I have the 140 and 160 versions on my computer. 140 is working well,&lt;/P&gt;&lt;P&gt;160 fails in this new way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The chip is a MKE02Z64VLD2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-04-12 15:03 GMT+03:00 pgo &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;NXP Community&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;Re: USBDM software problems with Kinetis E targets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from pgo&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/pgo?et=watches.email.thread&amp;gt; in *OSBDM&lt;/P&gt;&lt;P&gt;and TBDML* - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/896258?commentID=896258&amp;amp;et=watches.email.thread#comment-896258&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 12:55:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620050#M3418</guid>
      <dc:creator>raimonddragomir</dc:creator>
      <dc:date>2017-04-12T12:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620051#M3419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raimond,&lt;/P&gt;&lt;P&gt;Sorry to hear that! Thanks for your patience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will probably upload V4.12.1.170 anyway, as it has some other bug fixes.&lt;/P&gt;&lt;P&gt;The device tested was a MKE02Z64VLD2 with the following very minimal circuit:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6497i542F45F43A44B198/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The test file was a random data image 64K flash+256 byes eeprom.&lt;/P&gt;&lt;P&gt;Testing was done with a MK22F and a JS16-SWD version of USBDM hardware.&lt;/P&gt;&lt;P&gt;Tested with NMI open and pulled low.&lt;/P&gt;&lt;P&gt;This testing was done with the stand-alone programmer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you upload you test program please and I will see if it behaves differently.&lt;/P&gt;&lt;P&gt;It is also possible that some other changes in V4.12.1.170 affect things I suppose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Apr 2017 03:25:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620051#M3419</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2017-04-14T03:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620052#M3420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pgo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it is the cpu. It doesn't use an external crystal. Just after reset it&lt;/P&gt;&lt;P&gt;toggles the LED1...LED4 in sequence, 50ms per led.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also attached the elf file, so you can load it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here it is the startup:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAKED void Reset_Handler()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;DI();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// disable watchdog as early as possible, but set the update bit&lt;/P&gt;&lt;P&gt;// to allow the application to enable it later.&lt;/P&gt;&lt;P&gt;WDOG_UNLOCK();&lt;/P&gt;&lt;P&gt;// the following write sequence must be completed within 128 bus clocks&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;CS2 = 0;&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;TOVAL = 0xFFFF;&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;WIN = 0;&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;CS1 = 0x20; // update bit set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Disale NMI pin function, keep RESET and SWD pins&lt;/P&gt;&lt;P&gt;SIM-&amp;gt;SOPT &amp;amp;= ~SIM_SOPT_NMIE_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;extern uint32_t _etext, _data, _edata, _bss, _ebss;&lt;/P&gt;&lt;P&gt;uint32_t *src = &amp;amp;_etext;&lt;/P&gt;&lt;P&gt;uint32_t *dst = &amp;amp;_data;&lt;/P&gt;&lt;P&gt;while (dst &amp;lt; &amp;amp;_edata) *dst++ = *src++;&lt;/P&gt;&lt;P&gt;for (dst = &amp;amp;_bss; dst &amp;lt; &amp;amp;_ebss; dst++) *dst = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    main();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void Default_Handler()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    while (1) {}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void NMI_Handler()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the only other important thing in the sources is that after exactly&lt;/P&gt;&lt;P&gt;one second from reset I disable the SWD pins and enable the FTM1 and GPIO&lt;/P&gt;&lt;P&gt;on them for an emulated UART for debugging. Although I don't know if it is&lt;/P&gt;&lt;P&gt;a problem because the SWD pins can be enabled/disabled at will, they aren't&lt;/P&gt;&lt;P&gt;write once like the NMI and reset pins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help. If you connect at your board the leds on the pins used in&lt;/P&gt;&lt;P&gt;my schematic, you should see them light only once after reset for a good&lt;/P&gt;&lt;P&gt;program. As I said, when programmed with the current 160 with the patched&lt;/P&gt;&lt;P&gt;script, I can see them light repeatdly, the sign that there is a reset at&lt;/P&gt;&lt;P&gt;some point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-04-14 6:26 GMT+03:00 pgo &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;NXP Community&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;Re: USBDM software problems with Kinetis E targets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from pgo&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/pgo?et=watches.email.thread&amp;gt; in *OSBDM&lt;/P&gt;&lt;P&gt;and TBDML* - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/896889?commentID=896889&amp;amp;et=watches.email.thread#comment-896889&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Apr 2017 05:39:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620052#M3420</guid>
      <dc:creator>raimonddragomir</dc:creator>
      <dc:date>2017-04-14T05:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620053#M3421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Connect the leds in sinking mode like this (I noticed you put your leds in&lt;/P&gt;&lt;P&gt;sourcing mode):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-04-14 8:39 GMT+03:00 Raimond Dragomir &amp;lt;raimond.dragomir@gmail.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;Hi pgo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it is the cpu. It doesn't use an external crystal. Just after reset&lt;/P&gt;&lt;P&gt;it toggles the LED1...LED4 in sequence, 50ms per led.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also attached the elf file, so you can load it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here it is the startup:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAKED void Reset_Handler()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;DI();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// disable watchdog as early as possible, but set the update bit&lt;/P&gt;&lt;P&gt;// to allow the application to enable it later.&lt;/P&gt;&lt;P&gt;WDOG_UNLOCK();&lt;/P&gt;&lt;P&gt;// the following write sequence must be completed within 128 bus clocks&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;CS2 = 0;&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;TOVAL = 0xFFFF;&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;WIN = 0;&lt;/P&gt;&lt;P&gt;WDOG-&amp;gt;CS1 = 0x20; // update bit set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Disale NMI pin function, keep RESET and SWD pins&lt;/P&gt;&lt;P&gt;SIM-&amp;gt;SOPT &amp;amp;= ~SIM_SOPT_NMIE_MASK;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;extern uint32_t _etext, _data, _edata, _bss, _ebss;&lt;/P&gt;&lt;P&gt;uint32_t *src = &amp;amp;_etext;&lt;/P&gt;&lt;P&gt;uint32_t *dst = &amp;amp;_data;&lt;/P&gt;&lt;P&gt;while (dst &amp;lt; &amp;amp;_edata) *dst++ = *src++;&lt;/P&gt;&lt;P&gt;for (dst = &amp;amp;_bss; dst &amp;lt; &amp;amp;_ebss; dst++) *dst = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    main();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void Default_Handler()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    while (1) {}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void NMI_Handler()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the only other important thing in the sources is that after&lt;/P&gt;&lt;P&gt;exactly one second from reset I disable the SWD pins and enable the FTM1&lt;/P&gt;&lt;P&gt;and GPIO on them for an emulated UART for debugging. Although I don't know&lt;/P&gt;&lt;P&gt;if it is a problem because the SWD pins can be enabled/disabled at will,&lt;/P&gt;&lt;P&gt;they aren't write once like the NMI and reset pins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help. If you connect at your board the leds on the pins used in&lt;/P&gt;&lt;P&gt;my schematic, you should see them light only once after reset for a good&lt;/P&gt;&lt;P&gt;program. As I said, when programmed with the current 160 with the patched&lt;/P&gt;&lt;P&gt;script, I can see them light repeatdly, the sign that there is a reset at&lt;/P&gt;&lt;P&gt;some point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-04-14 6:26 GMT+03:00 pgo &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;gt;&amp;gt; NXP Community&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Re: USBDM software problems with Kinetis E targets&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; reply from pgo&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &amp;lt;https://community.nxp.com/people/pgo?et=watches.email.thread&amp;gt; in *OSBDM&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; and TBDML* - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; &amp;lt;https://community.nxp.com/message/896889?commentID=896889&amp;amp;et=watches.email.thread#comment-896889&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Apr 2017 05:44:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620053#M3421</guid>
      <dc:creator>raimonddragomir</dc:creator>
      <dc:date>2017-04-14T05:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620054#M3422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raimond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The image file appears to contain data intended for RAM.&amp;nbsp; The programmer&amp;nbsp; is choking on that:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; doFlashBlock(): op=OpWriteRam, [0x1FFFFC00..0x1FFFFC2F]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; doFlashBlock(): Processing RAM[0x1FFFFC00..0x1FFFFC2F]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loadTargetProgram(): Failed, no flash program found for target&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It is unusual to have RAM in an image intended for programming but the programmer should still write the data to RAM -&amp;nbsp; It appears to be confused and is looking for a programming algorithm that applies to that range of memory.&lt;/P&gt;&lt;P&gt;RAM processing is done as a second pass after the Flash programming.&amp;nbsp; This means that the Flash has actually been successfully programmed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll look at the reason for the failure.&amp;nbsp; It may be that the ELF loading code is incorrectly assuming the RAM block needs to be loaded.&lt;/P&gt;&lt;P&gt;I would also suggest you check your map file and linker file to see where the RAM data is coming from.&amp;nbsp; The segment may be incorrectly configured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either way it should not fail in this fashion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS.&lt;/P&gt;&lt;P&gt;OK - fixed (I hope) in the version being uploaded.&lt;/P&gt;&lt;P&gt;As a further note: Images containing RAM data may fail verify as the RAM data is (of course) volatile.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Apr 2017 06:19:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620054#M3422</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2017-04-14T06:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620055#M3423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Weird. See the files attached. From what I can see the ram implied is from&lt;/P&gt;&lt;P&gt;the .data segment, the load address being 0x03C90 in flash.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I may suspect that your program loaded the flash only until the 0x03C90 and&lt;/P&gt;&lt;P&gt;the last 0x30 bytes directly in RAM... And my application just doesn't have&lt;/P&gt;&lt;P&gt;the data at 0x03C90 at runtime...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-04-14 9:19 GMT+03:00 pgo &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;NXP Community&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;Re: USBDM software problems with Kinetis E targets&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from pgo&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/pgo?et=watches.email.thread&amp;gt; in *OSBDM&lt;/P&gt;&lt;P&gt;and TBDML* - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/896895?commentID=896895&amp;amp;et=watches.email.thread#comment-896895&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Apr 2017 07:56:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620055#M3423</guid>
      <dc:creator>raimonddragomir</dc:creator>
      <dc:date>2017-04-14T07:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: USBDM software problems with Kinetis E targets</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620056#M3424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raimond,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Version 4.12.1.170 uses a different method for loading ELF files which should operate correctly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Apr 2017 11:41:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/USBDM-software-problems-with-Kinetis-E-targets/m-p/620056#M3424</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2017-04-14T11:41:58Z</dc:date>
    </item>
  </channel>
</rss>

