<?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 Shared / configurable memory pool for Recorders in FreeMASTER</title>
    <link>https://community.nxp.com/t5/FreeMASTER/Shared-configurable-memory-pool-for-Recorders/m-p/1313135#M663</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have 3 recorders configured in my application, one on the main loop and the other 2 hooked to base tick generator under interrupt.&lt;/P&gt;&lt;P&gt;Now, when recorders are configured I need to figure out how much memory I need to provide each, through "FMSTR_REC_BUFF" and "FMSTR_RecorderCreate()"&lt;/P&gt;&lt;P&gt;That's a bit limiting. I was thinking to a shared space, let's say 2KB just to have a number in mind. This memory pool is given to all recorders and a default segment is assigned to each, not overlapping.&lt;/P&gt;&lt;P&gt;Let's say 3 recorder, the memory pool is divided into 512+512+1K. This setup is the same as we get with current solution.&lt;/P&gt;&lt;P&gt;But I would like to pass to recorder, not only their addr/size, but also the pool addr/size. The recorder segment falls inside the pool.&lt;/P&gt;&lt;P&gt;On PC-size I would like to be able to re-assign segments. Let's say I need to enlarge the 2nd from 512 to 1K. The following recorder can be collapsed (automatically for example) to 512 to get the new setup of 512+1K+512. Or the tool can ask the user to assign al of them according to available space.&lt;/P&gt;&lt;P&gt;That's the concept. To summarize&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;assign a shared memory pool to all recorders&lt;/LI&gt;&lt;LI&gt;pre-configure a segment from the pool to each of them (so we get same setup as now)&lt;/LI&gt;&lt;LI&gt;Let PC-side freemaster change segmentation to increase/decrease recorders buffer according to user selection&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This feature boosts a lot the system flexibility with small FW impact (we need one addr/size couple more on recorders and of course messages to re-configure them)&lt;/P&gt;&lt;P&gt;Re-configuring a recorder memory pool causes its data to be discarded, of course (at least as first approx).&lt;/P&gt;&lt;P&gt;What do you think? Is that possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a tons for this great tool!&lt;BR /&gt;Fabrizio&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jul 2021 09:14:47 GMT</pubDate>
    <dc:creator>FabrizioDaRos</dc:creator>
    <dc:date>2021-07-26T09:14:47Z</dc:date>
    <item>
      <title>Shared / configurable memory pool for Recorders</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Shared-configurable-memory-pool-for-Recorders/m-p/1313135#M663</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have 3 recorders configured in my application, one on the main loop and the other 2 hooked to base tick generator under interrupt.&lt;/P&gt;&lt;P&gt;Now, when recorders are configured I need to figure out how much memory I need to provide each, through "FMSTR_REC_BUFF" and "FMSTR_RecorderCreate()"&lt;/P&gt;&lt;P&gt;That's a bit limiting. I was thinking to a shared space, let's say 2KB just to have a number in mind. This memory pool is given to all recorders and a default segment is assigned to each, not overlapping.&lt;/P&gt;&lt;P&gt;Let's say 3 recorder, the memory pool is divided into 512+512+1K. This setup is the same as we get with current solution.&lt;/P&gt;&lt;P&gt;But I would like to pass to recorder, not only their addr/size, but also the pool addr/size. The recorder segment falls inside the pool.&lt;/P&gt;&lt;P&gt;On PC-size I would like to be able to re-assign segments. Let's say I need to enlarge the 2nd from 512 to 1K. The following recorder can be collapsed (automatically for example) to 512 to get the new setup of 512+1K+512. Or the tool can ask the user to assign al of them according to available space.&lt;/P&gt;&lt;P&gt;That's the concept. To summarize&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;assign a shared memory pool to all recorders&lt;/LI&gt;&lt;LI&gt;pre-configure a segment from the pool to each of them (so we get same setup as now)&lt;/LI&gt;&lt;LI&gt;Let PC-side freemaster change segmentation to increase/decrease recorders buffer according to user selection&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This feature boosts a lot the system flexibility with small FW impact (we need one addr/size couple more on recorders and of course messages to re-configure them)&lt;/P&gt;&lt;P&gt;Re-configuring a recorder memory pool causes its data to be discarded, of course (at least as first approx).&lt;/P&gt;&lt;P&gt;What do you think? Is that possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a tons for this great tool!&lt;BR /&gt;Fabrizio&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 09:14:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Shared-configurable-memory-pool-for-Recorders/m-p/1313135#M663</guid>
      <dc:creator>FabrizioDaRos</dc:creator>
      <dc:date>2021-07-26T09:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Shared / configurable memory pool for Recorders</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Shared-configurable-memory-pool-for-Recorders/m-p/1313182#M666</link>
      <description>&lt;P&gt;Dear Fabrizio,&lt;/P&gt;
&lt;P&gt;I don't think we would go for such a complex change. If I understand your scenario well, you need three different recorders (each sampled in different point in time), but you do not want to waste a memory for each.&lt;/P&gt;
&lt;P&gt;If you can make sure the recorders would &lt;STRONG&gt;never&lt;/STRONG&gt; run simultaneously, I have two different proposals how to handle this situation:&lt;/P&gt;
&lt;P&gt;Scenario A:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Have just one recorder configured in the application and add one global variable named e.g. "selected_recorder".&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Replace FMSTR_Recorder(0), (1) and (2) with conditional calls like:&lt;BR /&gt;if(selected_recorder == 0)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; FMSTR_Recorder(0)&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;The other sample places would test values 1 and 2, but would also call FMSTR_Recorder(0)&lt;/LI&gt;
&lt;LI&gt;You can add the selected_recorder variable to FreeMASTER Watch and control the behavior easily.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Scenario B:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Use FMSTR_RecorderCreate to create all 3 recorders using the same address and size of the buffer.&lt;/LI&gt;
&lt;LI&gt;The FreeMASTER does full re-initialization of the recorder when you click a it in the FreeMASTER, so unless you would use two recorders simultaneously, you are safe.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Michal&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 11:19:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Shared-configurable-memory-pool-for-Recorders/m-p/1313182#M666</guid>
      <dc:creator>MichalH</dc:creator>
      <dc:date>2021-07-26T11:19:03Z</dc:date>
    </item>
  </channel>
</rss>

