<?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>Kinetis MicrocontrollersのトピックRe: Inquiry about how to set appropriate mailbox and msg_ID</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Inquiry-about-how-to-set-appropriate-mailbox-and-msg-ID/m-p/1588220#M64610</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you can use any of the available MBs for transmission or reception, also the configured ID can be any you need. Only note that number of MBs participating in&amp;nbsp;the matching and arbitration processes is given by MCR[MAXMB] config.&lt;BR /&gt;It is not completely correct that&amp;nbsp;&lt;SPAN&gt;the MB can be arbitrarily designated with 64 bytes payload. MB area is partitioned in tree blocks and each block can be configured for different payload, thus with payload increased a number of available MBs decreases. See&amp;nbsp;Table 43-11. RAM partition for more info. So for example if block 0 is set for 64byte payload, just 7 MBs are available in this block and each MB can send number of data bytes defined by DLC field (Table 43-10. DATA BYTEs validity).&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Petr&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2023 09:12:38 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2023-01-26T09:12:38Z</dc:date>
    <item>
      <title>Inquiry about how to set appropriate mailbox and msg_ID</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Inquiry-about-how-to-set-appropriate-mailbox-and-msg-ID/m-p/1587408#M64603</link>
      <description>&lt;P&gt;hello&lt;BR /&gt;I'm using the MPC5748 gw rgb board, and I'm trying to implement 8-channel CAN FD communication based on the flexcan example on that board.&lt;/P&gt;&lt;P&gt;Looking at the example of the board, there are TX, RX mailbox and msg_ID setting parts in Master/Slave setting.&lt;BR /&gt;#if defined(MASTER)&lt;BR /&gt;#define TX_MAILBOX (1UL)&lt;BR /&gt;#define TX_MSG_ID (1UL)&lt;BR /&gt;#define RX_MAILBOX (0UL)&lt;BR /&gt;#define RX_MSG_ID (2UL)&lt;BR /&gt;#elif defined(SLAVE)&lt;BR /&gt;#define TX_MAILBOX (0UL)&lt;BR /&gt;#define TX_MSG_ID (2UL)&lt;BR /&gt;#define RX_MAILBOX (1UL)&lt;BR /&gt;#define RX_MSG_ID (1UL)&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Looking for examples of other boards, the mailbox and msg_ID are defined with different numbers, and the HAL driver of the stm board provides a function to find an empty mailbox.&lt;/P&gt;&lt;P&gt;/* Definition of the TX and RX message buffers depending on the bus role */&lt;BR /&gt;#define TX_MAILBOX (11UL)&lt;BR /&gt;#define TX_MSG_ID (1UL)&lt;BR /&gt;#define RX_MAILBOX (10UL)&lt;BR /&gt;#define RX_MSG_ID (20UL)&lt;/P&gt;&lt;P&gt;I understand that the advantage of flexcan is that mailboxes can be flexibly applied.&lt;BR /&gt;Flexible mailboxes (0/8/16/32/64 bytes data length)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Based on the above document, I understood that the mailbox can be arbitrarily designated as 64 bytes. Is this correct?&lt;/P&gt;&lt;P&gt;Also, I want to define a total of 16 mailboxes for each activated CAN channel like the code below. Is this an efficient method?&lt;BR /&gt;Is there any problem if MSG_ID is declared arbitrarily in the same way?&lt;/P&gt;&lt;P&gt;#define CAN1_TX_MAILBOX (1UL)&lt;BR /&gt;#define CAN2_TX_MAILBOX (2UL)&lt;BR /&gt;#define CAN3_TX_MAILBOX (3UL)&lt;BR /&gt;#define CAN4_TX_MAILBOX (4UL)&lt;BR /&gt;#define CAN5_TX_MAILBOX (5UL)&lt;BR /&gt;#define CAN6_TX_MAILBOX (6UL)&lt;BR /&gt;#define CAN7_TX_MAILBOX (7UL)&lt;BR /&gt;#define CAN8_TX_MAILBOX (8UL)&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 01:22:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Inquiry-about-how-to-set-appropriate-mailbox-and-msg-ID/m-p/1587408#M64603</guid>
      <dc:creator>Sang-Hoon_Ahn</dc:creator>
      <dc:date>2023-01-25T01:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Inquiry about how to set appropriate mailbox and msg_ID</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Inquiry-about-how-to-set-appropriate-mailbox-and-msg-ID/m-p/1588220#M64610</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you can use any of the available MBs for transmission or reception, also the configured ID can be any you need. Only note that number of MBs participating in&amp;nbsp;the matching and arbitration processes is given by MCR[MAXMB] config.&lt;BR /&gt;It is not completely correct that&amp;nbsp;&lt;SPAN&gt;the MB can be arbitrarily designated with 64 bytes payload. MB area is partitioned in tree blocks and each block can be configured for different payload, thus with payload increased a number of available MBs decreases. See&amp;nbsp;Table 43-11. RAM partition for more info. So for example if block 0 is set for 64byte payload, just 7 MBs are available in this block and each MB can send number of data bytes defined by DLC field (Table 43-10. DATA BYTEs validity).&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Petr&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 09:12:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Inquiry-about-how-to-set-appropriate-mailbox-and-msg-ID/m-p/1588220#M64610</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2023-01-26T09:12:38Z</dc:date>
    </item>
  </channel>
</rss>

