<?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: SPI receive interrupt on KL27 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-receive-interrupt-on-KL27/m-p/394089#M21591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello rick stuart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from enabling the interrupt from the SPI module you need to enable the interrupt vector for the ARM NVIC module. Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NVIC_EnableIRQ(SPI0_IRQn);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards!,&lt;BR /&gt;Jorge Gonzalez&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>Wed, 08 Jul 2015 19:13:48 GMT</pubDate>
    <dc:creator>Jorge_Gonzalez</dc:creator>
    <dc:date>2015-07-08T19:13:48Z</dc:date>
    <item>
      <title>SPI receive interrupt on KL27</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-receive-interrupt-on-KL27/m-p/394088#M21590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two FRDM-KL27Z development boards.&amp;nbsp; They are connected using the SPI0 port.&amp;nbsp; One is master and the other slave.&amp;nbsp; I can send/receive 16bit data between them using polling.&amp;nbsp; Now I need to change the slave to receive 2 8bit bytes.&amp;nbsp; Polling is not fast enough anymore.&amp;nbsp; I keep missing the second 8bit byte.&amp;nbsp; So I want to try using receive interrupts on the slave.&amp;nbsp; But so far I am getting no interrupts.&amp;nbsp; The 2 SPI configuration registers are set up as such:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt; font-family: times new roman,times;"&gt;&amp;nbsp; SPI0-&amp;gt;C1 = SPI_C1_SPIE_MASK | SPI_C1_SPE_MASK | SPI_C1_CPHA_MASK | SPI_C1_SSOE_MASK;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt; font-family: times new roman,times;"&gt;&amp;nbsp; SPI0-&amp;gt;C2 = SPI_C2_MODFEN_MASK;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I'm using SPI0_IRQHandler() as the name of the SPI0 interrupt handler.&amp;nbsp; This is defined in the Freescale startup_MKL27Z644.s file.&amp;nbsp; That file has this header for identification:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-family: times new roman,times;"&gt;; ---------------------------------------------------------------------------------------&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-family: times new roman,times;"&gt;;&amp;nbsp; @file:&amp;nbsp;&amp;nbsp;&amp;nbsp; startup_MKL27Z644.s&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-family: times new roman,times;"&gt;;&amp;nbsp; @purpose: CMSIS Cortex-M0P Core Device Startup File&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-family: times new roman,times;"&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MKL27Z644&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-family: times new roman,times;"&gt;;&amp;nbsp; @version: 1.4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-family: times new roman,times;"&gt;;&amp;nbsp; @date:&amp;nbsp;&amp;nbsp;&amp;nbsp; 2014-9-22&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-family: times new roman,times;"&gt;;&amp;nbsp; @build:&amp;nbsp;&amp;nbsp; b140923&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-family: times new roman,times;"&gt;; ---------------------------------------------------------------------------------------&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had thought setting the SPI_C1_SPIE_MASK bit would enable the receive SPI interrupt.&amp;nbsp; But it looks like the interrupt is never getting called.&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 Jul 2015 18:11:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-receive-interrupt-on-KL27/m-p/394088#M21590</guid>
      <dc:creator>rickstuart</dc:creator>
      <dc:date>2015-07-08T18:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: SPI receive interrupt on KL27</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-receive-interrupt-on-KL27/m-p/394089#M21591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello rick stuart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from enabling the interrupt from the SPI module you need to enable the interrupt vector for the ARM NVIC module. Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NVIC_EnableIRQ(SPI0_IRQn);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards!,&lt;BR /&gt;Jorge Gonzalez&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>Wed, 08 Jul 2015 19:13:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/SPI-receive-interrupt-on-KL27/m-p/394089#M21591</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-07-08T19:13:48Z</dc:date>
    </item>
  </channel>
</rss>

