<?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: IRQ &amp; SPI Interrupt Priority Conflicts in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IRQ-SPI-Interrupt-Priority-Conflicts/m-p/209245#M8607</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I initially started out in polled mode but had issues with the SS timing.&amp;nbsp; It's been a while since I wrote the routine, but I believe there was an issue with using the SPI SS line on 16 bit transfers.&amp;nbsp; I wound up rerouting the SS to a PortA pin.&amp;nbsp; After sending the second character (interrupting on transmit empty), I installed a very slight delay before toggling the SS line high again.&amp;nbsp;The timing was tweaked using a scope and SPI&amp;nbsp;line monitor.&amp;nbsp; In regards to polled mode, &amp;nbsp;I was concerned if another interrupt source came in during an SPI transfer it would through the timing off.&amp;nbsp; From my understanding the SPI is a native 8 bit transfer (in regards to the SS line).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Perhaps you can shed more light on an alternate way to send the SPI data in polled mode where this wouldn't be an issue.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks again for your help.&lt;/DIV&gt;&lt;DIV&gt;Kevin&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Dec 2008 22:07:02 GMT</pubDate>
    <dc:creator>KH_SRNL</dc:creator>
    <dc:date>2008-12-11T22:07:02Z</dc:date>
    <item>
      <title>IRQ &amp; SPI Interrupt Priority Conflicts</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IRQ-SPI-Interrupt-Priority-Conflicts/m-p/209243#M8605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I have an application where I am interfacing an HC9S12 chip to an IR transciever through the SPI bus (via a MAX3100 chip).&amp;nbsp; The SPI bus&amp;nbsp;communicates with&amp;nbsp;the MAX3100.&amp;nbsp; The MAX3100 communicates with the IR module.&amp;nbsp; The SPI data transmissions to the Max3100&amp;nbsp;are interrupt driven (SPI transmit interrupt).&amp;nbsp; I also have the receive data full&amp;nbsp;interrupt on the MAX3100 enabled and the output is wired to the HC9S12 IRQ interrupt.&amp;nbsp; When data is received on the IR port, the MAX3100 initiates an interrupt on the IRQ line.&amp;nbsp; In order to clear the IRQ interrupt source (the MAX3100), I must&amp;nbsp;read the MAX3100 configuration register via the SPI bus.&amp;nbsp; It appears that I can't&amp;nbsp;transmit data out of the SPI bus (also interrupt driven) with the IRQ interrupt active (SPI is lower priority than IRQ).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there a&amp;nbsp;register where I can dynamically mask the IRQ interrupt&amp;nbsp;long enough to&amp;nbsp;send the SPI data?&amp;nbsp; Is my understanding of what I'm seeing correct?&amp;nbsp; Any help would be appreciated.&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 06:06:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IRQ-SPI-Interrupt-Priority-Conflicts/m-p/209243#M8605</guid>
      <dc:creator>KH_SRNL</dc:creator>
      <dc:date>2008-12-11T06:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: IRQ &amp; SPI Interrupt Priority Conflicts</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IRQ-SPI-Interrupt-Priority-Conflicts/m-p/209244#M8606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;See IRQCR register, IRQEN bit.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Alternatively, MAX3100 can operate at &amp;gt;4MHz SPi clock. That's &amp;lt;4us for 16bit transfer. Wouldn't it be better to use SPI in polled mode?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 15:06:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IRQ-SPI-Interrupt-Priority-Conflicts/m-p/209244#M8606</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-12-11T15:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: IRQ &amp; SPI Interrupt Priority Conflicts</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IRQ-SPI-Interrupt-Priority-Conflicts/m-p/209245#M8607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I initially started out in polled mode but had issues with the SS timing.&amp;nbsp; It's been a while since I wrote the routine, but I believe there was an issue with using the SPI SS line on 16 bit transfers.&amp;nbsp; I wound up rerouting the SS to a PortA pin.&amp;nbsp; After sending the second character (interrupting on transmit empty), I installed a very slight delay before toggling the SS line high again.&amp;nbsp;The timing was tweaked using a scope and SPI&amp;nbsp;line monitor.&amp;nbsp; In regards to polled mode, &amp;nbsp;I was concerned if another interrupt source came in during an SPI transfer it would through the timing off.&amp;nbsp; From my understanding the SPI is a native 8 bit transfer (in regards to the SS line).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Perhaps you can shed more light on an alternate way to send the SPI data in polled mode where this wouldn't be an issue.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks again for your help.&lt;/DIV&gt;&lt;DIV&gt;Kevin&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 22:07:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IRQ-SPI-Interrupt-Priority-Conflicts/m-p/209245#M8607</guid>
      <dc:creator>KH_SRNL</dc:creator>
      <dc:date>2008-12-11T22:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: IRQ &amp; SPI Interrupt Priority Conflicts</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IRQ-SPI-Interrupt-Priority-Conflicts/m-p/209246#M8608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;SS line should be driven manually. You set maxim chip select low, send/receive two bytes, and finally set chip select pin high. At 4MHz this takes about 4microseconds. I don't know about timing issues with MAX3100.&amp;nbsp;The only not very cosy thing about MAX3100 I remember&amp;nbsp;was that after each 16-bit SPI transfer (any write config, transfer byte or&amp;nbsp;just check the status), you have to check R status bit and if R==1, then you have to put received character into&amp;nbsp;receive queue.&lt;/DIV&gt;&lt;DIV&gt;Do you have&amp;nbsp;more than just single MAX3100 on same SPI bus?&amp;nbsp;Well, in this case MAX3100 interrupt (IRQ) could&amp;nbsp;be disabled&amp;nbsp;for the time needed to perform transfers to those extra devices.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 03:05:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/IRQ-SPI-Interrupt-Priority-Conflicts/m-p/209246#M8608</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-12-12T03:05:22Z</dc:date>
    </item>
  </channel>
</rss>

