This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

memcpy causes FaultISR

Other Parts Discussed in Thread: TM4C1294KCPDT

hello,

this litlle code causes a FaultISR calling memcpy().

I'm using CCS6, TM4C1294KCPDT, Compilerversion TI v5.2.6, TivaWare_C_Series-2.1.1.71.

Any idea ? (with another data structure memcpy works correct...)

For me, this looks like an error in the library or compiler/linker.

Thanks !

 

// This is part of revision 2.1.0.12573 of the DK-TM4C129X Firmware Package.
//
//*****************************************************************************

#include <stdbool.h>
#include <stdint.h>
#include <string.h>

#include "driverlib/rom.h"
#include "driverlib/rom_map.h"
#include "driverlib/sysctl.h"

typedef struct _decl_data_value_ain
{
    long value;
    unsigned char error;
    unsigned char res[3];

} decl_data_value_ain;

// global defined data arrays

decl_data_value_ain g_Buffer1, *g_pBuffer1;
decl_data_value_ain g_Buffer2, *g_pBuffer2;

int main(void)
{
    MAP_SysCtlMOSCConfigSet(SYSCTL_MOSC_HIGHFREQ);

    MAP_SysCtlClockFreqSet(( SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000);

    memcpy( g_pBuffer1, g_pBuffer2, sizeof(decl_data_value_ain));
}