<?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: MPC5748C Re-initializes Flexcan in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5748C-Re-initializes-Flexcan/m-p/1751898#M24482</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you can use&amp;nbsp;FLEXCAN_DRV_SetBitrate and FLEXCAN_DRV_SetBitrateCbt for that, but changing bitrate requires all nodes on bus follow that too, otherwise you get error for further communications.&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
    <pubDate>Fri, 03 Nov 2023 10:24:37 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2023-11-03T10:24:37Z</dc:date>
    <item>
      <title>MPC5748C Re-initializes Flexcan</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748C-Re-initializes-Flexcan/m-p/1750803#M24471</link>
      <description>&lt;P&gt;My projects are based on Flexcan and ETHERNET.Now I'm going to &lt;STRONG&gt;re-initialize&lt;/STRONG&gt; Flexcan after receiving the command over the network,but I can't restart FlexCan successfully.The driver isn't normal.CANFD communication is error.The log of CANFD sender, printf ErrorFrame.The code is as follows:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;flexcan_user_config_t my_canCom1_InitConfig0 = {
    .fd_enable = true,
    .pe_clock = FLEXCAN_CLK_SOURCE_OSC,
    .max_num_mb = 16,
    .num_id_filters = FLEXCAN_RX_FIFO_ID_FILTERS_8,
    .is_rx_fifo_needed = false,
    .flexcanMode = FLEXCAN_NORMAL_MODE,
    .payload = FLEXCAN_PAYLOAD_SIZE_64,
    .bitrate = {
        .propSeg = 7,
        .phaseSeg1 = 5,
        .phaseSeg2 = 4,
        .preDivider = 1,
        .rJumpwidth = 1
    },
    .bitrate_cbt = {
        .propSeg = 11,
        .phaseSeg1 = 3,
        .phaseSeg2 = 3,
        .preDivider = 0,
        .rJumpwidth = 1
    },
    .transfer_type = FLEXCAN_RXFIFO_USING_INTERRUPTS,
    .rxFifoDMAChannel = 0U
};
flexcan_data_info_t dataInfo =
{
  	.data_length = 64U,
  	.msg_id_type = FLEXCAN_MSG_ID_STD,
//	.msg_id_type = FLEXCAN_MSG_ID_EXT,
  	.enable_brs  = true,
  	.fd_enable   = true,
  	.fd_padding  = 0U
};

FLEXCAN_DRV_Deinit(INST_CANCOM1);
FLEXCAN_DRV_Init(INST_CANCOM1, &amp;amp;canCom1_State, &amp;amp;canCom1_InitConfig0);

FLEXCAN_DRV_InstallEventCallback(INST_CANCOM1,my_callback_event,NULL);
/* Configure RX message buffer with index RX_MSG_ID and RX_MAILBOX */
FLEXCAN_DRV_ConfigRxMb(INST_CANCOM1, RX_MAILBOX, &amp;amp;dataInfo, 0u);
FLEXCAN_DRV_SetRxMbGlobalMask(INST_CANCOM1,FLEXCAN_MSG_ID_STD,0);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;If anyone can help to solve this problem?Thanks you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 06:26:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748C-Re-initializes-Flexcan/m-p/1750803#M24471</guid>
      <dc:creator>xiha</dc:creator>
      <dc:date>2023-11-02T06:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748C Re-initializes Flexcan</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748C-Re-initializes-Flexcan/m-p/1751748#M24480</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;why is the deinit/init needed in fact? What kind of error is detected on sender side?&lt;BR /&gt;You can inspect FlexCAN module registers to know if Normal mode is entered and no errors are detected during message reception. Not sure if module also transmit anything.&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 07:59:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748C-Re-initializes-Flexcan/m-p/1751748#M24480</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2023-11-03T07:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748C Re-initializes Flexcan</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748C-Re-initializes-Flexcan/m-p/1751780#M24481</link>
      <description>&lt;P&gt;Because I wanted to send commands to the MCU over the network and then change the baud rate of its CANFD communication, I used DeInit and Init to change the CANFD baud rate.&lt;/P&gt;&lt;P&gt;Thanks for your advice. I'll try.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 08:23:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748C-Re-initializes-Flexcan/m-p/1751780#M24481</guid>
      <dc:creator>xiha</dc:creator>
      <dc:date>2023-11-03T08:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748C Re-initializes Flexcan</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748C-Re-initializes-Flexcan/m-p/1751898#M24482</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you can use&amp;nbsp;FLEXCAN_DRV_SetBitrate and FLEXCAN_DRV_SetBitrateCbt for that, but changing bitrate requires all nodes on bus follow that too, otherwise you get error for further communications.&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 10:24:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748C-Re-initializes-Flexcan/m-p/1751898#M24482</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2023-11-03T10:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748C Re-initializes Flexcan</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748C-Re-initializes-Flexcan/m-p/1751923#M24483</link>
      <description>&lt;P&gt;Your advice is very useful, thank you！！！ \ ^_^ / \ ^_^ / \ ^_^ /&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 11:22:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748C-Re-initializes-Flexcan/m-p/1751923#M24483</guid>
      <dc:creator>xiha</dc:creator>
      <dc:date>2023-11-03T11:22:06Z</dc:date>
    </item>
  </channel>
</rss>

