<?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>Wireless MCUのトピックRe: KW38 BLE stack memory issue</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1211778#M10568</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/181601"&gt;@Nidhin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the confirmation. We will address this issue in the next release (@ mid of February).&lt;/P&gt;
&lt;P&gt;Until then, from my point of view, the best option is to increase the number of buffers. I'm expecting that at some point, you are receiving at the application level an internal error event with the status gBleOutOfMemory_c and the error source: gL2capRxPacket_c.&lt;/P&gt;
&lt;P&gt;When this error is occurring, please look into the&amp;nbsp;memTrack structure to see active buffers: pCaller and&amp;nbsp;requested_size in order to increase the buffer set accordingly.&lt;/P&gt;
&lt;P&gt;Below is the&amp;nbsp;BlockTracking_t structure where I highlighted the parameters under interest.&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;typedef PACKED_STRUCT BlockTracking_tag&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; void *blockAddr; /*Addr of Msg, note that this pointer is 4 bytes bigger than the addr in the pool has&amp;nbsp; the header of the msg is 4 bytes */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint16_t blockSize; /*Size of block in bytes.*/&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint16_t fragmentWaste; /*Size requested by allocator.*/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; void *allocAddr; /*Return address of last Alloc made */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; void *freeAddr; /*Return address of last Free made */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint16_t allocCounter; /*No of time this msg has been allocated */&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint16_t freeCounter; /*No of time this msg has been freed */&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; memTrackingStatus_t allocStatus; /*1 if currently allocated, 0 if currently free */&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint32_t timeStamp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; void *pCaller;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint16_t requested_size;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;} blockTracking_t;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I will keep you updated on the progress on our side.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ovidiu&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jan 2021 13:52:13 GMT</pubDate>
    <dc:creator>ovidiu_usturoi</dc:creator>
    <dc:date>2021-01-14T13:52:13Z</dc:date>
    <item>
      <title>KW38 BLE stack memory issue</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1201795#M10487</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I was testing the wireless uart sample application on FRDM KW38 target. After a couple of tests the target does not scan/connect the phone. It is a sporadic issue. The test scenario is described below:&lt;/P&gt;&lt;P&gt;Target hardware: FRDM KW38&lt;/P&gt;&lt;P&gt;SDK version: 2.6.9&lt;/P&gt;&lt;P&gt;MCU Xpresso version: 11.1.0&lt;/P&gt;&lt;P&gt;Target application: frdmkw38_wireless_uart_bm&lt;/P&gt;&lt;P&gt;Mobile application: NXP IoT Toolbox (Android)&lt;/P&gt;&lt;P&gt;App pool details(same as in the sample app):&lt;/P&gt;&lt;P&gt;&lt;FONT color="#7f0055"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;&lt;STRONG&gt;#define&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt; AppPoolsDetails_c \&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;_block_size_ 32 _number_of_blocks_ 4 _eol_ \&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;_block_size_ 80 _number_of_blocks_ 6 _eol_ \&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;_block_size_ 288 _number_of_blocks_ 16 _eol_ \&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;_block_size_ 312 _number_of_blocks_ 1 _eol_ \&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Monospace"&gt;&lt;FONT size="2"&gt;_block_size_ 400 _number_of_blocks_ 2 _eol_&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Operation sequence:&lt;/P&gt;&lt;P&gt;1. Start wireless uart application on KW38&lt;/P&gt;&lt;P&gt;2. Connect to wireless uart using NXP IoT Toolbox android application&lt;/P&gt;&lt;P&gt;3. From Phone UI send continuous messages from a place where signal strength is very low (some packets were missing)&lt;/P&gt;&lt;P&gt;(Sometimes device will disconnect and reconnect)&lt;/P&gt;&lt;P&gt;4. After several messages, the memory pool count increases to a very high value and then does not appear to decrease anytime later even if BT is disconnected&lt;/P&gt;&lt;P&gt;5. Once the memory pool count reaches to a high value (Snapshot attached below), BLE stack does not respond (No callbacks, no scanning/connection possible without FRDM KW38 system restart)&lt;/P&gt;&lt;P&gt;Seems like a memory leak in BLE stack. Can you please look into this issue?&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Nidhin&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (7).png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133061i9467A082B49EC53C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (7).png" alt="Screenshot (7).png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 05:58:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1201795#M10487</guid>
      <dc:creator>Nidhin</dc:creator>
      <dc:date>2020-12-22T05:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: KW38 BLE stack memory issue</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1202801#M10496</link>
      <description>&lt;P&gt;Dear NXP BLE software team,&lt;/P&gt;&lt;P&gt;Please help on this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nidhin&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 06:01:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1202801#M10496</guid>
      <dc:creator>Nidhin</dc:creator>
      <dc:date>2020-12-22T06:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: KW38 BLE stack memory issue</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1207781#M10544</link>
      <description>&lt;P&gt;Hi, I hope you're doing well!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please take a look at the following Application Note for the KW3xA/Z?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;A href="https://www.nxp.com/docs/en/application-note/AN12600.pdf" target="_blank"&gt;Memory Pool Optimizer&lt;/A&gt; will help calculate the corresponding size and amount of blocks for the memory pools allocated at compile time of the application for these devices, to avoid possible memory pool issues like the one you seem to be experiencing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if you need any more information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Sebastián&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 22:37:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1207781#M10544</guid>
      <dc:creator>Sebastian_Del_Rio</dc:creator>
      <dc:date>2021-01-06T22:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: KW38 BLE stack memory issue</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1208213#M10547</link>
      <description>&lt;P&gt;Thank you for the response.&lt;/P&gt;&lt;P&gt;Yes, I had already gone through that document. Also I had tried to tune the memory pools in my app, but did not help. Anyhow, the problem I reported is on NXP BLE sample app on NXP KW38 freedom board. So, I request you to take a look at the reported problem (you may try to reproduce the issue as well) and provide a solution. On this issue, the BLE stack becomes non functional. System restart is the only recovery option in my experience. Kindly address it as a critical issue.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 10:06:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1208213#M10547</guid>
      <dc:creator>Nidhin</dc:creator>
      <dc:date>2021-01-07T10:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: KW38 BLE stack memory issue</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1208840#M10554</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/181601"&gt;@Nidhin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Using the&amp;nbsp;&lt;SPAN&gt;MEM_TRACKING define will add some software overhead and in this case, it is possible that the LL FW processing time for each ACL data packet to take more time than over the air transmission.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Did you tried to run the same test without the&amp;nbsp;MEM_TRACKING define?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Ovidiu&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 09:17:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1208840#M10554</guid>
      <dc:creator>ovidiu_usturoi</dc:creator>
      <dc:date>2021-01-08T09:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: KW38 BLE stack memory issue</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1211745#M10567</link>
      <description>&lt;P&gt;Thank you for the response.&lt;/P&gt;&lt;P&gt;Yes, I had done the same test with and without the MEM_TRACKING enabled for my custom application where I had the same problem (BLE stack not responding until a target restart). So I tried the same case on NXP sample application, with MEM_TRACKING enabled.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 11:56:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1211745#M10567</guid>
      <dc:creator>Nidhin</dc:creator>
      <dc:date>2021-01-14T11:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: KW38 BLE stack memory issue</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1211778#M10568</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/181601"&gt;@Nidhin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the confirmation. We will address this issue in the next release (@ mid of February).&lt;/P&gt;
&lt;P&gt;Until then, from my point of view, the best option is to increase the number of buffers. I'm expecting that at some point, you are receiving at the application level an internal error event with the status gBleOutOfMemory_c and the error source: gL2capRxPacket_c.&lt;/P&gt;
&lt;P&gt;When this error is occurring, please look into the&amp;nbsp;memTrack structure to see active buffers: pCaller and&amp;nbsp;requested_size in order to increase the buffer set accordingly.&lt;/P&gt;
&lt;P&gt;Below is the&amp;nbsp;BlockTracking_t structure where I highlighted the parameters under interest.&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;typedef PACKED_STRUCT BlockTracking_tag&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; void *blockAddr; /*Addr of Msg, note that this pointer is 4 bytes bigger than the addr in the pool has&amp;nbsp; the header of the msg is 4 bytes */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint16_t blockSize; /*Size of block in bytes.*/&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint16_t fragmentWaste; /*Size requested by allocator.*/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; void *allocAddr; /*Return address of last Alloc made */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; void *freeAddr; /*Return address of last Free made */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint16_t allocCounter; /*No of time this msg has been allocated */&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint16_t freeCounter; /*No of time this msg has been freed */&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; memTrackingStatus_t allocStatus; /*1 if currently allocated, 0 if currently free */&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint32_t timeStamp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; void *pCaller;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; uint16_t requested_size;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="3"&gt;} blockTracking_t;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I will keep you updated on the progress on our side.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ovidiu&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 13:52:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1211778#M10568</guid>
      <dc:creator>ovidiu_usturoi</dc:creator>
      <dc:date>2021-01-14T13:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: KW38 BLE stack memory issue</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1217906#M10605</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for the response.&lt;/P&gt;&lt;P&gt;Waiting for the February release.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 11:42:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1217906#M10605</guid>
      <dc:creator>Nidhin</dc:creator>
      <dc:date>2021-01-20T11:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: KW38 BLE stack memory issue</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1229945#M10747</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/181601"&gt;@Nidhin&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note that&amp;nbsp;t&lt;SPAN&gt;he MCUXpresso SDK 2.6.10 for KW37 Maintenance release 3 (MR3)&amp;nbsp; has been successfully deployed on the&amp;nbsp;&lt;/SPAN&gt;&lt;A class="link-titled" title="https://mcuxpresso.nxp.com/en/select" href="https://mcuxpresso.nxp.com/en/select" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer noopener noreferrer"&gt;https://mcuxpresso.nxp.com.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The fix for your reported issue has been integrated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ovidiu_usturoi_0-1613057600513.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/137060iF8870BCADDAC2031/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ovidiu_usturoi_0-1613057600513.png" alt="ovidiu_usturoi_0-1613057600513.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ovidiu&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 15:34:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-BLE-stack-memory-issue/m-p/1229945#M10747</guid>
      <dc:creator>ovidiu_usturoi</dc:creator>
      <dc:date>2021-02-11T15:34:55Z</dc:date>
    </item>
  </channel>
</rss>

