<?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: global array is altered when CAN API initialization occurs in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521856#M4492</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by christianhdz on Mon Aug 17 10:52:26 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the CCAN_ROM example included in lpcopen_v2_00a_lpcxpresso_nxp_lpcxpresso_11c24.zip&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to use the suggested macro call as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;int main(void)
{

uint32_t CanApiClkInitTable[2];
/* Publish CAN Callback Functions */
CCAN_CALLBACKS_T callbacks = {
CAN_rx,
CAN_tx,
CAN_error,
NULL,
NULL,
NULL,
NULL,
NULL,
};

//reserve CAN ROM-RAM 0x1000 0050 - 0x1000 00B9
[color=#66f]__BSS(RESERVED) char CAN_driver_memory[0xC0];[/color]

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SystemCoreClockUpdate();
Board_Init();

/* Enable and setup SysTick Timer at a periodic rate */
SysTick_Config(SystemCoreClock/ TICKRATE_HZ1);

baudrateCalculate(TEST_CCAN_BAUD_RATE, CanApiClkInitTable);

LPC_CCAN_API-&amp;gt;init_can(&amp;amp;CanApiClkInitTable[0], TRUE);
/* Configure the CAN callback functions */
LPC_CCAN_API-&amp;gt;config_calb(&amp;amp;callbacks);
/* Enable the CAN Interrupt */
NVIC_EnableIRQ(CAN_IRQn);


&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I get a bunch of errors with the addition of that line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[list]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [*]&lt;/SPAN&gt;&lt;STRONG&gt;'RESERVED'&lt;/STRONG&gt;&lt;SPAN&gt; undeclared (first use in this function)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [*]&lt;/SPAN&gt;&lt;STRONG&gt;expected ';' before 'char'&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [*]make: *** [example/src/ccan_romIGNSWITCH.o] Error 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [*]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/list]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something I am missing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your support&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:38:48 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:38:48Z</dc:date>
    <item>
      <title>global array is altered when CAN API initialization occurs</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521851#M4487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by christianhdz on Tue Aug 11 14:50:17 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an array of 256 bytes that is being modified when LPC_CCAN_API-&amp;gt;init_can(&amp;amp;CanApiClkInitTable[0], TRUE) is executed. I don't want this array to be modified, I already initialized it after&amp;nbsp; the&amp;nbsp; Private types/enumerations/variables &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;#define TICKRATE_HZ1 (100) /* 1/TickRate_HZ = PERIOD MS, 20 ms */

#define TEST_CCAN_BAUD_RATE 500000

CCAN_MSG_OBJ_T msg_obj;

[color=#66f]uint8_t crc8table[256] = {
&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00, 0x1D, 0x3A, 0x27, 0x74, 0x69, 0x4E, 0x53,
&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xE8, 0xF5, 0xD2, 0xCF, 0x9C, 0x81, 0xA6, 0xBB,
&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xCD, 0xD0, 0xF7, 0xEA, 0xB9, 0xA4, 0x83, 0x9E,
&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x25, 0x38, 0x1F, 0x02, 0x51, 0x4C, 0x6B, 0x76,
...}; 
[/color]&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;When I debug the program I observe that some of the values of my array are modified i.e. crc8table[0x6A], it is changed to ZERO. Other array elements are also changed to zero.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I observe that it happens when line LPC_CCAN_API-&amp;gt;init_can(&amp;amp;CanApiClkInitTable[0], TRUE); is executed&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
int main(void)
{

uint32_t CanApiClkInitTable[2];
/* Publish CAN Callback Functions */
CCAN_CALLBACKS_T callbacks = {
CAN_rx,
CAN_tx,
CAN_error,
NULL,
NULL,
NULL,
NULL,
NULL,
};
SystemCoreClockUpdate();
Board_Init();

/* Enable and setup SysTick Timer at a periodic rate */
SysTick_Config(SystemCoreClock/ TICKRATE_HZ1);


baudrateCalculate(TEST_CCAN_BAUD_RATE, CanApiClkInitTable);

&lt;STRONG&gt;[color=#f00]LPC_CCAN_API-&amp;gt;init_can(&amp;amp;CanApiClkInitTable[0], TRUE);[/color]&lt;/STRONG&gt;
/* Configure the CAN callback functions */
LPC_CCAN_API-&amp;gt;config_calb(&amp;amp;callbacks);
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try restoring the values of the array to the original value, then I get a HARD_FAULT_HANDLER call.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea why this is happening and how to avoid it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using an LPC11C24 board, using lpcxpresso 7.9 and I based my program in the CCAN_ROM example from LPC_OPEN example.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:38:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521851#M4487</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: global array is altered when CAN API initialization occurs</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521852#M4488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Tue Aug 11 16:27:14 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: christianhdz&lt;/STRONG&gt;&lt;BR /&gt;Any idea why this is happening and how to avoid it?&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;static uint8_t crc8table[256] = ...
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:38:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521852#M4488</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: global array is altered when CAN API initialization occurs</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521853#M4489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DF9DQ on Wed Aug 12 01:19:45 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Could it be that the array occupies the RAM region that should have been reserved for use by the CAN ROM drivers?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Quoting the user manual:&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;On-chip RAM from address 0x1000 0050 to 0x1000 00B8 is used by the CAN API. This address range should not be used by the application. For applications using the on-chip CAN API, the linker control file should be modified appropriately to prevent usage of this area for application’s variable storage.&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:38:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521853#M4489</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: global array is altered when CAN API initialization occurs</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521854#M4490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by christianhdz on Thu Aug 13 14:38:42 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the "static" modification but the ARRAY is still modified.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See the attached pictures before and after the execution of line where CAN is initialized.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[color=#f0f]LPC_CCAN_API-&amp;gt;init_can(&amp;amp;CanApiClkInitTable[0], TRUE);[/color]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the attached show the example where crc8table[0x6B]=0x5B, and then it is modified (unintentedly) to&amp;nbsp; crc8table[0x6B]=0x00 (highlighted in yellow in the expressions window).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:38:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521854#M4490</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: global array is altered when CAN API initialization occurs</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521855#M4491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Thu Aug 13 14:54:41 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: christianhdz&lt;/STRONG&gt;&lt;BR /&gt;I used the "static" modification but the ARRAY is still modified.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure which sample you are using in detail, so it could be useful to post it&amp;nbsp; &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Either you didn't reserve CAN RAM as described in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fhow-to-reserve-lpc11cxx-ram" rel="nofollow noopener noreferrer" target="_blank"&gt;https://www.lpcware.com/content/forum/how-to-reserve-lpc11cxx-ram&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or your linker is removing your unused array as explained in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fembeddedfreak.wordpress.com%2F2009%2F02%2F10%2Fremoving-unused-functionsdead-codes-with-gccgnu-ld%2F" rel="nofollow noopener noreferrer" target="_blank"&gt;https://embeddedfreak.wordpress.com/2009/02/10/removing-unused-functionsdead-codes-with-gccgnu-ld/&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since your array is stored in 0x1000 006B that's the RAM area which should be reserved for CAN API&amp;nbsp; &lt;SPAN class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;&lt;LI-EMOJI id="lia_face-with-open-mouth" title=":face_with_open_mouth:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So adding a simple:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;//reserve CAN ROM-RAM 0x1000 0050 - 0x1000 00B9
__BSS(RESERVED) char CAN_driver_memory[0xC0];
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;should solve your problem&amp;nbsp; &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:38:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521855#M4491</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: global array is altered when CAN API initialization occurs</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521856#M4492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by christianhdz on Mon Aug 17 10:52:26 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the CCAN_ROM example included in lpcopen_v2_00a_lpcxpresso_nxp_lpcxpresso_11c24.zip&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to use the suggested macro call as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;int main(void)
{

uint32_t CanApiClkInitTable[2];
/* Publish CAN Callback Functions */
CCAN_CALLBACKS_T callbacks = {
CAN_rx,
CAN_tx,
CAN_error,
NULL,
NULL,
NULL,
NULL,
NULL,
};

//reserve CAN ROM-RAM 0x1000 0050 - 0x1000 00B9
[color=#66f]__BSS(RESERVED) char CAN_driver_memory[0xC0];[/color]

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SystemCoreClockUpdate();
Board_Init();

/* Enable and setup SysTick Timer at a periodic rate */
SysTick_Config(SystemCoreClock/ TICKRATE_HZ1);

baudrateCalculate(TEST_CCAN_BAUD_RATE, CanApiClkInitTable);

LPC_CCAN_API-&amp;gt;init_can(&amp;amp;CanApiClkInitTable[0], TRUE);
/* Configure the CAN callback functions */
LPC_CCAN_API-&amp;gt;config_calb(&amp;amp;callbacks);
/* Enable the CAN Interrupt */
NVIC_EnableIRQ(CAN_IRQn);


&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I get a bunch of errors with the addition of that line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[list]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [*]&lt;/SPAN&gt;&lt;STRONG&gt;'RESERVED'&lt;/STRONG&gt;&lt;SPAN&gt; undeclared (first use in this function)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [*]&lt;/SPAN&gt;&lt;STRONG&gt;expected ';' before 'char'&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [*]make: *** [example/src/ccan_romIGNSWITCH.o] Error 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [*]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/list]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something I am missing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your support&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:38:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521856#M4492</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: global array is altered when CAN API initialization occurs</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521857#M4493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Mon Aug 17 11:27:08 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: christianhdz&lt;/STRONG&gt;&lt;BR /&gt;Is there something I am missing?&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, section macros&amp;nbsp; &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#include "board.h"
[color=#f00]#include "cr_section_macros.h"[/color]

/*****************************************************************************
 * Private types/enumerations/variables
 ****************************************************************************/

#define TEST_CCAN_BAUD_RATE 500000
[color=#f00]
//reserve CAN ROM-RAM 0x1000 0050 - 0x1000 00B9
__BSS(RESERVED) char CAN_driver_memory[0xC0];
[/color]
CCAN_MSG_OBJ_T msg_obj;
...
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:38:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521857#M4493</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: global array is altered when CAN API initialization occurs</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521858#M4494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by christianhdz on Mon Aug 17 13:44:04 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Indeed! Thanks! This solved the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#include "board.h"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#include "cr_section_macros.h"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/*****************************************************************************&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; * Private types/enumerations/variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ****************************************************************************/&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#define TEST_CCAN_BAUD_RATE 500000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//reserve CAN ROM-RAM 0x1000 0050 - 0x1000 00B9&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__BSS(RESERVED) char CAN_driver_memory[0xC0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CCAN_MSG_OBJ_T msg_obj;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:38:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/global-array-is-altered-when-CAN-API-initialization-occurs/m-p/521858#M4494</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:38:50Z</dc:date>
    </item>
  </channel>
</rss>

