AW: Possibility of high frequency interrupt handle with MCF5223x
"Mark Butcher" <[email protected]> Mon, 6 Dec 2010 15:16:02 +0100
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers.coldfire |
|---|---|
| Message-ID | <[email protected]> |
This is a multipart message in MIME format. ------=_NextPart_000_0090_01CB9558.7EBC9560 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi David =20 I have used the DMA timers to read GPIOs and ADCs =96 the source for = reads can be set to any address (including FLASH, RAM or peripherals). =20 Regards =20 Mark =20 =20 Von: [email protected] [mailto:[email protected]] = Im Auftrag von David Pang Gesendet: Montag, 6. Dezember 2010 14:49 An: [email protected] Betreff: Re: [ColdFire] Possibility of high frequency interrupt handle = with MCF5223x =20 Thanks Yevgeni and Mark for your prompt reply. Seams I have to consider other processor of higher frequency, and other means to handle data input. DMA is a good idea, but I don't see CF MCU has a digital input = peripheral could do DMA transfer. An FPGA/CPLD conversion with parallel EMI bus to = MCU is a good idea.=20 In fact 12MHz is the clock frequency, there is interval between packets. = the max data rate would be 8MB/s approximately. As Mark mentioned, CFV2 MCU UDP can only achieve 15Mb/s, that is the = real bottleneck. I have to consider to discard redundant data, but it is = still difficult to get through the bottleneck. B.R. David On Mon, Dec 6, 2010 at 9:05 PM, Mark Butcher <[email protected]> wrote: Hi David =20 12MHz seems rather fast for an IRQ. I would look into the use of DMA to copy the data input to a buffer and = then using its =91end of transfer=92 interrupt to send the data on. For = example, you may be able to use the trigger input to start a DMA timer sequence that = then reads the data from the port at the correct rate (there are various = other permutations in the chip which may also be able to solve it). =20 Note however that your data rate is 96Mb/s and it will not be possible = to send this over a 100M LAN (there is overhead and collisions etc.). = Probably the V2 will be able to achieve about 15Mb/s UDP so this is probably the = main bottleneck. =20 =20 Regards =20 Mark =20 =20 ************************************************** Mark Butcher Bsc (Hons) MPhil MIET=20 =20 M.J.Butcher Consulting =20 Birchstrasse 20f, CH-5406 R=FCtihof Switzerland www.mjbc.ch / www.uTasker.com=20 ++41 (0)79 402 26 37 Skype: M_J_Butcher ************************************************** =20 =20 =20 Von: [email protected] [mailto:[email protected]] = Im Auftrag von David Pang Gesendet: Montag, 6. Dezember 2010 13:16 An: [email protected] Betreff: [ColdFire] Possibility of high frequency interrupt handle with MCF5223x =20 Dear all, I want to use MCF5223x to read a 8bit digital signal and forward the = sample data to UDP packet. The signal consists of 8bit data and 1 clock, data fetch at rising edge = or falling edge. However, the clock frequency is pretty high, max frequency = is about 12MHz. Are there possible to use the CLOCK input to trigger an interrupt and = sample the data in each interrupt? I want to do the connection as below: CLOCK =3D=3D=3D> nIRQ1 DATA[8:0] =3D=3D=3D> PORT AN So the system would include 3 tasks: 1. Interrupt for data input, interrupt trigger at about 12MHz 2. UDP Packet forwarding, each packet contains 200 samples=20 3. HTTP or TCP service for system configuration Can a 60MHz ColdFireV2, 5223x, capable to do it? B.R. David =20 ------=_NextPart_000_0090_01CB9558.7EBC9560 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <html xmlns:v=3D"urn:schemas-microsoft-com:vml" = xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta name=3DGenerator = content=3D"Microsoft Word 14 (filtered medium)"><style><!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} p {mso-style-priority:99; mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; font-size:12.0pt; font-family:"Times New Roman","serif";} p.MsoAcetate, li.MsoAcetate, div.MsoAcetate {mso-style-priority:99; mso-style-link:"Sprechblasentext Zchn"; margin:0cm; margin-bottom:.0001pt; font-size:8.0pt; font-family:"Tahoma","sans-serif";} span.SprechblasentextZchn {mso-style-name:"Sprechblasentext Zchn"; mso-style-priority:99; mso-style-link:Sprechblasentext; font-family:"Tahoma","sans-serif"; mso-fareast-language:DE-CH;} span.E-MailFormatvorlage20 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-family:"Calibri","sans-serif"; mso-fareast-language:EN-US;} @page WordSection1 {size:612.0pt 792.0pt; margin:70.85pt 70.85pt 2.0cm 70.85pt;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--></head><body lang=3DDE-CH link=3Dblue = vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span = style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= D'>Hi David<o:p></o:p></span></p><p class=3DMsoNormal><span = style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= D'><o:p> </o:p></span></p><p class=3DMsoNormal><span lang=3DEN-GB = style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= D'>I have used the DMA timers to read GPIOs and ADCs – the source = for reads can be set to any address (including FLASH, RAM or = peripherals).<o:p></o:p></span></p><p class=3DMsoNormal><span = lang=3DEN-GB = style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= D'><o:p> </o:p></span></p><p class=3DMsoNormal><span lang=3DEN-GB = style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= D'>Regards<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-GB = style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= D'><o:p> </o:p></span></p><p class=3DMsoNormal><span lang=3DEN-GB = style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= D'>Mark<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-GB = style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= D'><o:p> </o:p></span></p><p class=3DMsoNormal><span lang=3DEN-GB = style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497= D'><o:p> </o:p></span></p><p class=3DMsoNormal><b><span lang=3DDE = style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span><= /b><span lang=3DDE = style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> = [email protected] [mailto:[email protected]] <b>Im = Auftrag von </b>David Pang<br><b>Gesendet:</b> Montag, 6. Dezember 2010 = 14:49<br><b>An:</b> [email protected]<br><b>Betreff:</b> Re: [ColdFire] = Possibility of high frequency interrupt handle with = MCF5223x<o:p></o:p></span></p><p = class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal = style=3D'margin-bottom:12.0pt'><br>Thanks Yevgeni and Mark for your = prompt reply.<br><br>Seams I have to consider other processor of higher = frequency, and other means to handle data input.<br>DMA is a good idea, = but I don't see CF MCU has a digital input peripheral could do DMA = transfer. An FPGA/CPLD conversion with parallel EMI bus to MCU is a good = idea. <br>In fact 12MHz is the clock frequency, there is interval = between packets. the max data rate would be 8MB/s = approximately.<br><br>As Mark mentioned, CFV2 MCU UDP can only achieve = 15Mb/s, that is the real bottleneck. I have to consider to discard = redundant data, but it is still difficult to get through the = bottleneck.<br><br><br>B.R.<br>David<br><br><o:p></o:p></p><div><p = class=3DMsoNormal>On Mon, Dec 6, 2010 at 9:05 PM, Mark Butcher <<a = href=3D"mailto:[email protected]">[email protected]</a>> = wrote:<o:p></o:p></p><div><div><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB style=3D'font-size:11.0pt;color:#1F497D'>Hi = David</span><o:p></o:p></p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB style=3D'font-size:11.0pt;color:#1F497D'>12MHz seems rather = fast for an IRQ.</span><o:p></o:p></p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB style=3D'font-size:11.0pt;color:#1F497D'>I would look into = the use of DMA to copy the data input to a buffer and then using its = ‘end of transfer’ interrupt to send the data on. For = example, you may be able to use the trigger input to start a DMA timer = sequence that then reads the data from the port at the correct rate = (there are various other permutations in the chip which may also be able = to solve it).</span><o:p></o:p></p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB style=3D'font-size:11.0pt;color:#1F497D'>Note however that = your data rate is 96Mb/s and it will not be possible to send this over a = 100M LAN (there is overhead and collisions etc.). Probably the V2 will = be able to achieve about 15Mb/s UDP so this is probably the main = bottleneck.</span><o:p></o:p></p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'>Regards</span><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'>Mark</span><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p><= span lang=3DEN-GB style=3D'font-family:"Courier = New"'>**************************************************</span><o:p></o:p= ></p><p><span lang=3DEN-GB style=3D'font-family:"Courier New"'>Mark = Butcher Bsc = (Hons) &= nbsp; MPhil MIET </span><o:p></o:p></p><p><span = lang=3DEN-GB style=3D'font-family:"Courier = New"'> </span><o:p></o:p></p><p><span lang=3DEN-GB = style=3D'font-family:"Courier New"'>M.J.Butcher = Consulting &nb= sp; </span><o:p></o:p></p><p><span = style=3D'font-family:"Courier New"'>Birchstrasse = 20f, &nb= sp; CH-5406 = R=FCtihof</span><o:p></o:p></p><p><span style=3D'font-family:"Courier = New"'>Switzerland = <a href=3D"http://www.mjbc.ch" target=3D"_blank">www.mjbc.ch</a> / <a = href=3D"http://www.uTasker.com" target=3D"_blank">www.uTasker.com</a> = </span><o:p></o:p></p><p><span lang=3DEN-GB = style=3D'font-family:"Courier New"'>++41 (0)79 402 26 = 37 = Skype: M_J_Butcher</span><o:p></o:p></p><p><span lang=3DEN-GB = style=3D'font-family:"Courier = New"'>**************************************************</span><o:p></o:p= ></p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span = lang=3DEN-GB = style=3D'font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p><p = class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span = lang=3DDE style=3D'font-size:10.0pt'>Von:</span></b><span lang=3DDE = style=3D'font-size:10.0pt'> <a = href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a> [mailto:<a = href=3D"mailto:[email protected]" = target=3D"_blank">[email protected]</a>] <b>Im Auftrag von = </b>David Pang<br><b>Gesendet:</b> Montag, 6. Dezember 2010 = 13:16<br><b>An:</b> [email protected]<br><b>Betreff:</b> [ColdFire] = Possibility of high frequency interrupt handle with = MCF5223x</span><o:p></o:p></p><div><div><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p><= /o:p></p><p class=3DMsoNormal = style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Dear = all,<br><br>I want to use MCF5223x to read a 8bit digital signal and = forward the sample data to UDP packet.<br>The signal consists of 8bit = data and 1 clock, data fetch at rising edge or falling edge. However, = the clock frequency is pretty high, max frequency is about 12MHz.<br>Are = there possible to use the CLOCK input to trigger an interrupt and sample = the data in each interrupt?<br><br>I want to do the connection as = below:<br>CLOCK &nbs= p; =3D=3D=3D> = nIRQ1<br>DATA[8:0] = =3D=3D=3D> PORT AN<br><br>So the system would include 3 = tasks:<br>1. Interrupt for data input, interrupt trigger at about = 12MHz<br>2. UDP Packet forwarding, each packet contains 200 samples = <br>3. HTTP or TCP service for system configuration<br><br>Can a 60MHz = ColdFireV2, 5223x, capable to do = it?<br><br><br>B.R.<br>David<o:p></o:p></p></div></div></div></div></div>= <p class=3DMsoNormal><o:p> </o:p></p></div></body></html> ------=_NextPart_000_0090_01CB9558.7EBC9560-- --- [email protected] Send a post to the list. [email protected] Join the list. [email protected] Join the list in digest mode. [email protected] Leave the list.