<?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のトピックCodewarrior Expert SPI Events</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Codewarrior-Expert-SPI-Events/m-p/977727#M16852</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I've a problem with&amp;nbsp;the expert code generator and SPI, I've setted SM1 SyncroMaster in this way:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/97298iD5D94238C1BB1DB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Board: DEVKIT-S12ZVC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I don't see any event triggerd or any output on the pins (SCK, MOSI, MISO) and I am using for testing:&lt;/P&gt;&lt;P&gt;SM1_SendChar(0);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Send zero&lt;/P&gt;&lt;P&gt;After 8 bit the senChar() function reply with&amp;nbsp;ERR_TXFULL error. So No data is trasferred from the TX buffer.&lt;/P&gt;&lt;P&gt;There is something wrong in my settings?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jan 2020 16:46:19 GMT</pubDate>
    <dc:creator>luca_ferrario</dc:creator>
    <dc:date>2020-01-20T16:46:19Z</dc:date>
    <item>
      <title>Codewarrior Expert SPI Events</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Codewarrior-Expert-SPI-Events/m-p/977727#M16852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I've a problem with&amp;nbsp;the expert code generator and SPI, I've setted SM1 SyncroMaster in this way:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/97298iD5D94238C1BB1DB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Board: DEVKIT-S12ZVC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I don't see any event triggerd or any output on the pins (SCK, MOSI, MISO) and I am using for testing:&lt;/P&gt;&lt;P&gt;SM1_SendChar(0);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Send zero&lt;/P&gt;&lt;P&gt;After 8 bit the senChar() function reply with&amp;nbsp;ERR_TXFULL error. So No data is trasferred from the TX buffer.&lt;/P&gt;&lt;P&gt;There is something wrong in my settings?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2020 16:46:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Codewarrior-Expert-SPI-Events/m-p/977727#M16852</guid>
      <dc:creator>luca_ferrario</dc:creator>
      <dc:date>2020-01-20T16:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior Expert SPI Events</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Codewarrior-Expert-SPI-Events/m-p/977728#M16853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think I find the problem: if I enable Interrupt service, the output doesn't works and no event (or SM1 interruput) is triggered.&lt;/P&gt;&lt;P&gt;There is a way to fix it? Or only by registers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2020 09:48:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Codewarrior-Expert-SPI-Events/m-p/977728#M16853</guid>
      <dc:creator>luca_ferrario</dc:creator>
      <dc:date>2020-01-21T09:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior Expert SPI Events</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Codewarrior-Expert-SPI-Events/m-p/977729#M16854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luca,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recommend you a few options:&amp;nbsp;disable interrupts for the SM1 component or you can look at the S12ZVC SPI example (attached) which uses the different PE component or you can write your own code.&lt;/P&gt;&lt;P&gt;Also, I would like to mention that the&amp;nbsp;PE is not already supported and it won't be fixed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me explain the behavior of SM1 component:&lt;/P&gt;&lt;P&gt;When you enable interrupt in SM1 component the Processor Expert generates SM1_SendChar() function where is set the&amp;nbsp;SerFlag. But this flag is cleared only in the ISR(SM1_Interrupt) routine. This interrupt is generated when&amp;nbsp;the SPI Transmit Empty&amp;nbsp;Interrupt&amp;nbsp;Flag (SPTEF) is set.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, in the case, the&amp;nbsp;SPI Transmit&amp;nbsp;Interrupt&amp;nbsp;is disabled (SPTIE), you will always get the&amp;nbsp;ERR_TXFULL because the&amp;nbsp;SerFlag is not cleared anymore.&lt;/P&gt;&lt;P&gt;In case, the SPI Transmit&amp;nbsp;Interrupt&amp;nbsp;is enabled (SPTIE), it will always go to the &lt;SPAN&gt;ISR(SM1_Interrupt)&lt;/SPAN&gt;&amp;nbsp;routine (whenever the data register is empty and ready to accept new data). Therefore,&amp;nbsp;SPTIE should be disabled in the &lt;SPAN&gt;ISR(SM1_Interrupt), but we cannot change the generated code. So, that is why it is working only when you disable SPI interrupt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2020 08:50:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Codewarrior-Expert-SPI-Events/m-p/977729#M16854</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2020-01-24T08:50:53Z</dc:date>
    </item>
  </channel>
</rss>

