<?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>S32KのトピックRe: S32K144 problems with UJA1169 CAN receiving</title>
    <link>https://community.nxp.com/t5/S32K/S32K144-problems-with-UJA1169-CAN-receiving/m-p/712635#M1554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FLEXCAN driver seems to be correctly configured. Could you please provide more information about the configuration of the communicating FLEXCAN nodes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Sep 2017 12:19:20 GMT</pubDate>
    <dc:creator>AnaAldescu</dc:creator>
    <dc:date>2017-09-01T12:19:20Z</dc:date>
    <item>
      <title>S32K144 problems with UJA1169 CAN receiving</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-problems-with-UJA1169-CAN-receiving/m-p/712633#M1552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I decided to put this issue to global, instead of reply only post (put here&lt;A href="https://community.nxp.com/thread/458223" rel="nofollow noopener noreferrer" target="_blank"&gt;S32K144 problems with LPSPI 16bit transmission to UJA1169&lt;/A&gt; )&lt;/P&gt;&lt;P&gt;I'm working with UJA1169 SBC and according to some info (mentioned in discussion link above) it should be in Force Normal Mode. I wanted to use CAN communication only for my purposes. In this mode CAN transceiver should be (always) enabled. But unfortunately it looks like it does work only in one direction - sending. Receiving CAN messages doesn't work at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using FLEXCAN library. When &lt;EM&gt;FLEXCAN_DRV_Receive&lt;/EM&gt; is called and I check the the transfer status the answer is always &lt;EM&gt;STATUS_BUSY &lt;/EM&gt;(commented line)&lt;EM&gt;.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The app is not going through the callback (and so through &lt;EM&gt;FLEXCAN_DRV_IRQHandler&lt;/EM&gt; as well), but when I'm use &lt;EM&gt;FLEXCAN_DRV_Send&lt;/EM&gt; everything seems to work as it should.&lt;/P&gt;&lt;P&gt;Here is a sample code (only FLEXCAN code):&lt;/P&gt;&lt;PRE class="language-c"&gt;&lt;CODE&gt;bool canDataReceived &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; false&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="property macro token"&gt;#define RX_MB (1U)&lt;/SPAN&gt;
&lt;SPAN class="property macro token"&gt;#define TX_MB (0U)&lt;/SPAN&gt;
&lt;SPAN class="property macro token"&gt;#define MSG_ID_1 0x1B0&lt;/SPAN&gt;
&lt;SPAN class="property macro token"&gt;#define MSG_ID_2 0x1C0&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;static&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;flexcan0_Callback&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;uint8_t instance&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 flexcan_event_type_t eventType&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 flexcan_state_t &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;flexcanState&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;flexcanState&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;instance&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

 &lt;SPAN class="keyword token"&gt;switch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;eventType&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;case&lt;/SPAN&gt; FLEXCAN_EVENT_RX_COMPLETE&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 canDataReceived &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; true&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;break&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;case&lt;/SPAN&gt; FLEXCAN_EVENT_TX_COMPLETE&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;break&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;default&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;break&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;int&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;main&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

 &lt;SPAN class="token function"&gt;FLEXCAN_DRV_Init&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;INST_CANCOM1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;canCom1_State&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;canCom1_InitConfig0&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="token function"&gt;FLEXCAN_DRV_ConfigTxMb&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;INST_CANCOM1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; TX_MB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;dataInfo&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; MSG_ID_1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

 &lt;SPAN class="token function"&gt;FLEXCAN_DRV_ConfigRxMb&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;INST_CANCOM1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; RX_MB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;dataInfo&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; MSG_ID_2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="token function"&gt;FLEXCAN_DRV_InstallEventCallback&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;INST_CANCOM1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; flexcan0_Callback&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; NULL&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

 &lt;SPAN class="comment token"&gt;/* Define receive buffer */&lt;/SPAN&gt;
 flexcan_msgbuff_t recvBuff&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="token function"&gt;FLEXCAN_DRV_Receive&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;INST_CANCOM1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; RX_MB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;recvBuff&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

 &lt;SPAN class="comment token"&gt;/* Wait until the previous FlexCAN receive is completed */&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;//while(FLEXCAN_DRV_GetTransferStatus(INST_CANCOM1, RX_MB) == STATUS_BUSY);&lt;/SPAN&gt;

 &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;canDataReceived&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="token function"&gt;FLEXCAN_DRV_Receive&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;INST_CANCOM1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; RX_MB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;recvBuff&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 canDataReceived &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; false&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hint what could possibly go wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 13:16:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-problems-with-UJA1169-CAN-receiving/m-p/712633#M1552</guid>
      <dc:creator>pekor</dc:creator>
      <dc:date>2017-08-31T13:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 problems with UJA1169 CAN receiving</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-problems-with-UJA1169-CAN-receiving/m-p/712634#M1553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SBC can't be the root cause&amp;nbsp;of your problem. This is from UJA1169 datasheet:&amp;nbsp;&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/28220i189E115E8895AE37/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;&lt;/P&gt;&lt;P&gt;Are you sure that CAN pins are connected right to SBC/MCU and PinSettings configuration is ok?&lt;/P&gt;&lt;P&gt;Also, you can check the example from SDK with some CAN communication (&amp;lt;SDK&amp;gt;/examples\S32K144\demo_apps\flexcan_encrypted)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Razvan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2017 11:52:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-problems-with-UJA1169-CAN-receiving/m-p/712634#M1553</guid>
      <dc:creator>razva_tilimpea</dc:creator>
      <dc:date>2017-09-01T11:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 problems with UJA1169 CAN receiving</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-problems-with-UJA1169-CAN-receiving/m-p/712635#M1554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FLEXCAN driver seems to be correctly configured. Could you please provide more information about the configuration of the communicating FLEXCAN nodes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2017 12:19:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-problems-with-UJA1169-CAN-receiving/m-p/712635#M1554</guid>
      <dc:creator>AnaAldescu</dc:creator>
      <dc:date>2017-09-01T12:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 problems with UJA1169 CAN receiving</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-problems-with-UJA1169-CAN-receiving/m-p/712636#M1555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank You for the hint with example code. I've configured this to work with my board and it helped me to realize that to send any CAN frame and that I want to catch with my device I &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;EM&gt;must &lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; use ID that configured with &lt;CODE&gt;&lt;SPAN class=""&gt;FLEXCAN_DRV_ConfigRxMb &lt;/SPAN&gt;&lt;/CODE&gt;function. Yes, it's my fault. But if so, what I need to do to catch any frame CAN (with any ID)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What in fact is the influence of the parameters that comes with &lt;EM&gt;ConfigRxMb/ConfigTxMb &lt;/EM&gt;routine? I see that ID is checked but for example data from &lt;EM&gt;flexcan_data_info_t &lt;/EM&gt;doesn't influence anything.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 13:45:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-problems-with-UJA1169-CAN-receiving/m-p/712636#M1555</guid>
      <dc:creator>pekor</dc:creator>
      <dc:date>2017-09-06T13:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 problems with UJA1169 CAN receiving</title>
      <link>https://community.nxp.com/t5/S32K/S32K144-problems-with-UJA1169-CAN-receiving/m-p/712637#M1556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to receive all frames, no matter the ID there are two possible configurations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Enable Rx Individual Masking (&lt;STRONG&gt;FLEXCAN_DRV_SetRxMaskType(INSTANCE_NUMBER, FLEXCAN_RX_MASK_INDIVIDUAL)&lt;/STRONG&gt;) and set the Rx Individual Mask as "don't care" for the corresponding message buffer (&lt;STRONG&gt;FLEXCAN_DRV_SetRxIndividualMask(INSTANCE_NUMBER, id_type, mb_idx, 0U)&lt;/STRONG&gt;). Each&amp;nbsp;bit in the Individual Mask has the following meaning: 0b - "don't care", 1b - filter is checked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Enable global masking scheme&amp;nbsp;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;FLEXCAN_DRV_SetRxMaskType(INSTANCE_NUMBER, FLEXCAN_RX_MASK_GLOBAL&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;) and set the Rx Global Mask (&lt;STRONG&gt;FLEXCAN_DRV_SetRxMbGlobalMask(INSTANCE_NUMBER, id_type, 0U)&lt;/STRONG&gt;). The global masking scheme sets a single mask for all MBs except MB14 and MB15 (FLEXCAN_DRV_SetRxMb14Mask(), FLEXCAN_DRV_SetRxMb15Mask).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After initializing the FlexCAN module, the &lt;STRONG&gt;global masking scheme is enabled&lt;/STRONG&gt;.&amp;nbsp;FLEXCAN_DRV_ConfigRxMb() configures a MB for reception and an ID for which the configured mask applies. The data from&amp;nbsp;flexcan_data_info_t is used to configure the ID type (standard or extended) and other parameters such as expected payload size and bit rate switch inside CAN FD frames.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ana&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2017 14:28:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K144-problems-with-UJA1169-CAN-receiving/m-p/712637#M1556</guid>
      <dc:creator>AnaAldescu</dc:creator>
      <dc:date>2017-09-06T14:28:13Z</dc:date>
    </item>
  </channel>
</rss>

