<?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: setting up a struct of absolute addressed pointers (to pointers) in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237017#M9489</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not just let the compiler and linker place your tables in EEPROM, instead of trying to force them to specific adresses? E.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG EEPROM_DATA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; float x[5];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; float y[5];&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG DEFAULT&lt;/P&gt;&lt;P&gt;in the prm-file's PLACEMENT-section:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; EEPROM_DATA INTO EEPROM;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Sten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Jun 2013 05:09:02 GMT</pubDate>
    <dc:creator>StenS</dc:creator>
    <dc:date>2013-06-25T05:09:02Z</dc:date>
    <item>
      <title>setting up a struct of absolute addressed pointers (to pointers)</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237016#M9488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I am working on the S12G processor (9s12g128 specificaly) and am going to be doing 2D and 3D table interpolations.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have my table interpolation function working by using structs:&lt;/P&gt;&lt;P&gt;typedef struct{&lt;BR /&gt;&amp;nbsp; float *X;&lt;BR /&gt;&amp;nbsp; float *Y;&amp;nbsp; &lt;BR /&gt;}Table2D;&lt;/P&gt;&lt;P&gt;typedef struct{&lt;BR /&gt;&amp;nbsp; float *X;&lt;BR /&gt;&amp;nbsp; float *Y;&lt;BR /&gt;&amp;nbsp; float *Table;&lt;BR /&gt;}Table3D; &lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to move my tables into absolute addresses in EEPROM so they can be reprogrammed on the fly&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a number of predefined tables, but their size and values will be flexible.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to structure my code thusly:&lt;/P&gt;&lt;P&gt;float x[5] = {3300, 3400, 3500, 3700, 4000} @ *some_address*&lt;/P&gt;&lt;P&gt;float y[5] = {2150, 1750, 1450, 1300, 1200}; @ *address continued from x*&lt;/P&gt;&lt;P&gt;float *x_pntr = x @ *defined address*&lt;/P&gt;&lt;P&gt;float *y_pntr = y @ *defined address*&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table2D SlipPower ={&lt;/P&gt;&lt;P&gt;&amp;nbsp; *x_pntr,&lt;/P&gt;&lt;P&gt;&amp;nbsp; *y_pntr&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so if the sized of the table chages, then the addresses of where x and y start can change, but the pointers to those addresses stay in the same place&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can still use the structures I created before so&lt;/P&gt;&lt;P&gt;temp = table-&amp;gt;X[index];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; an example from my interpolation funtion&lt;/P&gt;&lt;P&gt;still works&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338804"&gt;tables.h.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338804"&gt;control_gains.h.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338804"&gt;tables.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2013 19:44:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237016#M9488</guid>
      <dc:creator>ilya_r</dc:creator>
      <dc:date>2013-06-24T19:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a struct of absolute addressed pointers (to pointers)</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237017#M9489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not just let the compiler and linker place your tables in EEPROM, instead of trying to force them to specific adresses? E.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG EEPROM_DATA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; float x[5];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; float y[5];&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG DEFAULT&lt;/P&gt;&lt;P&gt;in the prm-file's PLACEMENT-section:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; EEPROM_DATA INTO EEPROM;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Sten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 05:09:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237017#M9489</guid>
      <dc:creator>StenS</dc:creator>
      <dc:date>2013-06-25T05:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a struct of absolute addressed pointers (to pointers)</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237018#M9490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sten,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason is the tables will need to vary in size:&lt;/P&gt;&lt;P&gt;if I start with a x[5], y[5] table then y[] starts at adress x+5, but if I need to reflash with a x[6] y[6] table then at adress x+5 is x[5], not y[1].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look at my code the interpolation functions measure the size of the table e.g. while(&amp;amp;x[x_size] &amp;lt; &amp;amp;y[0])&amp;nbsp; x_size++&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I am trying to set up a predefined location in memory that is a pointer to the start of x[] and another pointer to the start of y[] that will be reflashed with a new value if the size of the tables change.&amp;nbsp; If the size of a table changes then where y[] starts will shift as will every table that comes after.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 11:50:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237018#M9490</guid>
      <dc:creator>ilya_r</dc:creator>
      <dc:date>2013-06-25T11:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a struct of absolute addressed pointers (to pointers)</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237019#M9491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;If you look at my code the interpolation functions measure the size of the table e.g. while(&amp;amp;x[x_size] &amp;lt; &amp;amp;y[0])&amp;nbsp; x_size++&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IMO it is a bad trick producing not portable and not clean code, which depends on linking order and data alignment. &lt;/P&gt;&lt;P&gt;It is better to use sizeof() to determine size of an array.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp; for(x_size=1; &amp;amp;table-&amp;gt;X[x_size] &amp;lt; table-&amp;gt;Y; x_size++){}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* read size of table in x direction */&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This is not a smart at all. It wastes a lot of CPU cycles to determine size of array. Instead you should use sizeof(). Even if you want to export array declaration, which wil make sizeof() unable to determine size of array with undefined dimensions, you still can have something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// h-file&lt;/P&gt;&lt;P&gt;extern const int myarray[];&lt;/P&gt;&lt;P&gt;extern const unsigned int myarraysizeb;&lt;/P&gt;&lt;P&gt;extern const unsigned int myarraysize;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// c-file&lt;/P&gt;&lt;P&gt;const int myarray[] = {1,2,3,4};&lt;/P&gt;&lt;P&gt;const int myarraysizeb = sizeof(myarray); // size, bytes&lt;/P&gt;&lt;P&gt;const int myarraysize = sizeof(myarray)/sizeof(myarray[0]); // size, elements&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 05:47:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237019#M9491</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2013-06-26T05:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a struct of absolute addressed pointers (to pointers)</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237020#M9492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the suggestion, however:&lt;BR /&gt;1- I understand the way I have it coded is using more cycles to compute but I have the resourses to do it and I need to do it that way because:&lt;/P&gt;&lt;P&gt;2- when all said and done I will not be be creating tables in code, but will have pointers to where the tables start, which will run upto the start of the next table so that I can ISP a new tables into the EEPROM and adjust the starting addresses (based on table sizes) while the micro is still running&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will look something like this (not C compliant code, but to get the idea):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*table1_pnt @0x0400&lt;/P&gt;&lt;P&gt;*table2_pnt @0x4002&lt;/P&gt;&lt;P&gt;struct table2D{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; table1_pnt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; table2_pnt;&lt;/P&gt;&lt;P&gt;}table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for(size=1; &amp;amp;table-&amp;gt;(*table1_pntr)[size] &amp;lt; table-&amp;gt;(*table2_pnt);size++){}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* read size of table in x direction */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this example the table pointers are pointing to the start of the tables, and when I develope the table that will give me my table size so I can load the table and at the same time load the address into the pointer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 17:26:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237020#M9492</guid>
      <dc:creator>ilya_r</dc:creator>
      <dc:date>2013-06-26T17:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a struct of absolute addressed pointers (to pointers)</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237021#M9493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But you can ISP not only pointers and data, but also sizes of your data, isn't it. Maybe it's just micro or milliWatts*second, but still some CPU cycles and power waster. It is always better to use compile time constants instead of calculating the same at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately it is not trivial to make what you do portable, other targets will have different float sizes or struct / array alignment. In case of Codewarrior smartlinker you can rely on optimization out of unused variables to determine array size. Dummy arrays will be optimized out. Hope it will give you some ideas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define data1 {3300, 3400, 3500, 3700, 4000}&lt;BR /&gt;#define data2 {2150, 1750, 1450, 1300, 1200}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;float __dummy1[] = data1;&lt;BR /&gt;float __dummy2[] = data2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;const struct {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; float *t1ptr;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; float *t2ptr;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; int t1size;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; int t2size;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; float t1[sizeof(__dummy1)/sizeof(__dummy1[0])];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; float t2[sizeof(__dummy2)/sizeof(__dummy2[0])];&lt;BR /&gt;} mydata = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; mydata.t1, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; mydata.t2, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; sizeof(__dummy1)/sizeof(__dummy1[0]), &lt;BR /&gt;&amp;nbsp;&amp;nbsp; sizeof(__dummy2)/sizeof(__dummy2[0]), &lt;BR /&gt;&amp;nbsp;&amp;nbsp; data1, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; data2&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2013 09:33:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237021#M9493</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2013-06-27T09:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a struct of absolute addressed pointers (to pointers)</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237022#M9494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have modified the code for measuring the size of the table to speed up the process: &lt;/P&gt;&lt;P&gt;x_size = (&amp;amp;Y[0] - &amp;amp;X[0]) / sizeof(X[0];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However that still doesn't answer my original question, when trying:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;float Torque_x[13] @ 0x460 = {0, 250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000}; // Fan Speed&lt;/P&gt;&lt;P&gt;float Torque_y[13] @ 0x494 = {0,&amp;nbsp;&amp;nbsp; 2,&amp;nbsp;&amp;nbsp; 8,&amp;nbsp; 20,&amp;nbsp;&amp;nbsp; 35,&amp;nbsp;&amp;nbsp; 55,&amp;nbsp;&amp;nbsp; 79,&amp;nbsp; 108,&amp;nbsp; 140,&amp;nbsp; 177,&amp;nbsp; 220,&amp;nbsp; 265,&amp;nbsp; 317}; // Max Variable Fan Speed&lt;/P&gt;&lt;P&gt;void *T_x @ 0x426 = Torque_x;&lt;/P&gt;&lt;P&gt;void *T_y @ 0x428 = Torque_y;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2D TorqueCurve={&lt;/P&gt;&lt;P&gt;&amp;nbsp; (float*)*T_x,&lt;/P&gt;&lt;P&gt;&amp;nbsp; (float*)*T_y&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gives me C1806 errors (illegal cast operation) in the struct definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the proper way to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 13:36:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237022#M9494</guid>
      <dc:creator>ilya_r</dc:creator>
      <dc:date>2013-07-30T13:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a struct of absolute addressed pointers (to pointers)</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237023#M9495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;It's because of extra star here&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;(float*)&lt;STRONG style=": ; color: #ff0000;"&gt;*&lt;/STRONG&gt;T_x&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 14:56:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237023#M9495</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2013-07-30T14:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a struct of absolute addressed pointers (to pointers)</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237024#M9496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wish to take the value 0x460, put it into a variable and then typecast the variable as a float*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so: &lt;/P&gt;&lt;P&gt;float Torque_x[13] @ 0x460 = {0, 250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000}; // Fan Speed&lt;/P&gt;&lt;P&gt;float Torque_y[13] @ 0x494 = {0,&amp;nbsp;&amp;nbsp; 2,&amp;nbsp;&amp;nbsp; 8,&amp;nbsp; 20,&amp;nbsp;&amp;nbsp; 35,&amp;nbsp;&amp;nbsp; 55,&amp;nbsp;&amp;nbsp; 79,&amp;nbsp; 108,&amp;nbsp; 140,&amp;nbsp; 177,&amp;nbsp; 220,&amp;nbsp; 265,&amp;nbsp; 317}; // Max Variable Fan Speed&lt;/P&gt;&lt;P&gt;variable X @ 0x426 = &amp;amp;Torque_x[0];&lt;/P&gt;&lt;P&gt;variable Y@ 0x428 = &amp;amp;Torque_y[0];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2D TorqueCurve={&lt;/P&gt;&lt;P&gt;&amp;nbsp; (float*) X,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // float* to address 0x460&lt;/P&gt;&lt;P&gt;&amp;nbsp; (float*) Y&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // float* to address 0x494&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 17:51:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237024#M9496</guid>
      <dc:creator>ilya_r</dc:creator>
      <dc:date>2013-07-30T17:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a struct of absolute addressed pointers (to pointers)</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237025#M9497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So why don't you &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;float Torque_x[13] @ 0x460 = {0, 250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000}; // Fan Speed&lt;/P&gt;&lt;P&gt;float Torque_y[13] @ 0x494 = {0, 2, 8, 20, 35, 55, 79, 108, 140, 177, 220, 265, 317}; // Max Variable Fan Speed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2D TorqueCurve={&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;amp;Torque_x[0],&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;amp;Torque_y[0]&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2013 09:26:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237025#M9497</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2013-07-31T09:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: setting up a struct of absolute addressed pointers (to pointers)</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237026#M9498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, I was already doing that, but your comment helped me realize that I can locate the Tabel2D structure at the address I need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;float Torque_x[13] @ 0x460 = {0, 250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000}; // Fan Speed&lt;/P&gt;&lt;P&gt;float Torque_y[13] @ 0x494 = {0, 2, 8, 20, 35, 55, 79, 108, 140, 177, 220, 265, 317}; // Max Variable Fan Speed &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2D TorqueCurve @ 0x422 ={ &lt;/P&gt;&lt;P&gt;&amp;nbsp; Torque_x,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Torque_y&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2013 12:16:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/setting-up-a-struct-of-absolute-addressed-pointers-to-pointers/m-p/237026#M9498</guid>
      <dc:creator>ilya_r</dc:creator>
      <dc:date>2013-07-31T12:16:16Z</dc:date>
    </item>
  </channel>
</rss>

