<?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 MicrocontrollersのトピックKL05 unable to enable PTA9 port interrupt</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-unable-to-enable-PTA9-port-interrupt/m-p/1092683#M57734</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm&amp;nbsp;working on a project with the KL05 freedom board (also having the same issue with a custom board with the same MKL05Z32VFM4 microcontroller). I'm developing the code using Kinetis Design Studio 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The project involves using 3 switches which triggers their respective interrupts. The buttons are designated to PA9, PA10, and PA11.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have managed to get the interrupt request for PA10 and PA11 to function successfully -- button presses result in entering the PORTA_IRQHandler. However, I am unable to get PA9 specifically to function. While stepping through the code with the debugger, successful set up of the PCR registers for PA10 and PA11 have the value of 0xa0107. However, the same setup procedure for PA9 results in a read register value of 0x107.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, this is what I have been doing for pin assignment setup for my button inputs:&lt;/P&gt;&lt;P&gt;SIM_SCGC5 |= SIM_SCGC5_PORTA_MASK | SIM_SCGC5_PORTB_MASK;&lt;SPAN&gt; &lt;/SPAN&gt;//enable clocks for ports A and B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NVIC_SetPriority(PORTA_IRQn, 1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt; NVIC_EnableIRQ(PORTA_IRQn);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORTA_PCR10 = (PORT_PCR_MUX(1) | PORT_PCR_PE_MASK | PORT_PCR_PS_MASK | PORT_PCR_PFE_MASK);&lt;BR /&gt;GPIOA_PDDR &amp;amp;= ~(1&amp;lt;&amp;lt;10);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORTA_PCR9 = (PORT_PCR_MUX(1) | PORT_PCR_PE_MASK | PORT_PCR_PS_MASK | PORT_PCR_PFE_MASK );&lt;BR /&gt;GPIOA_PDDR &amp;amp;= ~(1&amp;lt;&amp;lt;9);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORTA_PCR11&amp;nbsp;= (PORT_PCR_MUX(1) | PORT_PCR_PE_MASK | PORT_PCR_PS_MASK | PORT_PCR_PFE_MASK);&lt;BR /&gt;GPIOA_PDDR &amp;amp;= ~(1&amp;lt;&amp;lt;11);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__enable_irq();&amp;nbsp;&amp;nbsp;&amp;nbsp;//enable global interrupt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//later in the code, i configure the interrupt config bit of each register exclusively.&lt;/P&gt;&lt;P&gt;PORTA_PCR10 |= PORT_PCR_IRQC(10);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORTA_PCR9 |=&amp;nbsp;PORT_PCR_IRQC(10);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORTA_PCR11&amp;nbsp;|= PORT_PCR_IRQC(10);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has dealt with the same issue with being unable to write to the register, what was the path taken to correcting the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Apr 2020 17:11:59 GMT</pubDate>
    <dc:creator>matthew5</dc:creator>
    <dc:date>2020-04-13T17:11:59Z</dc:date>
    <item>
      <title>KL05 unable to enable PTA9 port interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-unable-to-enable-PTA9-port-interrupt/m-p/1092683#M57734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm&amp;nbsp;working on a project with the KL05 freedom board (also having the same issue with a custom board with the same MKL05Z32VFM4 microcontroller). I'm developing the code using Kinetis Design Studio 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The project involves using 3 switches which triggers their respective interrupts. The buttons are designated to PA9, PA10, and PA11.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have managed to get the interrupt request for PA10 and PA11 to function successfully -- button presses result in entering the PORTA_IRQHandler. However, I am unable to get PA9 specifically to function. While stepping through the code with the debugger, successful set up of the PCR registers for PA10 and PA11 have the value of 0xa0107. However, the same setup procedure for PA9 results in a read register value of 0x107.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, this is what I have been doing for pin assignment setup for my button inputs:&lt;/P&gt;&lt;P&gt;SIM_SCGC5 |= SIM_SCGC5_PORTA_MASK | SIM_SCGC5_PORTB_MASK;&lt;SPAN&gt; &lt;/SPAN&gt;//enable clocks for ports A and B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NVIC_SetPriority(PORTA_IRQn, 1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt; NVIC_EnableIRQ(PORTA_IRQn);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORTA_PCR10 = (PORT_PCR_MUX(1) | PORT_PCR_PE_MASK | PORT_PCR_PS_MASK | PORT_PCR_PFE_MASK);&lt;BR /&gt;GPIOA_PDDR &amp;amp;= ~(1&amp;lt;&amp;lt;10);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORTA_PCR9 = (PORT_PCR_MUX(1) | PORT_PCR_PE_MASK | PORT_PCR_PS_MASK | PORT_PCR_PFE_MASK );&lt;BR /&gt;GPIOA_PDDR &amp;amp;= ~(1&amp;lt;&amp;lt;9);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORTA_PCR11&amp;nbsp;= (PORT_PCR_MUX(1) | PORT_PCR_PE_MASK | PORT_PCR_PS_MASK | PORT_PCR_PFE_MASK);&lt;BR /&gt;GPIOA_PDDR &amp;amp;= ~(1&amp;lt;&amp;lt;11);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__enable_irq();&amp;nbsp;&amp;nbsp;&amp;nbsp;//enable global interrupt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//later in the code, i configure the interrupt config bit of each register exclusively.&lt;/P&gt;&lt;P&gt;PORTA_PCR10 |= PORT_PCR_IRQC(10);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORTA_PCR9 |=&amp;nbsp;PORT_PCR_IRQC(10);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PORTA_PCR11&amp;nbsp;|= PORT_PCR_IRQC(10);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone has dealt with the same issue with being unable to write to the register, what was the path taken to correcting the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2020 17:11:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-unable-to-enable-PTA9-port-interrupt/m-p/1092683#M57734</guid>
      <dc:creator>matthew5</dc:creator>
      <dc:date>2020-04-13T17:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: KL05 unable to enable PTA9 port interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-unable-to-enable-PTA9-port-interrupt/m-p/1092684#M57735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately one has to be careful with the small devices since their ports don't all support usual features. Always check the ports summary table since the missing support is not normally noted anywhere in the chip's register section.&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 alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/106996i12BC080A11136627/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Also the SDK doesn't support checking for non-supported use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I check with the uTasker project like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;    INTERRUPT_SETUP interrupt_setup&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;                   &lt;SPAN class="comment token"&gt;// interrupt configuration parameters&lt;/SPAN&gt;
    interrupt_setup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;int_type       &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; PORT_INTERRUPT&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;   &lt;SPAN class="comment token"&gt;// identifier to configure port interrupt&lt;/SPAN&gt;
    interrupt_setup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;int_handler    &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; test_irq_4&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;       &lt;SPAN class="comment token"&gt;// handling function&lt;/SPAN&gt;
    interrupt_setup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;int_priority   &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; PRIORITY_PORT_A_INT&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// interrupt priority level&lt;/SPAN&gt;
    interrupt_setup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;int_port       &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; PORTA&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;            &lt;SPAN class="comment token"&gt;// the port that the interrupt input is on&lt;/SPAN&gt;
    interrupt_setup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;int_port_bits  &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;PORTA_BIT9 &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; PORTA_BIT10 &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; PORTA_BIT11&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    interrupt_setup&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;int_port_sense &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;IRQ_FALLING_EDGE &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; PULLUP_ON &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; ENABLE_PORT_MODE&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// set the pin to port mode - this is needed if the pin is disabled by default otherwise the pull-up/LLWU functions won't work&lt;/SPAN&gt;
    &lt;SPAN class="token function"&gt;fnConfigureInterrupt&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;interrupt_setup&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;    &lt;SPAN class="comment token"&gt;// configure interrupt&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and its KL05 simulator points out the restriction to avoid losing time or making HW design errors before testing is performed:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;IMG alt="pastedImage_3.png" src="https://community.nxp.com/t5/image/serverpage/image-id/106997iD992133EC742669C/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[uTasker project developer for Kinetis and i.MX RT]&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:43:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-unable-to-enable-PTA9-port-interrupt/m-p/1092684#M57735</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-11-02T14:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: KL05 unable to enable PTA9 port interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-unable-to-enable-PTA9-port-interrupt/m-p/1092685#M57736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for replying to my question and providing the necessary information that I needed!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was looking at section 11.6.3 External Interrupts which said the PORT module was available in all digital pin muxing modes when enabled. Bummer that I missed the vital information you linked!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2020 21:30:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-unable-to-enable-PTA9-port-interrupt/m-p/1092685#M57736</guid>
      <dc:creator>matthew5</dc:creator>
      <dc:date>2020-04-14T21:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: KL05 unable to enable PTA9 port interrupt</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-unable-to-enable-PTA9-port-interrupt/m-p/1092686#M57737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11.6.3 informs that the interrupt is available also when the pin is configured not as a GPIO but as a peripheral - eg. if a UART Rx pin is used it could also generate an interrupt on each input edge (for example) as well as being connected internally to the UART. This is in fact a nice feature to have (when the interrupt is supported on the individual GPIO)!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[uTasker project developer for Kinetis and i.MX RT]&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2020 02:09:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-unable-to-enable-PTA9-port-interrupt/m-p/1092686#M57737</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-04-15T02:09:18Z</dc:date>
    </item>
  </channel>
</rss>

