<?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: Cannto debug Kinetis S9KEAZ128 - Mask set problem? in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Cannto-debug-Kinetis-S9KEAZ128-Mask-set-problem/m-p/678874#M8976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class=""&gt;&lt;P&gt;Hi Tevfik,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;You are welcome, it is good to hear you can flash and debug them now. &lt;BR /&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Carlos Mendoza&lt;BR /&gt;Technical Support Engineer&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Jul 2017 13:53:31 GMT</pubDate>
    <dc:creator>Carlos_Mendoza</dc:creator>
    <dc:date>2017-07-31T13:53:31Z</dc:date>
    <item>
      <title>Cannto debug Kinetis S9KEAZ128 - Mask set problem?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Cannto-debug-Kinetis-S9KEAZ128-Mask-set-problem/m-p/678871#M8973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to debug an S9KEAZ128AMLH with KDS 3.2.0 installed on windows 10 and Segger J-Link EDU but it looks like I'm stumbling on the mask set issues adressed in e6945 and e6946 erratas.&lt;/P&gt;&lt;P&gt;I'm working on a few of our in-house&amp;nbsp;designed prototype boards. I checked all the SWD connections from Segger outputs to MCU inputs. All seem fine.&lt;/P&gt;&lt;P&gt;When I tried debugging the first time everything was working well. Flashing leds, reading inputs, timer interrupt etc. But after a few times of flashing the MCU I began to receive&amp;nbsp;an error code that the debugger could not detect CPU clock speed.&lt;/P&gt;&lt;P&gt;I've been trying all solutions I could find in this forum. Tried updating drivers, re-installing all software, adding debugger commands&amp;nbsp;as recommended here. Nothing works.&lt;/P&gt;&lt;P&gt;I read the erratas about mask sets 2N22J and 2N45K. We have two sets of S9KEAZ128 MCUs purchased at different times and they happen to belong to those mask sets.&lt;/P&gt;&lt;P&gt;The errata documents speak of a solution about setting up the debugger in certain ways to avoid MCU lockup but I don't know how to set up the debugger so well. Can't NXP release a debugger script to work around that error?&lt;/P&gt;&lt;P&gt;We need to get these boards running and we're far behind schedule. Please help.&lt;/P&gt;&lt;P&gt;Here is a log of my latest trial:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEGGER J-Link GDB Server V5.10n Command Line Version&lt;/P&gt;&lt;P&gt;JLinkARM.dll V5.10n (DLL compiled Feb 19 2016 18:39:11)&lt;/P&gt;&lt;P&gt;-----GDB Server start settings-----&lt;BR /&gt;GDBInit file: none&lt;BR /&gt;GDB Server Listening port: 2331&lt;BR /&gt;SWO raw output listening port: 2332&lt;BR /&gt;Terminal I/O port: 2333&lt;BR /&gt;Accept remote connection: localhost only&lt;BR /&gt;Generate logfile: off&lt;BR /&gt;Verify download: on&lt;BR /&gt;Init regs on start: on&lt;BR /&gt;Silent mode: off&lt;BR /&gt;Single run mode: on&lt;BR /&gt;Target connection timeout: 0 ms&lt;BR /&gt;------J-Link related settings------&lt;BR /&gt;J-Link Host interface: USB&lt;BR /&gt;J-Link script: none&lt;BR /&gt;J-Link settings file: none&lt;BR /&gt;------Target related settings------&lt;BR /&gt;Target device: SKEAZ128xxx4&lt;BR /&gt;Target interface: SWD&lt;BR /&gt;Target interface speed: 4000kHz&lt;BR /&gt;Target endian: little&lt;/P&gt;&lt;P&gt;Connecting to J-Link...&lt;BR /&gt;J-Link is connected.&lt;BR /&gt;Firmware: J-Link V9 compiled Jun 16 2017 16:15:10&lt;BR /&gt;Hardware: V9.30&lt;BR /&gt;S/N: 269305461&lt;BR /&gt;OEM: SEGGER-EDU&lt;BR /&gt;Feature(s): FlashBP, GDB&lt;BR /&gt;Checking target voltage...&lt;BR /&gt;Target voltage: 4.88 V&lt;BR /&gt;Listening on TCP/IP port 2331&lt;BR /&gt;Connecting to target...Connected to target&lt;BR /&gt;Waiting for GDB connection...Connected to 127.0.0.1&lt;BR /&gt;Reading all registers&lt;BR /&gt;Read 4 bytes @ address 0x00000000 (Data = 0xFFFFFFFF)&lt;BR /&gt;Target interface speed set to 1000 kHz&lt;BR /&gt;Resetting target&lt;BR /&gt;Halting target CPU...&lt;BR /&gt;...Target halted (PC = 0xFFFFFFFE)&lt;BR /&gt;R0 = 00820180, R1 = 02000401, R2 = 10000080, R3 = 00802080&lt;BR /&gt;R4 = 30110408, R5 = 04000A08, R6 = 80231008, R7 = 10126020&lt;BR /&gt;R8 = 25084000, R9 = 14020012, R10= 04000400, R11= 000E0004&lt;BR /&gt;R12= 00200000, R13= FFFFFFFC, MSP= FFFFFFFC, PSP= 00050040&lt;BR /&gt;R14(LR) = FFFFFFF9, R15(PC) = FFFFFFFE&lt;BR /&gt;XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000&lt;BR /&gt;CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00&lt;BR /&gt;Reading all registers&lt;BR /&gt;Select auto target interface speed (2000 kHz)&lt;BR /&gt;Flash breakpoints enabled&lt;BR /&gt;Semi-hosting enabled (Handle on BKPT)&lt;BR /&gt;Semihosting I/O set to TELNET Client&lt;BR /&gt;SWO disabled succesfully.&lt;BR /&gt;ERROR: Failed to preserve original RAM content before CPU clock frequency detection!&lt;BR /&gt;Failed to restore original RAM content after CPU clock frequency detection!&lt;/P&gt;&lt;P&gt;Failed to enable SWO. Could not measure target CPU frequency.&lt;BR /&gt;Writing 0x06 @ address 0x40064000&lt;BR /&gt;Writing 0x0000000C @ address 0x40048004&lt;BR /&gt;Downloading 192 bytes @ address 0x00000000 - Verified OK&lt;BR /&gt;Downloading 16 bytes @ address 0x00000400 - Verified OK&lt;BR /&gt;Downloading 2660 bytes @ address 0x00000410 - Verified OK&lt;BR /&gt;Downloading 8 bytes @ address 0x00000E74 - Verified OK&lt;BR /&gt;Downloading 4 bytes @ address 0x00000E7C - Verified OK&lt;BR /&gt;Downloading 4 bytes @ address 0x00000E80 - Verified OK&lt;BR /&gt;Downloading 96 bytes @ address 0x00000E84 - Verified OK&lt;BR /&gt;Downloading 24 bytes @ address 0x00000EE4 - Verified OK&lt;BR /&gt;ERROR: Failed to measure CPU clock frequency&lt;BR /&gt;Could not detect CPU clock speed. Download of test code into RAM failed.&lt;/P&gt;&lt;P&gt;Writing register (PC = 0x00000a4c)&lt;BR /&gt;Read 4 bytes @ address 0x00000A4C (Data = 0xFFFFFFFF)&lt;BR /&gt;Read 2 bytes @ address 0x000008C4 (Data = 0xFFFF)&lt;BR /&gt;Read 2 bytes @ address 0x000008C4 (Data = 0xFFFF)&lt;BR /&gt;Resetting target&lt;BR /&gt;Halting target CPU...&lt;BR /&gt;...Target halted (PC = 0xFFFFFFFE)&lt;BR /&gt;Read 2 bytes @ address 0x000008C4 (Data = 0xFFFF)&lt;BR /&gt;Read 2 bytes @ address 0x000008C4 (Data = 0xFFFF)&lt;BR /&gt;Read 2 bytes @ address 0x000008C4 (Data = 0xFFFF)&lt;BR /&gt;R0 = 00820180, R1 = 02000401, R2 = 10000080, R3 = 00802080&lt;BR /&gt;R4 = 30110408, R5 = 04000A08, R6 = 80231008, R7 = 10126020&lt;BR /&gt;R8 = 25084000, R9 = 14020012, R10= 04000400, R11= 000E0004&lt;BR /&gt;R12= 00200000, R13= FFFFFFFC, MSP= FFFFFFFC, PSP= 00050040&lt;BR /&gt;R14(LR) = FFFFFFF9, R15(PC) = FFFFFFFE&lt;BR /&gt;XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000&lt;BR /&gt;CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00&lt;BR /&gt;Reading all registers&lt;BR /&gt;WARNING: Failed to read memory @ address 0xFFFFFFFE&lt;BR /&gt;Setting breakpoint @ address 0x000008C4, Size = 2, BPHandle = 0x0001&lt;BR /&gt;Starting target CPU...&lt;BR /&gt;...Target halted (PC = 0xFFFFFFFE)&lt;BR /&gt;Reading all registers&lt;BR /&gt;Removing breakpoint @ address 0x000008C4, Size = 2&lt;BR /&gt;WARNING: Failed to read memory @ address 0xFFFFFFFE&lt;BR /&gt;WARNING: Failed to read memory @ address 0xFFFFFFF4&lt;BR /&gt;Reading 64 bytes @ address 0xFFFFFFC0&lt;BR /&gt;WARNING: Failed to read memory @ address 0xFFFFFFC0&lt;BR /&gt;Reading 64 bytes @ address 0xFFFFFFC0&lt;BR /&gt;WARNING: Failed to read memory @ address 0xFFFFFFC0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2017 06:36:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Cannto-debug-Kinetis-S9KEAZ128-Mask-set-problem/m-p/678871#M8973</guid>
      <dc:creator>tevfikbasaran</dc:creator>
      <dc:date>2017-07-24T06:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cannto debug Kinetis S9KEAZ128 - Mask set problem?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Cannto-debug-Kinetis-S9KEAZ128-Mask-set-problem/m-p/678872#M8974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tevfik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can disable NMI functionality (if this is not used) by writing to SIM_SOPT[NMIE] field (write 0 to disable NMI) so you can avoid having the e6945 issue. You can write this value in linker section so this value will be loaded after Power-On Reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the errata e6946, halting the processor in Debug state before performing writes to the I/O port region of the memory map should work. From your log I see that you are already doing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Carlos Mendoza&lt;BR /&gt;Technical Support Engineer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2017 21:50:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Cannto-debug-Kinetis-S9KEAZ128-Mask-set-problem/m-p/678872#M8974</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2017-07-27T21:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cannto debug Kinetis S9KEAZ128 - Mask set problem?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Cannto-debug-Kinetis-S9KEAZ128-Mask-set-problem/m-p/678873#M8975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;Thanks for the info.&lt;/P&gt;&lt;P&gt;It turned out that we had two sets MCUs for the proto boards we were working on nowadays. KEAZN64AMLH and KEAZ128AMLH. The board I was having trouble with had a KEAZ64 on it, but I was trying to debug it with KEAZ128 settings in Processor Expert!!&lt;/P&gt;&lt;P&gt;So I prepared two new proto boards with KEAZ128. I can flash and debug them now.&lt;/P&gt;&lt;P&gt;However, I also tried KEAZN64 MCUs on proto boards (this time with proper configuration) and all of the story above is there again. All our focus nowadays is on those KEAZ128 MCUs, so I won't spend time trying to debug KEAZ64. I may ask for help on that later again.&lt;/P&gt;&lt;P&gt;Tevfik Basaran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Jul 2017 11:24:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Cannto-debug-Kinetis-S9KEAZ128-Mask-set-problem/m-p/678873#M8975</guid>
      <dc:creator>tevfikbasaran</dc:creator>
      <dc:date>2017-07-30T11:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cannto debug Kinetis S9KEAZ128 - Mask set problem?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Cannto-debug-Kinetis-S9KEAZ128-Mask-set-problem/m-p/678874#M8976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class=""&gt;&lt;P&gt;Hi Tevfik,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;You are welcome, it is good to hear you can flash and debug them now. &lt;BR /&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Carlos Mendoza&lt;BR /&gt;Technical Support Engineer&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 13:53:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Cannto-debug-Kinetis-S9KEAZ128-Mask-set-problem/m-p/678874#M8976</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2017-07-31T13:53:31Z</dc:date>
    </item>
  </channel>
</rss>

