<?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のトピックHow to Set TJA1145 CAN active mode</title>
    <link>https://community.nxp.com/t5/S32K/How-to-Set-TJA1145-CAN-active-mode/m-p/1273616#M10810</link>
    <description>&lt;P&gt;I'm using S32K144 SPI to port the TJA1145 CAN transceiver, but I cannot set TJA1145 to normal mode and active CAN, the CANH and CANL have no 2.5v; the SPI data and clock are sending completely with measurement, following is my code on S32DS:&lt;/P&gt;&lt;P&gt;====================================&lt;/P&gt;&lt;P&gt;#define TIMEOUT 1000UL&lt;BR /&gt;#define BUFFER_SIZE 2&lt;/P&gt;&lt;P&gt;int init_master;&lt;BR /&gt;int frame_sent=2;&lt;BR /&gt;int ret_1;&lt;BR /&gt;int ret_2;&lt;BR /&gt;int ret_3;&lt;BR /&gt;int ret_4;&lt;/P&gt;&lt;P&gt;uint8_t master_send_1[BUFFER_SIZE]={0x01,0x07}; //set Normal Mode from TJA1145 datasheet&lt;BR /&gt;uint8_t master_send_2[BUFFER_SIZE]={0x20,0x7A};&amp;nbsp;//set CAN active from TJA1145 datasheet&lt;BR /&gt;uint8_t master_send_3[BUFFER_SIZE]={0x03}; //read Mode status&lt;BR /&gt;uint8_t master_send_4[BUFFER_SIZE]={0x22}; //read CAN status&lt;BR /&gt;uint8_t master_receive_1[2];&lt;BR /&gt;uint8_t master_receive_2[2];&lt;BR /&gt;uint8_t master_receive_3[2];&lt;BR /&gt;uint8_t master_receive_4[2];&lt;/P&gt;&lt;P&gt;int spi_init(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT, g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);&lt;BR /&gt;CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);&lt;/P&gt;&lt;P&gt;init_master=SPI_MasterInit(&amp;amp;spi_pal_1_Instance, &amp;amp;LPSPI_0_MasterInitConfig0);&lt;BR /&gt;printf("MasterInit_lspi=%d////",init_master);&lt;/P&gt;&lt;P&gt;ret_1=SPI_MasterTransfer(&amp;amp;spi_pal_1_Instance, master_send_1, master_receive_1, frame_sent);&lt;BR /&gt;printf("MasterTransfer_ModeSet=%d////rtn=0x%x\n",ret_1,master_receive_1[0]);&lt;/P&gt;&lt;P&gt;ret_2=SPI_MasterTransfer(&amp;amp;spi_pal_1_Instance, master_send_2, master_receive_2, frame_sent);&lt;BR /&gt;printf("MasterTransfer_CANSet=%d////rtn=0x%x\n",ret_2,master_receive_2[0]);&lt;/P&gt;&lt;P&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;int spi_main(void)&amp;nbsp; ////my platform is repeating the main.&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;ret_3=SPI_MasterTransfer(&amp;amp;spi_pal_1_Instance, master_send_3, master_receive_3, frame_sent);&lt;BR /&gt;printf("MasterTransfer_MainStatus=%d////Status=%x////",ret_3,master_receive_3[1]);&lt;/P&gt;&lt;P&gt;ret_4=SPI_MasterTransfer(&amp;amp;spi_pal_1_Instance, master_send_4, master_receive_4, frame_sent);&lt;BR /&gt;printf("MasterTransfer_CANStatus=%d////Status=%x////",ret_4,master_receive_4[1]);&lt;/P&gt;&lt;P&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;log==&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1620378014147.jpg" style="width: 976px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/144205iA65EE91C8A19C088/image-size/large?v=v2&amp;amp;px=999" role="button" title="1620378014147.jpg" alt="1620378014147.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;initializing and command are completed, but the status is always 0, CANH/CANL no 2.5v.&lt;/P&gt;&lt;P&gt;does the procedure I make is wrong? thanks!!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 May 2021 09:50:50 GMT</pubDate>
    <dc:creator>edt102983</dc:creator>
    <dc:date>2021-05-07T09:50:50Z</dc:date>
    <item>
      <title>How to Set TJA1145 CAN active mode</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Set-TJA1145-CAN-active-mode/m-p/1273616#M10810</link>
      <description>&lt;P&gt;I'm using S32K144 SPI to port the TJA1145 CAN transceiver, but I cannot set TJA1145 to normal mode and active CAN, the CANH and CANL have no 2.5v; the SPI data and clock are sending completely with measurement, following is my code on S32DS:&lt;/P&gt;&lt;P&gt;====================================&lt;/P&gt;&lt;P&gt;#define TIMEOUT 1000UL&lt;BR /&gt;#define BUFFER_SIZE 2&lt;/P&gt;&lt;P&gt;int init_master;&lt;BR /&gt;int frame_sent=2;&lt;BR /&gt;int ret_1;&lt;BR /&gt;int ret_2;&lt;BR /&gt;int ret_3;&lt;BR /&gt;int ret_4;&lt;/P&gt;&lt;P&gt;uint8_t master_send_1[BUFFER_SIZE]={0x01,0x07}; //set Normal Mode from TJA1145 datasheet&lt;BR /&gt;uint8_t master_send_2[BUFFER_SIZE]={0x20,0x7A};&amp;nbsp;//set CAN active from TJA1145 datasheet&lt;BR /&gt;uint8_t master_send_3[BUFFER_SIZE]={0x03}; //read Mode status&lt;BR /&gt;uint8_t master_send_4[BUFFER_SIZE]={0x22}; //read CAN status&lt;BR /&gt;uint8_t master_receive_1[2];&lt;BR /&gt;uint8_t master_receive_2[2];&lt;BR /&gt;uint8_t master_receive_3[2];&lt;BR /&gt;uint8_t master_receive_4[2];&lt;/P&gt;&lt;P&gt;int spi_init(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT, g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);&lt;BR /&gt;CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);&lt;/P&gt;&lt;P&gt;init_master=SPI_MasterInit(&amp;amp;spi_pal_1_Instance, &amp;amp;LPSPI_0_MasterInitConfig0);&lt;BR /&gt;printf("MasterInit_lspi=%d////",init_master);&lt;/P&gt;&lt;P&gt;ret_1=SPI_MasterTransfer(&amp;amp;spi_pal_1_Instance, master_send_1, master_receive_1, frame_sent);&lt;BR /&gt;printf("MasterTransfer_ModeSet=%d////rtn=0x%x\n",ret_1,master_receive_1[0]);&lt;/P&gt;&lt;P&gt;ret_2=SPI_MasterTransfer(&amp;amp;spi_pal_1_Instance, master_send_2, master_receive_2, frame_sent);&lt;BR /&gt;printf("MasterTransfer_CANSet=%d////rtn=0x%x\n",ret_2,master_receive_2[0]);&lt;/P&gt;&lt;P&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;int spi_main(void)&amp;nbsp; ////my platform is repeating the main.&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;ret_3=SPI_MasterTransfer(&amp;amp;spi_pal_1_Instance, master_send_3, master_receive_3, frame_sent);&lt;BR /&gt;printf("MasterTransfer_MainStatus=%d////Status=%x////",ret_3,master_receive_3[1]);&lt;/P&gt;&lt;P&gt;ret_4=SPI_MasterTransfer(&amp;amp;spi_pal_1_Instance, master_send_4, master_receive_4, frame_sent);&lt;BR /&gt;printf("MasterTransfer_CANStatus=%d////Status=%x////",ret_4,master_receive_4[1]);&lt;/P&gt;&lt;P&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;log==&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1620378014147.jpg" style="width: 976px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/144205iA65EE91C8A19C088/image-size/large?v=v2&amp;amp;px=999" role="button" title="1620378014147.jpg" alt="1620378014147.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;initializing and command are completed, but the status is always 0, CANH/CANL no 2.5v.&lt;/P&gt;&lt;P&gt;does the procedure I make is wrong? thanks!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 09:50:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Set-TJA1145-CAN-active-mode/m-p/1273616#M10810</guid>
      <dc:creator>edt102983</dc:creator>
      <dc:date>2021-05-07T09:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Set TJA1145 CAN active mode</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Set-TJA1145-CAN-active-mode/m-p/1273671#M10813</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;try to use transfer blocking function &lt;SPAN&gt;SPI_MasterTransferBlocking&lt;/SPAN&gt;().&lt;BR /&gt;Or if using non-blocking one then check if present transfer is finished before new can happen; using &lt;SPAN&gt;SPI_GetStatus&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Petr&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 11:39:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Set-TJA1145-CAN-active-mode/m-p/1273671#M10813</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-05-07T11:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Set TJA1145 CAN active mode</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Set-TJA1145-CAN-active-mode/m-p/1274144#M10826</link>
      <description>&lt;P&gt;Thanks for the advice; otherwise, do I have to do SPI_SlaveInit() for TJA1145? or just sending the SPI data in one hop.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 02:26:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Set-TJA1145-CAN-active-mode/m-p/1274144#M10826</guid>
      <dc:creator>edt102983</dc:creator>
      <dc:date>2021-05-10T02:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Set TJA1145 CAN active mode</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Set-TJA1145-CAN-active-mode/m-p/1274176#M10828</link>
      <description>&lt;P&gt;finding&amp;nbsp;the&amp;nbsp;right&amp;nbsp;skills&amp;nbsp;to&amp;nbsp;your&amp;nbsp;startup&amp;nbsp;might&amp;nbsp;be&amp;nbsp;easier&amp;nbsp;with&amp;nbsp;those&amp;nbsp;proven&amp;nbsp;hiring&amp;nbsp;guidelines.&amp;nbsp;&lt;BR /&gt;learn&amp;nbsp;how&amp;nbsp;to&amp;nbsp;attract&amp;nbsp;and&amp;nbsp;maintain&amp;nbsp;gifted&amp;nbsp;human&amp;nbsp;beings.&amp;nbsp;read&amp;nbsp;an&amp;nbsp;interview&amp;nbsp;with&amp;nbsp;exgoogler&amp;nbsp;david&lt;BR /&gt;&amp;nbsp;bizer.&amp;nbsp;highlights:&amp;nbsp;we&amp;amp;apos;re&amp;nbsp;a&amp;nbsp;group&amp;nbsp;of&amp;nbsp;startup&amp;nbsp;fans,&amp;nbsp;we&amp;amp;apos;ve&amp;nbsp;a&amp;nbsp;、global&amp;nbsp;reach&lt;/P&gt;&lt;P&gt;&lt;A title="voip phone" href="https://www.newhotplace.com/voipphone" target="_self"&gt;voip phone&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 03:29:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Set-TJA1145-CAN-active-mode/m-p/1274176#M10828</guid>
      <dc:creator>whotplace</dc:creator>
      <dc:date>2021-05-10T03:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Set TJA1145 CAN active mode</title>
      <link>https://community.nxp.com/t5/S32K/How-to-Set-TJA1145-CAN-active-mode/m-p/1274803#M10840</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;no you need not it.&amp;nbsp;&lt;SPAN&gt;SPI_SlaveInit() is called if MCU's SPI peripheral is going to be used as slave. This is not a case if communicate with TJA1145, which works as SPI slave and MCU is SPI master.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Petr&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 06:24:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-Set-TJA1145-CAN-active-mode/m-p/1274803#M10840</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2021-05-11T06:24:40Z</dc:date>
    </item>
  </channel>
</rss>

