TMS320F28P550SJ: Global array initialization

Part Number: TMS320F28P550SJ

Hello,

I encountered an issue during development with the TMS320F28P550SJ9 and would like to ask for your advice on how to resolve it. Thank you.

Issue Description

After upgrading the firmware using the bootloader function, the application jumps back to the APP through a watchdog reset. At that point, the initial value of a global array becomes abnormal.

1. When the array is declared like this:

 
INT16U wLineADBuffer[cLineADBufferSize] = {0};
 

Only the first element of wLineADBuffer is read as 0, while all the other array elements are non-zero.


2. However, when I change the declaration to:

 
INT16U wLineADBuffer[cLineADBufferSize] =
{
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0
};

all elements of wLineADBuffer are correctly initialized to 0.


This issue does not occur during a cold power-on reset.

It seems that the first declaration ({0}) uses a “compact initialization record” mechanism, while the explicit 32-element initializer uses a “full image initialization” mechanism.

If I still want to declare the array using the first style:

INT16U wLineADBuffer[cLineADBufferSize] = {0};

is there any way to avoid the issue where the array is not fully initialized to zero after startup?