<?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 What enables the alternative function on port M in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-enables-the-alternative-function-on-port-M/m-p/249991#M9674</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an S12XE micro and I am trying to reverse engineer how the micro to DSP&lt;/P&gt;&lt;P&gt;SPI communication works.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Port M is configured to drive the SPI0 signals to a DSP (Balckfin) so it can&lt;/P&gt;&lt;P&gt;download the DSP image while the S12XE SPI0 is in Master mode.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So these are the PTM2/PTM3/PTM4/PTM5 pins (which are supposedly configured to drive&lt;/P&gt;&lt;P&gt;the SCK0/MISO0/SS0/MOSI0 signals to the DSP.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is the "alternative" function of these pins programmed in the XE ?&lt;/P&gt;&lt;P&gt;How is the priority of the other "alternative" function of these pins determined?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I enable just bit 6 (SPE) in the SPICR1 register, does that mean the SPI "alternative"&lt;/P&gt;&lt;P&gt;function is selected ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if I enable the CAN2 module, does it mean the priority is now changed and the same &lt;/P&gt;&lt;P&gt;pins are driving TXCAN0/RXCAN0 ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having trouble understandiung the concept of "routed" SPI 0, routed CAN0, etc. Below&lt;/P&gt;&lt;P&gt;is the excerpt from the S12XE documentation.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;======================================================================================&lt;/P&gt;&lt;P&gt;Port M general purpose input/output data—Data Register&lt;/P&gt;&lt;P&gt;Port M pin 5 is associated with the TXCAN signal of CAN2 and the routed CAN4 and CAN0, as well as with SCK&lt;/P&gt;&lt;P&gt;signals of SPI0. The CAN2 function takes precedence over the routed CAN0, routed CAN4, the routed SPI0 and the general purpose&lt;/P&gt;&lt;P&gt;I/O function if the CAN2 module is enabled. The routed CAN0 function takes precedence over the routed CAN4, the&lt;/P&gt;&lt;P&gt;routed SPI0 and the general purpose I/O function if the routed CAN0 module is enabled. The routed CAN4 function&lt;/P&gt;&lt;P&gt;takes precedence over the routed SPI0 and general purpose I/O function if the routed CAN4 module is enabled. The&lt;/P&gt;&lt;P&gt;routed SPI0 function takes precedence of the general purpose I/O function if the routed SPI0 is enabled.&lt;/P&gt;&lt;P&gt;When not used with the alternative function, this pin can be used as general purpose I/O.&lt;/P&gt;&lt;P&gt;If the associated data direction bit of this pin is set to 1, a read returns the value of the port register, otherwise the&lt;/P&gt;&lt;P&gt;buffered pin input state is read.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Feb 2014 21:58:14 GMT</pubDate>
    <dc:creator>buhas</dc:creator>
    <dc:date>2014-02-20T21:58:14Z</dc:date>
    <item>
      <title>What enables the alternative function on port M</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-enables-the-alternative-function-on-port-M/m-p/249991#M9674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an S12XE micro and I am trying to reverse engineer how the micro to DSP&lt;/P&gt;&lt;P&gt;SPI communication works.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Port M is configured to drive the SPI0 signals to a DSP (Balckfin) so it can&lt;/P&gt;&lt;P&gt;download the DSP image while the S12XE SPI0 is in Master mode.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So these are the PTM2/PTM3/PTM4/PTM5 pins (which are supposedly configured to drive&lt;/P&gt;&lt;P&gt;the SCK0/MISO0/SS0/MOSI0 signals to the DSP.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is the "alternative" function of these pins programmed in the XE ?&lt;/P&gt;&lt;P&gt;How is the priority of the other "alternative" function of these pins determined?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I enable just bit 6 (SPE) in the SPICR1 register, does that mean the SPI "alternative"&lt;/P&gt;&lt;P&gt;function is selected ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now if I enable the CAN2 module, does it mean the priority is now changed and the same &lt;/P&gt;&lt;P&gt;pins are driving TXCAN0/RXCAN0 ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having trouble understandiung the concept of "routed" SPI 0, routed CAN0, etc. Below&lt;/P&gt;&lt;P&gt;is the excerpt from the S12XE documentation.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;======================================================================================&lt;/P&gt;&lt;P&gt;Port M general purpose input/output data—Data Register&lt;/P&gt;&lt;P&gt;Port M pin 5 is associated with the TXCAN signal of CAN2 and the routed CAN4 and CAN0, as well as with SCK&lt;/P&gt;&lt;P&gt;signals of SPI0. The CAN2 function takes precedence over the routed CAN0, routed CAN4, the routed SPI0 and the general purpose&lt;/P&gt;&lt;P&gt;I/O function if the CAN2 module is enabled. The routed CAN0 function takes precedence over the routed CAN4, the&lt;/P&gt;&lt;P&gt;routed SPI0 and the general purpose I/O function if the routed CAN0 module is enabled. The routed CAN4 function&lt;/P&gt;&lt;P&gt;takes precedence over the routed SPI0 and general purpose I/O function if the routed CAN4 module is enabled. The&lt;/P&gt;&lt;P&gt;routed SPI0 function takes precedence of the general purpose I/O function if the routed SPI0 is enabled.&lt;/P&gt;&lt;P&gt;When not used with the alternative function, this pin can be used as general purpose I/O.&lt;/P&gt;&lt;P&gt;If the associated data direction bit of this pin is set to 1, a read returns the value of the port register, otherwise the&lt;/P&gt;&lt;P&gt;buffered pin input state is read.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 21:58:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-enables-the-alternative-function-on-port-M/m-p/249991#M9674</guid>
      <dc:creator>buhas</dc:creator>
      <dc:date>2014-02-20T21:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: What enables the alternative function on port M</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-enables-the-alternative-function-on-port-M/m-p/249992#M9675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. On S12XE there are several port routing registers, see their descriptions. 2. After routing peripheral priority is solved by enabling only peripherals which need to be enabled.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Feb 2014 08:58:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-enables-the-alternative-function-on-port-M/m-p/249992#M9675</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2014-02-21T08:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: What enables the alternative function on port M</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-enables-the-alternative-function-on-port-M/m-p/249993#M9676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Edward is right,&lt;/P&gt;&lt;P&gt;just to add 2.3.44 Module Routing Register (MODRR)&lt;/P&gt;&lt;P&gt;MC9S12XEP100RMV1&lt;/P&gt;&lt;P&gt;Rev. 1.25&lt;/P&gt;&lt;P&gt;02/2013&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/microcontrollers/doc/data_sheet/MC9S12XEP100RMV1.pdf" title="http://cache.freescale.com/files/microcontrollers/doc/data_sheet/MC9S12XEP100RMV1.pdf"&gt;http://cache.freescale.com/files/microcontrollers/doc/data_sheet/MC9S12XEP100RMV1.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 07:54:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-enables-the-alternative-function-on-port-M/m-p/249993#M9676</guid>
      <dc:creator>lama</dc:creator>
      <dc:date>2014-02-25T07:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: What enables the alternative function on port M</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-enables-the-alternative-function-on-port-M/m-p/249994#M9677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I set MODRR to 0x10. This enables the SPI0 function via port M pins 2,3,4,5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I enable the SPI control registers as follows:&lt;/P&gt;&lt;P&gt;SPI0CR1 = 0x56&lt;/P&gt;&lt;P&gt;SPI0CR2 = 0x10&lt;/P&gt;&lt;P&gt;SPIBR = 0x20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the documentation, the Port M register pin directions are forced to be input/output &lt;/P&gt;&lt;P&gt;accordingly based on the MODRR register setting. I expect the following to be the case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PM2 -&amp;gt; SPI_MISO - input&lt;/P&gt;&lt;P&gt;PM3 -&amp;gt; SPI_SS - output&lt;/P&gt;&lt;P&gt;PM4 -&amp;gt; SPI_MOSI - output&lt;/P&gt;&lt;P&gt;PM5 -&amp;gt; SPI_SCK - output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally I also set DDRM as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DDRM = 0x38&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other side of the SPI I have a Blackfin BF531 setup via hardware to boot-up via SPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code to write to the SPI data register is below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;ldab&amp;nbsp; CTBF_buffer&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;clra&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;tx_wait_loop_1:&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;//JW hier noch mal nach den Registern SPI0SR, SPI0DR schauen!&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;brclr SPI0SR,32,tx_wait_loop_1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;stab&amp;nbsp; SPI0DR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;addd&amp;nbsp; CTBF_checksum&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;std&amp;nbsp;&amp;nbsp; CTBF_checksum&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;/* transmit second byte and add to checksum */&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;ldab&amp;nbsp; CTBF_buffer:1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;clra&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;tx_wait_loop_2:&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;brclr SPI0SR,32,tx_wait_loop_2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;stab&amp;nbsp; SPI0DR&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;addd&amp;nbsp; CTBF_checksum&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;P&gt;std&amp;nbsp;&amp;nbsp; CTBF_checksum&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a backpressure line from the DSP (SPI_CTRL_0). Based on the analyzer trace this signal&lt;/P&gt;&lt;P&gt;is always low, so no problem. We use Port S pin 0 for this signal. The DDRS register is set as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DDRS = 0xFC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is I never see the SPI0 signals being driven. All I see is the SPI_SCK being driven to 0 for 1.291ms&lt;/P&gt;&lt;P&gt;once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I compile my project with CodeWarrior compiler ver 5.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Strangest part of all this is that I have an almost identical code base compiled with the Cosmic compiler&lt;/P&gt;&lt;P&gt;that boots the DSP just fine on the same hardware. We triple checked all the S12X registers and they are&lt;/P&gt;&lt;P&gt;identical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am running out of ideas what to look at next.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 22:21:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-enables-the-alternative-function-on-port-M/m-p/249994#M9677</guid>
      <dc:creator>buhas</dc:creator>
      <dc:date>2014-02-26T22:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: What enables the alternative function on port M</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-enables-the-alternative-function-on-port-M/m-p/249995#M9678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to find the problem but still looking to understand completely&lt;/P&gt;&lt;P&gt;why it is happenning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An _IO8 macro was replaced with an _IO16 macro to do a Write to the SPI Data&lt;/P&gt;&lt;P&gt;register. This code change was made when changing from the S12XD&lt;/P&gt;&lt;P&gt;processor to the S12XE processor. The "x256.h" file was replaced with the&lt;/P&gt;&lt;P&gt;"me51.h" file. This header file contains the register definitions and I am not sure&lt;/P&gt;&lt;P&gt;of its origin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* w SPI0DR $dc SPI1 Data Register*/&lt;/P&gt;&lt;P&gt;//_IO16(SPI0DR,0xdc)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;---not working&lt;/P&gt;&lt;P&gt;_IO8(SPI0DR,0xdd)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;lt;&amp;lt;--working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#&amp;nbsp; define _IO8(name,offset)&amp;nbsp; extern volatile u8&amp;nbsp; (name); /*CRCK_NO_CHECK*/&lt;/P&gt;&lt;P&gt;#&amp;nbsp; define _IO16(name,offset) extern volatile u16 (name); /*CRCK_NO_CHECK*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the "me51.inc" file I have the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_REGBAS&amp;nbsp;&amp;nbsp; equ $0000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;; w SPI0DR $dc SPI1 Data Register&lt;/P&gt;&lt;P&gt;SPI0DR equ (_REGBAS + $dc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned before, the _IO16 write works ok when the same codebase is compiled&lt;/P&gt;&lt;P&gt;with the Cosmic compiler. Yet when compiling with CodeWarriror the _IO16 does not&lt;/P&gt;&lt;P&gt;work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the assembly code that writes to the SPI Data register&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# asm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* transmit first byte and add to checksum */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldab&amp;nbsp; CTBF_buffer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clra&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tx_wait_loop_1:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //JW hier noch mal nach den Registern SPI0SR, SPI0DR schauen!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; brclr SPI0SR,32,tx_wait_loop_1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stab&amp;nbsp; SPI0DR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addd&amp;nbsp; CTBF_checksum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std&amp;nbsp;&amp;nbsp; CTBF_checksum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* transmit second byte and add to checksum */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldab&amp;nbsp; CTBF_buffer:1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clra&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tx_wait_loop_2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; brclr SPI0SR,32,tx_wait_loop_2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stab&amp;nbsp; SPI0DR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addd&amp;nbsp; CTBF_checksum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std&amp;nbsp;&amp;nbsp; CTBF_checksum&lt;/P&gt;&lt;P&gt;# endasm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where "CTBF_buffer" is a global defined as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u16 CTBF_buffer = 0;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 20:00:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/What-enables-the-alternative-function-on-port-M/m-p/249995#M9678</guid>
      <dc:creator>buhas</dc:creator>
      <dc:date>2014-02-27T20:00:33Z</dc:date>
    </item>
  </channel>
</rss>

