<?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 Re: problem sending data on s08 can in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220838#M19237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Cambria','serif'; font-size: 11pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-themecolor: dark2;"&gt;Before transmitting I am polling till I find empty tx buf. When I have&amp;nbsp; got that,&lt;BR /&gt;then only I put data in data seg register. But still I am not able to receive&lt;BR /&gt;the data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Cambria','serif'; font-size: 11pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-themecolor: dark2;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jan 2013 03:34:02 GMT</pubDate>
    <dc:creator>Pinak</dc:creator>
    <dc:date>2013-01-08T03:34:02Z</dc:date>
    <item>
      <title>problem sending data on s08 can</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220834#M19233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using s08dz48 controller.&lt;/P&gt;&lt;P&gt;I have configured CAN module to transmit data.&lt;/P&gt;&lt;P&gt;Below are the settings&lt;/P&gt;&lt;P&gt;OSC CLK=4M, No PLL used&lt;/P&gt;&lt;P&gt;clk to CAN from OSC.&lt;/P&gt;&lt;P&gt;CAN configured at 250KBPS&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CAN module is working and I am able to send required data bytes(0 to 7) on bus.&lt;/P&gt;&lt;P&gt;The problem is that I am receiving garbage data OR 0x00 on bus.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is because the the transmit data registers does not cantain the desired value.&lt;/P&gt;&lt;P&gt;This can be seen in debug window, whenever data is assigned to CANtxdata register, it does not get loaded to cantxdata register.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any problem with clock.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2013 15:31:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220834#M19233</guid>
      <dc:creator>Pinak</dc:creator>
      <dc:date>2013-01-04T15:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: problem sending data on s08 can</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220835#M19234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Messages sent out from a MSCAN node are not received by the same node. In a real application, it doesn't make sense to listen to your own messages. For debugging and self test purposes only, there is a "loop back" mode which causes the sent messages to appear in the rx buffers. Unless you have enabled loop back, you will never receive the sent messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can verify that the messages are sent correctly (with an external CAN listener), then there cannot be any problems with your clock or baudrate settings. I don't understand what you mean with "the transmit data registers does not contain the desired value".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 09:51:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220835#M19234</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2013-01-07T09:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: problem sending data on s08 can</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220836#M19235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;I am not testing CAN in loopback mode, I am sending data on bus &amp;amp; have connected can analyzer on the other side. I am also able to send data on to the bus.&lt;/P&gt;&lt;P&gt;The registers I mentioned above are the CANTDSR0-CANTDSR7. Whatever data I assign to these registers doesnt gets store there and ultimately I dont receive it.&lt;/P&gt;&lt;P&gt;i.e CANTDSR0=can_data[0], then the data in var can_data[0] is not assigned to CANTDSR0, and after the above line of code CANTDSR0 still contains 0x00.&lt;/P&gt;&lt;P&gt;Any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 10:01:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220836#M19235</guid>
      <dc:creator>Pinak</dc:creator>
      <dc:date>2013-01-07T10:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: problem sending data on s08 can</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220837#M19236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you didn't select any TX buffer. CANTDSRx is writeable and readable only when one of CANTBSEL bits in is set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 12:15:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220837#M19236</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2013-01-07T12:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: problem sending data on s08 can</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220838#M19237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Cambria','serif'; font-size: 11pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-themecolor: dark2;"&gt;Before transmitting I am polling till I find empty tx buf. When I have&amp;nbsp; got that,&lt;BR /&gt;then only I put data in data seg register. But still I am not able to receive&lt;BR /&gt;the data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: 'Cambria','serif'; font-size: 11pt; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-themecolor: dark2;"&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 03:34:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220838#M19237</guid>
      <dc:creator>Pinak</dc:creator>
      <dc:date>2013-01-08T03:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: problem sending data on s08 can</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220839#M19238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you should show us your code, so it would be easier for us to understand what you are doing? There is no need for polling for an empty tx-buf, just check that CANTLG is non-zero and then assign CANTBSEL = CANTFLG. You can't write to any CAN buffer resigster before doing so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sten&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 06:24:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220839#M19238</guid>
      <dc:creator>StenS</dc:creator>
      <dc:date>2013-01-08T06:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: problem sending data on s08 can</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220840#M19239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sten,&lt;/P&gt;&lt;P&gt;Below is the code through which I select tx buf and then write data in data seg register,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/****************************************************************************&lt;/P&gt;&lt;P&gt;x=0; &lt;/P&gt;&lt;P&gt;while(!(CANTFLG &amp;amp; (0x01&amp;lt;&amp;lt;x)))&amp;nbsp;&amp;nbsp; // find free buf&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x++;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(x == 3) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=0;&lt;/P&gt;&lt;P&gt; }&amp;nbsp; &lt;/P&gt;&lt;P&gt; CANTBSEL = 0x01&amp;lt;&amp;lt;x;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 08:59:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220840#M19239</guid>
      <dc:creator>Pinak</dc:creator>
      <dc:date>2013-01-08T08:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: problem sending data on s08 can</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220841#M19240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this approach instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (CANTFLG) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // any transmit buffer empty?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CANTBSEL = CANTFLG;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // select first empty transmit buffer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; // write IDR-, DLR- and DSR-registers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; CANTFLG = CANTBSEL;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Transmit!&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;else // no vacant transmit buffer; do the appropiate action (wait or put message in software buffer)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 09:30:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220841#M19240</guid>
      <dc:creator>StenS</dc:creator>
      <dc:date>2013-01-08T09:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: problem sending data on s08 can</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220842#M19241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This piece of code doesn't demonstrate your problem. Where are accesses to xxxTDSRx?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you wonder if S08DZ CAN is working? Yes, it is fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 09:32:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220842#M19241</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2013-01-08T09:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: problem sending data on s08 can</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220843#M19242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks!. i been working for a while with a JM128 Coldfire V1 microcontroller.&amp;nbsp; this time, i need to talk with a MPPT module that uses CAN to send telemetry information (temperature, current, voltage, etc.).&amp;nbsp; i used as template a CAN library made to HCS08 microcontrollers.&amp;nbsp; if i made polling over nodes ID, i can get the whole think work flawless.&amp;nbsp; but, this MPPT module needs a remote frame request to send its data trought the bus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i get this to work? its just as easy as setting RTR bit to 1?&lt;/P&gt;&lt;P&gt;this is my routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CAN initialization routine (using 12Mhz external oscillator, i get 10.66 us bit time or 93.75kbits/s of baudrate.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void CAN_Init(unsigned char loopback){&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANCTL0 |= CANCTL0_INITRQ_MASK; // Solicitud para entrar en modo Inicialización.&lt;/P&gt;&lt;P&gt;&amp;nbsp; while(!CANCTL1_INITAK);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Espere hasta que entre en modo Inicializacion&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; if(loopback &amp;amp; 0x01 == 0x01){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CANCTL1 = CANCTL1_CANE_MASK | CANCTL1_LOOPB_MASK;&amp;nbsp;&amp;nbsp; //Si está activado modo LoopBack.&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; else{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CANCTL1 = CANCTL1_CANE_MASK;&amp;nbsp;&amp;nbsp; //Modo normal activado&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CANBTR0 = 0xC7; // Ajuste el preescaler del modulo.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; // One sample per bit, TSEG1 = 10, and TSEG2 = 3.&lt;/P&gt;&lt;P&gt;&amp;nbsp; // CANBTR1 = 0x3A;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CANBTR1_SAMP = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANBTR1_TSEG_10 = 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANBTR1_TSEG_20 = 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDAC = 0x10; // seleccione cuatro filtros de 16 bits.&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDAR0 = 0x00; // Borre los registros de filtros.&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDAR1 = 0x00;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDAR2 = 0x00;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDAR3 = 0x00;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDAR4 = 0x00;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDAR5 = 0x00;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDAR6 = 0x00;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDAR7 = 0x00; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDMR0 = 0xff; // Acepte todos los mensajes de entrada&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDMR1 = 0xff;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDMR2 = 0xff;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDMR3 = 0xff;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDMR4 = 0xff;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDMR5 = 0xff;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDMR6 = 0xff;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANIDMR7 = 0xff;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANCTL0 &amp;amp;= ~CANCTL0_INITRQ_MASK; // Solicitar salida del modo de inicializacion. &lt;/P&gt;&lt;P&gt;&amp;nbsp; while(CANCTL1_INITAK);&amp;nbsp; // espere hasta que MSCAN entre en modo normal&lt;/P&gt;&lt;P&gt;&amp;nbsp; while(!CANCTL0_SYNCH); // espere hasta que MSCAN se sincronice con bus.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; // Reset the receiver wake-up, CAN status change, overrun, &lt;/P&gt;&lt;P&gt;&amp;nbsp; // and receiver full interrupt flags.&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANRFLG |= CANRFLG_WUPIF_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANRFLG |= CANRFLG_CSCIF_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANRFLG |= CANRFLG_OVRIF_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANRFLG |= CANRFLG_RXF_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; // Enable the receive buffer full interrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANRIER |= CANRIER_RXFIE_MASK;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CAN Send routine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unsigned char CAN_Send(unsigned long id, unsigned char priority, unsigned char length, unsigned char *txdata) {&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; unsigned char index;&lt;/P&gt;&lt;P&gt;&amp;nbsp; unsigned char txbuffer = {0};&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; if(!CANTFLG){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Están llenos los buses de salida???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return CAN_BUFFER_FULL;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CANTBSEL = CANTFLG; // Seleccione el buffer numerado más pequeño&lt;/P&gt;&lt;P&gt;&amp;nbsp; txbuffer = CANTBSEL;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANTIDR0 = (id &amp;gt;&amp;gt; 3) &amp;amp; 0xff;&amp;nbsp; // Cargue el identificador en los registros IDR.&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANTIDR1 = (id &amp;amp; 0x07) &amp;lt;&amp;lt; 5;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /************/&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANTIDR3_RTR=1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; /***********/&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; for(index = 0; index &amp;lt; length; index++) { //Cargue el dato en el buffer de datos.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(&amp;amp;CANTDSR0 + index) = txdata[index];&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CANTDLR = length; //ajuste la longitud del mensaje&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANTTBPR = priority; // ajuste la prioridad del mensaje&lt;/P&gt;&lt;P&gt;&amp;nbsp; CANTFLG = txbuffer; //Baje la bandera de transmision del buffer.&amp;nbsp; 1= baja bandera.&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; while((CANTFLG &amp;amp; txbuffer) != txbuffer); //espere hasta que se transmita el dato.&lt;/P&gt;&lt;P&gt;&amp;nbsp; return CAN_NO_ERROR;&amp;nbsp; //si el mensaje llegó, avise que no hubo error.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards;&lt;/P&gt;&lt;P&gt;Mauricio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 16:57:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/problem-sending-data-on-s08-can/m-p/220843#M19242</guid>
      <dc:creator>mauricio2346</dc:creator>
      <dc:date>2013-02-08T16:57:31Z</dc:date>
    </item>
  </channel>
</rss>

