<?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: FreeRTOS Message Buffer Core to Core Bus-Fault Error in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FreeRTOS-Message-Buffer-Core-to-Core-Bus-Fault-Error/m-p/1682810#M25850</link>
    <description>&lt;P&gt;Hi Jing,&lt;/P&gt;&lt;P&gt;we are using the message buffers in a bigger software that i can not share with you. The problem occures not immediately. The sofware is running for 10h with much traffic through the message buffer.&lt;/P&gt;&lt;P&gt;I now overwrote the sbRECEIVE_COMPLETE like the sbSEND_COMPLETED macro is overwritten. But i do nothing in the sbRECEIVE_COMPLETED macro function now. With this change the software is running well. But i would like to understand whats the reason for this behaviour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2023 06:27:20 GMT</pubDate>
    <dc:creator>Flo1989</dc:creator>
    <dc:date>2023-07-06T06:27:20Z</dc:date>
    <item>
      <title>FreeRTOS Message Buffer Core to Core Bus-Fault Error</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FreeRTOS-Message-Buffer-Core-to-Core-Bus-Fault-Error/m-p/1679509#M25765</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we are using the freertos_message_buffer from the example provided in the sdk on a imxrt1176 device.&lt;/P&gt;&lt;P&gt;We extended the memory to send and receive blocks with a length of 1024bytes. So our config looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define APP_TASK_STACK_SIZE                                (configMINIMAL_STACK_SIZE + 100)
#define APP_READY_EVENT_DATA                               (1U)
#define APP_MESSAGE_BUFFER_EVENT_DATA                      (1U)
#define APP_MAX_MESSAGE_LENGTH							   (0x400U)
#define APP_MESSAGE_BUFFER_SIZE                            (0x800U)
#define APP_SH_MEM_PRIMARY_TO_SECONDARY_MB_OFFSET          (0x0u)
#define APP_SH_MEM_SECONDARY_TO_PRIMARY_MB_OFFSET          (0x4u)
#define APP_SH_MEM_PRIMARY_TO_SECONDARY_MB_STRUCT_OFFSET   (0x50u)
#define APP_SH_MEM_SECONDARY_TO_PRIMARY_MB_STRUCT_OFFSET   (0xA0u)
#define APP_SH_MEM_PRIMARY_TO_SECONDARY_BUF_STORAGE_OFFSET (0x100u)
#define APP_SH_MEM_SECONDARY_TO_PRIMARY_BUF_STORAGE_OFFSET (0x900u)

#define SH_MEM_TOTAL_SIZE (6144U)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems the cm7 core tries to notify a task on the cm4 core wich results in a bus-fault error. Normaly the cm7 core should not notify the task, becaouse in the xStreamBuffer struct the xTaskWaitingToSend pointer is NULL.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flo1989_1-1688111022559.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/230246i20D757F92DDC674B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Flo1989_1-1688111022559.png" alt="Flo1989_1-1688111022559.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But if the sbRECEIVE_COMPLETE macro is called the xTaskGenericNotify() fuction is called with the task address from the cm4 task. This results in a BusFault Address Register (BFAR) valid flag.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flo1989_2-1688111229230.png" style="width: 621px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/230248i83A746EB28CD895B/image-dimensions/621x291?v=v2" width="621" height="291" role="button" title="Flo1989_2-1688111229230.png" alt="Flo1989_2-1688111229230.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The rpmsh_sh_mem is located at address 0x202c0000 and looks like this. Here i can see the address of the slave task (0x1FFF6394) which is wrong called from the cm7 in the xSecondaryToPrimaryMessageBufferStruct at address 0x202C0060.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flo1989_3-1688111708224.png" style="width: 734px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/230252iB5E9045B48CBA7B2/image-dimensions/734x323?v=v2" width="734" height="323" role="button" title="Flo1989_3-1688111708224.png" alt="Flo1989_3-1688111708224.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;From the call hirarchy the sbRECEIVE_COMPLETE Macro should not call xTaskNotify because the xStreamBuffers xTaskWaitingToReceive is NULL.&lt;/P&gt;&lt;P&gt;Has anyone an idea what is happening here?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Florian&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>Fri, 30 Jun 2023 09:40:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FreeRTOS-Message-Buffer-Core-to-Core-Bus-Fault-Error/m-p/1679509#M25765</guid>
      <dc:creator>Flo1989</dc:creator>
      <dc:date>2023-06-30T09:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS Message Buffer Core to Core Bus-Fault Error</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FreeRTOS-Message-Buffer-Core-to-Core-Bus-Fault-Error/m-p/1681187#M25808</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/192473"&gt;@Flo1989&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I modified freertos_message_buffers_cm7 and&amp;nbsp;freertos_message_buffers_cm4 project using your code. But I don't see any problem. What else do you modified?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 10:04:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FreeRTOS-Message-Buffer-Core-to-Core-Bus-Fault-Error/m-p/1681187#M25808</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2023-07-04T10:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS Message Buffer Core to Core Bus-Fault Error</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FreeRTOS-Message-Buffer-Core-to-Core-Bus-Fault-Error/m-p/1682810#M25850</link>
      <description>&lt;P&gt;Hi Jing,&lt;/P&gt;&lt;P&gt;we are using the message buffers in a bigger software that i can not share with you. The problem occures not immediately. The sofware is running for 10h with much traffic through the message buffer.&lt;/P&gt;&lt;P&gt;I now overwrote the sbRECEIVE_COMPLETE like the sbSEND_COMPLETED macro is overwritten. But i do nothing in the sbRECEIVE_COMPLETED macro function now. With this change the software is running well. But i would like to understand whats the reason for this behaviour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 06:27:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FreeRTOS-Message-Buffer-Core-to-Core-Bus-Fault-Error/m-p/1682810#M25850</guid>
      <dc:creator>Flo1989</dc:creator>
      <dc:date>2023-07-06T06:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: FreeRTOS Message Buffer Core to Core Bus-Fault Error</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FreeRTOS-Message-Buffer-Core-to-Core-Bus-Fault-Error/m-p/1683589#M25868</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/192473"&gt;@Flo1989&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Sometimes busfault will not happened immediately after the wrong instruction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jul 2023 03:39:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/FreeRTOS-Message-Buffer-Core-to-Core-Bus-Fault-Error/m-p/1683589#M25868</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2023-07-07T03:39:10Z</dc:date>
    </item>
  </channel>
</rss>

