<?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>Model-Based Design Toolbox (MBDT)中的主题 Re: Setting UP CAN bus on S32K358 using MBDT</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Setting-UP-CAN-bus-on-S32K358-using-MBDT/m-p/1870392#M9119</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/232900"&gt;@primo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First of all, from the schematic screenshot you have attached, I understand that you are using the &lt;A href="https://www.nxp.com/design/design-center/development-boards-and-designs/s32k358-battery-management-unit-bmu-for-high-voltage-battery-management-system-hvbms-reference-design-board:RD-K358BMU" target="_self"&gt;RD-K358BMU&lt;/A&gt; Reference Design kit. This would have been really valuable information for us to support your request. For this particular board, we do offer a ready-to-run example that has the VCU CAN already configured and performing the task you are aiming for. This example is called&amp;nbsp;k358bmu_read_s32ct and can be accessed from the MBDT for BMS 1.1.0. Please make sure you have the latest MBDT for BMS 1.1.0 installed!&lt;/P&gt;
&lt;P&gt;Once you do that, go in the MATLAB command window and type the following command to access the example in the Current Folder.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;gt;&amp;gt; cd(fullfile(mbd_find_bms_root, 'BMS_Examples\k358bmu\k358bmu_read_s32ct'))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To give a bit of context, you are right, the CAN transceiver needs to be initialized before messages are sent over the CAN bus. The TJA initialization sequence is performed in the Initialize Function under VCU_CAN_INIT subsystem.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariuslucianand_0-1716363767263.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/280057i93A595C48B8384EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariuslucianand_0-1716363767263.png" alt="mariuslucianand_0-1716363767263.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And of course, the Spi channel needs to be properly set to match the SPI requirements of the TJA CAN transceiver. But this is already performed using the external configuration tools, by the channel name SpiChannel_TJA.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariuslucianand_1-1716363986495.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/280060i68EB630C0AE7F6D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariuslucianand_1-1716363986495.png" alt="mariuslucianand_1-1716363986495.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 May 2024 07:46:39 GMT</pubDate>
    <dc:creator>mariuslucianand</dc:creator>
    <dc:date>2024-05-22T07:46:39Z</dc:date>
    <item>
      <title>Setting UP CAN bus on S32K358 using MBDT</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Setting-UP-CAN-bus-on-S32K358-using-MBDT/m-p/1869838#M9116</link>
      <description>&lt;P&gt;Hello, I am currently working on the CAN bus communication using S32k358.&lt;/P&gt;&lt;P&gt;There are no examples for k358 chip, so based on the CAN transmit s32ct example, I made one for k358. However, when i deploy the example and connected my can analyzer, I am not reading anything and i do not observe the can_msg variable to increment (incrementing should've mean successful sent). It did not show any compilation error so i assumed it to be something hardware wrong.&lt;/P&gt;&lt;P&gt;Then i look into the datasheet and found that there exists a SPI communication between the can trans_reciever and MCU.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the question is, do i have to manually wakeup the can trans_reciever using SPI to send and recieve CAN message? Or am I doing anything wrong with the CAN setup. Thanks&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="primo_1-1716303470914.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/279888i17BE1E9E85D951ED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="primo_1-1716303470914.png" alt="primo_1-1716303470914.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="primo_0-1716303437607.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/279887iB66867307A3E23F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="primo_0-1716303437607.png" alt="primo_0-1716303437607.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 15:02:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Setting-UP-CAN-bus-on-S32K358-using-MBDT/m-p/1869838#M9116</guid>
      <dc:creator>primo</dc:creator>
      <dc:date>2024-05-21T15:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Setting UP CAN bus on S32K358 using MBDT</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Setting-UP-CAN-bus-on-S32K358-using-MBDT/m-p/1870392#M9119</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/232900"&gt;@primo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First of all, from the schematic screenshot you have attached, I understand that you are using the &lt;A href="https://www.nxp.com/design/design-center/development-boards-and-designs/s32k358-battery-management-unit-bmu-for-high-voltage-battery-management-system-hvbms-reference-design-board:RD-K358BMU" target="_self"&gt;RD-K358BMU&lt;/A&gt; Reference Design kit. This would have been really valuable information for us to support your request. For this particular board, we do offer a ready-to-run example that has the VCU CAN already configured and performing the task you are aiming for. This example is called&amp;nbsp;k358bmu_read_s32ct and can be accessed from the MBDT for BMS 1.1.0. Please make sure you have the latest MBDT for BMS 1.1.0 installed!&lt;/P&gt;
&lt;P&gt;Once you do that, go in the MATLAB command window and type the following command to access the example in the Current Folder.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;gt;&amp;gt; cd(fullfile(mbd_find_bms_root, 'BMS_Examples\k358bmu\k358bmu_read_s32ct'))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To give a bit of context, you are right, the CAN transceiver needs to be initialized before messages are sent over the CAN bus. The TJA initialization sequence is performed in the Initialize Function under VCU_CAN_INIT subsystem.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariuslucianand_0-1716363767263.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/280057i93A595C48B8384EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariuslucianand_0-1716363767263.png" alt="mariuslucianand_0-1716363767263.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And of course, the Spi channel needs to be properly set to match the SPI requirements of the TJA CAN transceiver. But this is already performed using the external configuration tools, by the channel name SpiChannel_TJA.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mariuslucianand_1-1716363986495.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/280060i68EB630C0AE7F6D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mariuslucianand_1-1716363986495.png" alt="mariuslucianand_1-1716363986495.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 07:46:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Setting-UP-CAN-bus-on-S32K358-using-MBDT/m-p/1870392#M9119</guid>
      <dc:creator>mariuslucianand</dc:creator>
      <dc:date>2024-05-22T07:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Setting UP CAN bus on S32K358 using MBDT</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Setting-UP-CAN-bus-on-S32K358-using-MBDT/m-p/1877304#M9140</link>
      <description>&lt;P&gt;It helped a lot, thank you very much for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 12:59:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Setting-UP-CAN-bus-on-S32K358-using-MBDT/m-p/1877304#M9140</guid>
      <dc:creator>primo</dc:creator>
      <dc:date>2024-05-29T12:59:06Z</dc:date>
    </item>
  </channel>
</rss>

