<?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>LPCXpresso IDEのトピックRe: Arrays in struct</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753634#M33210</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried malloc() and it doesnt work, same error as before, and tthe thing is that this code worked before in another microcontroller.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2018 09:14:32 GMT</pubDate>
    <dc:creator>andergoyaaguirr</dc:creator>
    <dc:date>2018-03-15T09:14:32Z</dc:date>
    <item>
      <title>Arrays in struct</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753630#M33206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i am new with lpc1549 in the om13056 board. I am using it for one of my master's project and i am having few problems.&lt;/P&gt;&lt;P&gt;In some part i am calculating a controller and for that i new some values,&amp;nbsp;i took this part froma bigger code and it works in another microcontroller but apparently not with this one.&lt;/P&gt;&lt;P&gt;this is the part:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;typedef struct{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;uint16_t KP[4];&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;uint16_t KI[4];&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;uint16_t KD[4];&lt;BR /&gt;}Regelparameter_t;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for(i=0; i&amp;lt;4; i++)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;Regelparameter_ptr-&amp;gt;KP[i] = 0x0064;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;Regelparameter_ptr-&amp;gt;KI[i] = 0x0064;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;Regelparameter_ptr-&amp;gt;KD[i] = 0x0064;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The code&amp;nbsp;is okay but whenthe program start to run there is an error and it jumps to this part:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;__attribute__ ((section(".after_vectors")))&lt;BR /&gt;void HardFault_Handler(void)&lt;BR /&gt;{ while(1) {}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no idea to fix this because if i change this struct it will need to change everything and acording to my project i cant do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2018 10:32:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753630#M33206</guid>
      <dc:creator>andergoyaaguirr</dc:creator>
      <dc:date>2018-03-13T10:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in struct</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753631#M33207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you set up &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Regelparameter_ptr? what is its value? My guess is that you have not set the pointer correctly.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2018 08:48:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753631#M33207</guid>
      <dc:creator>thefallguy</dc:creator>
      <dc:date>2018-03-14T08:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in struct</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753632#M33208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, it is a big code and i did not wanted to write everything, Regelparameter_ptr was defined, that is not the problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;volatile Regelparameter_t *Regelparameter_ptr;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is that the very same exact lines worked for an ATmega microcontroller and thaat here it doesnt work. belive me the code should work but it doesnt and the problem is in the for loop or KP, KI and KD definitions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2018 08:55:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753632#M33208</guid>
      <dc:creator>andergoyaaguirr</dc:creator>
      <dc:date>2018-03-14T08:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in struct</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753633#M33209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You've defined it, but what have you initialised the pointer to? Have you used malloc() or something?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2018 17:08:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753633#M33209</guid>
      <dc:creator>thefallguy</dc:creator>
      <dc:date>2018-03-14T17:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in struct</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753634#M33210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried malloc() and it doesnt work, same error as before, and tthe thing is that this code worked before in another microcontroller.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 09:14:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753634#M33210</guid>
      <dc:creator>andergoyaaguirr</dc:creator>
      <dc:date>2018-03-15T09:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays in struct</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753635#M33211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just because it works on another (8-bit?) micro controller does not mean it is going to work on a different 32-bit micro-controller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, it looks like you are going to have to debug it then... But, my guess is that you have not correctly allocated memory for your Regeparameter_ptr. Start by looking at its value, just before you start using it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 17:59:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Arrays-in-struct/m-p/753635#M33211</guid>
      <dc:creator>thefallguy</dc:creator>
      <dc:date>2018-03-15T17:59:50Z</dc:date>
    </item>
  </channel>
</rss>

