<?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>S12 / MagniV MicrocontrollersのトピックRe: SPI port failure</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172402#M5836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello, and welcome to the forum.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If one of the SPI flags is not cleared, an overrun condition can occur, that may prevent further communications.&amp;nbsp; Do you regain some communications after a reset?&amp;nbsp; You will need to post more details on what you are attempting ot achieve, and on&amp;nbsp;the nature of your problem.&amp;nbsp;&amp;nbsp;Preferably also post your SPI communications code for both master and slave.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If you also search the forums, you will find many code examples for SPI master communications (but far&amp;nbsp;fewer for slave operation).&amp;nbsp; Do not ignore the 8-bit forum because the SPI modules for 9S12 and 9S08 devices are quite similar.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Dec 2007 16:01:47 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2007-12-12T16:01:47Z</dc:date>
    <item>
      <title>SPI port failure</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172401#M5835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;Hi Forum Members,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;I am using MC9S12A128 in one of my projects. I am using its SPI interface to communicate with &lt;SPAN style=": ; font-size: 2; font-family: Helvetica-Narrow-Oblique;"&gt;&lt;EM&gt;MC68HC908AP16.&lt;/EM&gt; The SPI communication works fine but sometimes it is found that the SPI port of MC9S12A128 fails to communicate and in turn it is found that the SPI port itself is of no use. The controller as such works fine except SPI port. What could be the possible reason(s) for this? Whether any care is needed from hardware/software design point of view for SPI?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;Your earliest help in this regard will be highly appreciated.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 15:30:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172401#M5835</guid>
      <dc:creator>SSK</dc:creator>
      <dc:date>2007-12-12T15:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: SPI port failure</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172402#M5836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello, and welcome to the forum.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If one of the SPI flags is not cleared, an overrun condition can occur, that may prevent further communications.&amp;nbsp; Do you regain some communications after a reset?&amp;nbsp; You will need to post more details on what you are attempting ot achieve, and on&amp;nbsp;the nature of your problem.&amp;nbsp;&amp;nbsp;Preferably also post your SPI communications code for both master and slave.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If you also search the forums, you will find many code examples for SPI master communications (but far&amp;nbsp;fewer for slave operation).&amp;nbsp; Do not ignore the 8-bit forum because the SPI modules for 9S12 and 9S08 devices are quite similar.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 16:01:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172402#M5836</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-12-12T16:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: SPI port failure</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172403#M5837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Mac,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;After reset also the SPI port does not communicate. It seems that the SPI port gets damaged permanantly. Whether any care from hardware/software point of view for SPI design is needed?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;SSK&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2007 17:05:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172403#M5837</guid>
      <dc:creator>SSK</dc:creator>
      <dc:date>2007-12-12T17:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: SPI port failure</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172404#M5838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Yes, it is possible to potentially cause damage the MCU devices in a number of ways.&amp;nbsp; The following possibilities come to mind&amp;nbsp;-&lt;/FONT&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Incorrect connections between the two MCUs.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;The two MCUs have different Vdd supply voltages.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;The two MCUs operate using different power sources, and one of the sources is turned off.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Both MCUs are simultaneously configured for SPI master operation.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;The interconnections between the two MCUs have been subjected to severe static discharge, or other over-voltage.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Items 1, 2, 3 and 4 can result in over-current stress.&amp;nbsp; When experimenting, it is probably a good idea to fit series resistors (say 1k) in each of the interconnections, so as to limit&amp;nbsp;any excess current.&amp;nbsp; SPI communications is not intended to cater for wide physical separation between master and slave(s).&amp;nbsp; They should be in very close proximity, preferably on the same circuit board.&amp;nbsp; This&amp;nbsp;is likely&amp;nbsp;to minimize the possibility of static discharge problems.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Have you been able to ascertain whether both MCUs are damaged?&amp;nbsp; When you send a byte from the master SPI (with slave disconnected), can you observe the presence of either the clock output signal, or the MOSI data signal?&amp;nbsp; You will need to monitor these using an oscilloscope, preferably with single&amp;nbsp;sweep capture.&amp;nbsp; The monitoring process will be much easier if you significantly slow the SPI clock rate of the master.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Finally, did you successfully achieve SPI communications prior to the damage occurring?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2007-12-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;06:26 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 03:21:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172404#M5838</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-12-13T03:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: SPI port failure</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172405#M5839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#0066FF" size="2"&gt;Hello Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0066FF" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0066FF" size="2"&gt;Thank you very much for your nice reply.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Yes, it is possible to potentially cause damage the MCU devices in a number of ways.&amp;nbsp; The following possibilities come to mind&amp;nbsp;-&lt;/FONT&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Incorrect connections between the two MCUs.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;The two MCUs have different Vdd supply voltages.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;The two MCUs operate using different power sources, and one of the sources is turned off.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Both MCUs are simultaneously configured for SPI master operation.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;The interconnections between the two MCUs have been subjected to severe static discharge, or other over-voltage.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Items 1, 2, 3 and 4 can result in over-current stress.&amp;nbsp; When experimenting, it is probably a good idea to fit series resistors (say 1k) in each of the interconnections, so as to limit&amp;nbsp;any excess current.&amp;nbsp; SPI communications is not intended to cater for wide physical separation between master and slave(s).&amp;nbsp; They should be in very close proximity, preferably on the same circuit board.&amp;nbsp; This&amp;nbsp;is likely&amp;nbsp;to minimize the possibility of static discharge problems.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0066FF" size="2"&gt;This could be&amp;nbsp;the possible area where I need to concentrate. I am having multiple I/O cards - Analog Input, Analog Output, DIO etc placed at various slots. AI card is placed at considerably larger distance from the master SPI. In this case whether 1K series resi. will help me to minimize the problems? What could be the other resolution?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Have you been able to ascertain whether both MCUs are damaged?&amp;nbsp; When you send a byte from the master SPI (with slave disconnected), can you observe the presence of either the clock output signal, or the MOSI data signal?&amp;nbsp; You will need to monitor these using an oscilloscope, preferably with single&amp;nbsp;sweep capture.&amp;nbsp; The monitoring process will be much easier if you significantly slow the SPI clock rate of the master.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0066FF" size="2"&gt;This I need to check using CROs.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Finally, did you successfully achieve SPI communications prior to the damage occurring?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0066FF" size="2"&gt;Yes !! Above configuration of IO cards work normally. Only in some cases, even after some successful working cycles, the failure occurs.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0066FF" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0066FF" size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0066FF" size="2"&gt;SSK&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 13:24:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172405#M5839</guid>
      <dc:creator>SSK</dc:creator>
      <dc:date>2007-12-13T13:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: SPI port failure</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172406#M5840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello SSK,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Are you also implying that the analog input, analog output and DIO cards also utilize SPI communications?&amp;nbsp; I presume your "considerably larger distance" would amount to locating the card at the opposite end of a card cage.&amp;nbsp; You may find that permanent series resistors for each output, whether at the master or a slave, may offer a measure of over-current protection, especially when "hot plugging" is possible (but perhaps not recommended).&amp;nbsp; Depending on the amount of loading capacitance, a reduced SPI clock frequency might&amp;nbsp;prove necessary.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If you wish to protect the MCU, at the expense of a more easily replaceable component, you might also&amp;nbsp;consider non-inverting buffers for both input and output lines, at the master card.&amp;nbsp; With this arrangement, protective resistors would still be desireable, to protect the buffer device.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Another&amp;nbsp;measure would be the inclusion of a pair of Schottky diodes at each line, to offer some additional transient protection at the card connector (for both master and slave ends).&amp;nbsp; However, the diodes will&amp;nbsp;contribute to the total load capacitance.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2007 23:58:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172406#M5840</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-12-14T23:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: SPI port failure</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172407#M5841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Mac,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks again for nice reply.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I will certainly work on these suggestions. Is anybody facing similar kind of experience with SPI port? what are their observations?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks in advance.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;SSK&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2007 13:29:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/SPI-port-failure/m-p/172407#M5841</guid>
      <dc:creator>SSK</dc:creator>
      <dc:date>2007-12-18T13:29:40Z</dc:date>
    </item>
  </channel>
</rss>

