<?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>LPCXpresso IDEのトピックRe: System with multiple interrupts</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545774#M9381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Mon Sep 17 17:11:40 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;On the surface what you propose seems good, I'm sure there'll be a gotcha or two though, there always is :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:02:03 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:02:03Z</dc:date>
    <item>
      <title>System with multiple interrupts</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545769#M9376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dave3891 on Sun Sep 16 10:42:04 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am developing a system with multiple interrupts and I wanted some advice if my basic concept is a good way to do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The basic idea is the system reads a script from a sdcard and processes data based on the script, then a 1ms update loop sends either the new data or the same data back to a FPGA via SPI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My basic system structure would be as follows&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;Modules:
&amp;nbsp;&amp;nbsp;&amp;nbsp; SSP0 (Send/Recv from FPGA SPI Module)
&amp;nbsp;&amp;nbsp;&amp;nbsp; SSP1 (SDCARD Using FatFS)
&amp;nbsp;&amp;nbsp;&amp;nbsp; SYSTICK (1ms time to send new data)
&amp;nbsp;&amp;nbsp;&amp;nbsp; UART (Send/Recv from PC)

Interrupt Levels:
&amp;nbsp;&amp;nbsp;&amp;nbsp; SYSTICK = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp; SSP0 = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp; SSP1 = 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; UART = 1

Main:
&amp;nbsp;&amp;nbsp;&amp;nbsp; Read data from SDCARD on SSP1
&amp;nbsp;&amp;nbsp;&amp;nbsp; Process data and calculate frame data
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set FrameDataRdy flag
&amp;nbsp;&amp;nbsp;&amp;nbsp; Preform other tasks
&amp;nbsp;&amp;nbsp;&amp;nbsp; Process UART Data

SYSTICK:
&amp;nbsp;&amp;nbsp;&amp;nbsp; Check for FrameDataRdy flag
&amp;nbsp;&amp;nbsp;&amp;nbsp; begin first frame of transfer on SSP0
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set FrameTransfer flag
&amp;nbsp;&amp;nbsp;&amp;nbsp; Clear FrameDataRdy flag

SSP0 (transfer complete):
&amp;nbsp;&amp;nbsp;&amp;nbsp; Check if FrameTransfer is set
&amp;nbsp;&amp;nbsp;&amp;nbsp; Get next block of data
&amp;nbsp;&amp;nbsp;&amp;nbsp; Send data and read recieve register
&amp;nbsp;&amp;nbsp;&amp;nbsp; if last block clear FrameTransfer flag

UART:
&amp;nbsp;&amp;nbsp;&amp;nbsp; Move data from hardware buffer to 
&amp;nbsp;&amp;nbsp;&amp;nbsp; large software buffer&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;SPAN&gt;Any suggestions on if this is a good way to set this up would be appreciated&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:02:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545769#M9376</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: System with multiple interrupts</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545770#M9377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Sun Sep 16 18:16:18 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set FrameTransfer flag&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Clear FrameDataRdy flag&amp;nbsp; &lt;BR /&gt;SSP0 (transfer complete):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Check if FrameTransfer is set&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;I think that FrameTransfer will always be set, the fact that you got the SSP0 interrupt means that a frame is in progress so you don't need the flag.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to prepare multiple frame/packets/whatever in the main code and have the ISR send them if available maybe a counter that is incremented by the main code and tested/decremented by the SSP0 ISR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also I don't see the need for the SysTick ISR, it's essentially just starting a transfer and passing a flag to the SSP0 ISR, main() could do that by itself I think.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:02:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545770#M9377</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: System with multiple interrupts</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545771#M9378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dave3891 on Sun Sep 16 18:44:37 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I need the systick to time the transfers to a 1ms interval&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The FPGA will be controlling a pulse generator and have a 1ms update interval.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was thinking that the FrameTransfer will only be set when the data is ready, send the frame, get cleared and wait for the next 1ms interrupt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe I am missing some timing calculations but I think the frame should be sent in much less then 1ms&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:02:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545771#M9378</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: System with multiple interrupts</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545772#M9379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Mon Sep 17 07:52:27 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; I need the systick to time the transfers to a 1ms interval&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;OK, that's reasonable.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:02:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545772#M9379</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: System with multiple interrupts</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545773#M9380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Dave3891 on Mon Sep 17 08:20:41 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Are there any other issues that you think I might run in to ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:02:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545773#M9380</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: System with multiple interrupts</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545774#M9381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Mon Sep 17 17:11:40 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;On the surface what you propose seems good, I'm sure there'll be a gotcha or two though, there always is :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:02:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/System-with-multiple-interrupts/m-p/545774#M9381</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:02:03Z</dc:date>
    </item>
  </channel>
</rss>

