<?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>LPC Microcontrollers中的主题 Re: Memory corruption on calling init_can</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Memory-corruption-on-calling-init-can/m-p/2114791#M58367</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/251425"&gt;@rkemp&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;In order to support you better, could you please provide the following details?&lt;/P&gt;
&lt;P&gt;-Which IDE are you currently using?&lt;/P&gt;
&lt;P&gt;-Regarding your comment "it writes to a memory location I wouldn't expect":&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; What memory location were you expecting?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Where is the data actually being written?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; What values did you expect to be written?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; What values are currently being written instead?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;-When you run the example without any modifications, do you see any output?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;BR&lt;BR /&gt;Habib&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jun 2025 22:44:08 GMT</pubDate>
    <dc:creator>Habib_MS</dc:creator>
    <dc:date>2025-06-11T22:44:08Z</dc:date>
    <item>
      <title>Memory corruption on calling init_can</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Memory-corruption-on-calling-init-can/m-p/2113561#M58346</link>
      <description>&lt;P&gt;I'm using an LPC11C14 and have a problem where if I call init_can it writes to a memory location I wouldn't expect.&lt;/P&gt;&lt;P&gt;I can reproduce this in the sample ccan_rom and have attached the c file which shows this.&lt;/P&gt;&lt;P&gt;( i changed the targets to 11C14 when running this).&lt;/P&gt;&lt;P&gt;In this file&amp;nbsp;I added a global 256 byte buffer, memset it to 0 and can see that calling init_can writes to bytes 105 and 106 of my array.&lt;/P&gt;&lt;P&gt;Any help would be very much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 10:51:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Memory-corruption-on-calling-init-can/m-p/2113561#M58346</guid>
      <dc:creator>rkemp</dc:creator>
      <dc:date>2025-06-10T10:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Memory corruption on calling init_can</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Memory-corruption-on-calling-init-can/m-p/2114791#M58367</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/251425"&gt;@rkemp&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;In order to support you better, could you please provide the following details?&lt;/P&gt;
&lt;P&gt;-Which IDE are you currently using?&lt;/P&gt;
&lt;P&gt;-Regarding your comment "it writes to a memory location I wouldn't expect":&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; What memory location were you expecting?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Where is the data actually being written?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; What values did you expect to be written?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; What values are currently being written instead?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;-When you run the example without any modifications, do you see any output?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;BR&lt;BR /&gt;Habib&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 22:44:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Memory-corruption-on-calling-init-can/m-p/2114791#M58367</guid>
      <dc:creator>Habib_MS</dc:creator>
      <dc:date>2025-06-11T22:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Memory corruption on calling init_can</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Memory-corruption-on-calling-init-can/m-p/2115185#M58370</link>
      <description>&lt;P&gt;MCUXpresso 24.12&lt;/P&gt;&lt;P&gt;I wouldn't expect a call to can_init to write to any of the heap memory.&lt;/P&gt;&lt;P&gt;As I mentioned, data (0xff) is being written to bytes 105 and 106 of the temp array. This is not the behaviour i would expect when initialising the can interface. I expect no writes to the temp array other than the memset that initialises it all to 0's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run the example without modifications it behaves as expected. I get a can message being sent, and I can receive can messages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An interesting note, running the example without modifications, calling init_can writes to the same memory locations as when I add my temp array (using the LPC link 2 to debug).&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2025 08:16:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Memory-corruption-on-calling-init-can/m-p/2115185#M58370</guid>
      <dc:creator>rkemp</dc:creator>
      <dc:date>2025-06-12T08:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Memory corruption on calling init_can</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Memory-corruption-on-calling-init-can/m-p/2117122#M58378</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/251425"&gt;@rkemp&lt;/a&gt;,&lt;BR /&gt;In the chapter 17.4.1 called "Calling the C_CAN API" in the RM, the following is mentioned:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"On-chip RAM from address 0x1000 0050 to 0x1000 00B8 is used by the CAN API. This address &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;range should not be used by the application. For applications using the on-chip CAN API, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;the linker control file should be modified appropriately to prevent usage of this area for &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;application’s variable storage."&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;It could explain that is currently writing in your buffer, please make sure that your buffer is not in this RAM area.&amp;nbsp;&lt;BR /&gt;BR&lt;BR /&gt;Habib&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 17:48:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Memory-corruption-on-calling-init-can/m-p/2117122#M58378</guid>
      <dc:creator>Habib_MS</dc:creator>
      <dc:date>2025-06-16T17:48:23Z</dc:date>
    </item>
  </channel>
</rss>

