<?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>Kinetis Design StudioのトピックRe: Debugger terminates session in middle of initialization</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718193#M9341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;BR /&gt;I've used this image as a guide for connection:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Resultado de imagen para FRDM-KL05Z" src="https://os.mbed.com/media/uploads/GregC/frdm-kl05z_headers.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, nevermind, i've marked that pin as SWD in my printed copy, thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Juan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Apr 2018 20:45:08 GMT</pubDate>
    <dc:creator>juansalvo94</dc:creator>
    <dc:date>2018-04-12T20:45:08Z</dc:date>
    <item>
      <title>Debugger terminates session in middle of initialization</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718187#M9335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, My name is Juan and I'm&amp;nbsp;having trouble with KDS and Processor Expert, in particular component BitIO_LDD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using FRDM_KL05Z for one project, i need to read some GPIO Pins, so I've decided&amp;nbsp;to use the component of PE mentioned above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, when I (or processor expert) initialize the component, it terminates automatically the debug session. I've debugged step by step and every time crashes in the middle of Init. Sometimes it even crash KDS IDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function is:&amp;nbsp;GPIO_DIR0_Init(DIR0);&lt;/P&gt;&lt;P&gt;And is defined:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;LDD_TDeviceData* GPIO_DIR0_Init(LDD_TUserData *UserDataPtr)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; /* Allocate device structure */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; GPIO_DIR0_TDeviceDataPtr DeviceDataPrv;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;/* {Default RTOS Adapter} Driver memory allocation: Dynamic allocation is simulated by a pointer to the static object */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; DeviceDataPrv = &amp;amp;DeviceDataPrv__DEFAULT_RTOS_ALLOC;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; DeviceDataPrv-&amp;gt;UserDataPtr = UserDataPtr; /* Store the RTOS device structure */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; /* Configure pin as input */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; /* GPIOA_PDDR: PDD&amp;amp;=~1 */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; GPIOA_PDDR &amp;amp;= (uint32_t)~(uint32_t)(GPIO_PDDR_PDD(0x01));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; /* Initialization of Port Control register */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; /* PORTA_PCR0: ISF=0,MUX=1 */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'arial black', sans-serif;"&gt;&lt;STRONG&gt;// Terminates debug session&amp;nbsp;when running next line&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; PORTA_PCR0 = (uint32_t)((PORTA_PCR0 &amp;amp; (uint32_t)~(uint32_t)(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; PORT_PCR_ISF_MASK |&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; PORT_PCR_MUX(0x06)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; )) | (uint32_t)(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; PORT_PCR_MUX(0x01)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; ));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; /* Registration of the device structure */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; PE_LDD_RegisterDeviceStructure(PE_LDD_COMPONENT_GPIO_DIR0_ID,DeviceDataPrv);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; return ((LDD_TDeviceData *)DeviceDataPrv);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Anyone have an idea on what can I&amp;nbsp;do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Apr 2018 16:36:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718187#M9335</guid>
      <dc:creator>juansalvo94</dc:creator>
      <dc:date>2018-04-09T16:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger terminates session in middle of initialization</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718188#M9336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="288235" data-username="juansalvo94" href="https://community.nxp.com/people/juansalvo94"&gt;Juan Diego Scarini&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Have you enable the PORTA clock ?&lt;/P&gt;&lt;P&gt;&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/707iFFD0616855549FED/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;And why you use the initialize&amp;nbsp; funciont &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;GPIO_DIR0_Init&lt;/SPAN&gt;() , not the Bit1_Init() when&lt;/P&gt;&lt;P&gt;you use the component of BitIO_LDD .&lt;/P&gt;&lt;P&gt;If still can't work , please send&amp;nbsp; your whole project to me, I will help you check it on my side .&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;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2018 03:42:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718188#M9336</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2018-04-10T03:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger terminates session in middle of initialization</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718189#M9337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice! Thank you for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at what you said, i've checked PE Processor Component, SIM Module.&lt;/P&gt;&lt;P&gt;There I found that there was no clock gating on PORTA and PORTB (Ports that I use)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="PE_SIM.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/729i3E97833EC32C11C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="PE_SIM.PNG" alt="PE_SIM.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So I've enabled the Clock Gating Control and when I enable it, the PORTA and PORTB options enable automatically.&lt;BR /&gt;Well, I've deceided to run the code in debugging mode, but when it comes to the initialization part, It freezes! The fail is in the exact same point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SIM_SCGC5 has the correct value 0x780, but it still freezes on the same part:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #f6f6f6; border: 0px;"&gt;PORTA_PCR0 = (uint32_t)((PORTA_PCR0 &amp;amp; (uint32_t)~(uint32_t)(&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #f6f6f6; border: 0px;"&gt;PORT_PCR_ISF_MASK |&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #f6f6f6; border: 0px;"&gt;PORT_PCR_MUX(0x06)&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #f6f6f6; border: 0px;"&gt;)) | (uint32_t)(&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #f6f6f6; border: 0px;"&gt;PORT_PCR_MUX(0x01)&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #f6f6f6; border: 0px;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And i've got no ideas on what to do...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Juan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #f6f6f6; border: 0px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2018 15:37:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718189#M9337</guid>
      <dc:creator>juansalvo94</dc:creator>
      <dc:date>2018-04-10T15:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger terminates session in middle of initialization</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718190#M9338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Juan,&lt;/P&gt;&lt;P&gt;You can send attached your project througth Actions -&amp;gt; Edit ...,&lt;/P&gt;&lt;P&gt;or you can create a case to NXP support as I told you .&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/3441iE8C4A70BCAC719A7/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;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2018 03:40:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718190#M9338</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2018-04-11T03:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger terminates session in middle of initialization</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718191#M9339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice, I send you the project!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2018 12:00:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718191#M9339</guid>
      <dc:creator>juansalvo94</dc:creator>
      <dc:date>2018-04-11T12:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger terminates session in middle of initialization</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718192#M9340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked your code.&amp;nbsp; Please have a look at the SCH for FRDM-KL05 board,&lt;/P&gt;&lt;P&gt;the PTA0 connect to SWD_CLK pin , it also means, we used it&amp;nbsp; when debugging .&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/8253iE0B6DEAD26736157/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please change another gpio that haven't used, for example , you can test the LDEs :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/8301iE99B76E0296DC3BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&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;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2018 03:50:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718192#M9340</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2018-04-12T03:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger terminates session in middle of initialization</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718193#M9341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;BR /&gt;I've used this image as a guide for connection:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Resultado de imagen para FRDM-KL05Z" src="https://os.mbed.com/media/uploads/GregC/frdm-kl05z_headers.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, nevermind, i've marked that pin as SWD in my printed copy, thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Juan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2018 20:45:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Debugger-terminates-session-in-middle-of-initialization/m-p/718193#M9341</guid>
      <dc:creator>juansalvo94</dc:creator>
      <dc:date>2018-04-12T20:45:08Z</dc:date>
    </item>
  </channel>
</rss>

