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.

TMS320F28027: Memory Allocation problem: the printed array does not change

Part Number: TMS320F28027

Hi Team,

Here‘s an issue from the customer may need your help:

Fullscreen
1
2
3
4
5
6
7
8
#pragma DATA_SECTION (Spwm_Vo_Val1,"scidata");
uint16_t print_cnt = 0;
int16 Spwm_Vo_Val1[400]={0};
printf("\r\nLI %d",Spwm_Vo_Val1[print_cnt]);
print_cnt=(print_cnt+1)%400;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The printed data is always the same. In fact, if Spwm_Vo_Val1 is not be directed to the scidata segment, the printed data will change.

The print result is LI 1.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
// TI File $Revision: /main/7 $
// Checkin $Date: July 6, 2009 17:25:36 $
//###########################################################################
//
// FILE: F28027.cmd
//
// TITLE: Linker Command File For F28027 Device
//
//###########################################################################
// $TI Release: 2802x C/C++ Header Files and Peripheral Examples V1.29 $
// $Release Date: January 11, 2011 $
//###########################################################################
*/
/* ======================================================
// For Code Composer Studio V2.2 and later
// ---------------------------------------
// In addition to this memory linker command file,
// add the header linker command file directly to the project.
// The header linker command file is required to link the
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thanks & Regards

Yale Li