Tool/software: TI C/C++ Compiler
Hello!
I have the following code in my project:
const uint8_t A3InitSub[] =
{
SQ_CFLOAT(5000 * 4),
SQ_CHW(2, 2), // Freq
SQ_CFLOAT(2000 * 4),
SQ_CHW(2, 3), // Start freq
SQ_CLEAR,
SQ_CONST_B(0, 0, 4, 0x01), // Mask
SQ_CONST_B(0, 4, 4, 0x00), // Sens
SQ_CMD(2, 1), // Stop mode
SQ_CLEAR,
SQ_CONST_D(0, 100), // Steps forward
SQ_CMD(2, 0), // Run
SQ_WAIT(2),
SQ_CLEAR,
SQ_CONST_B(0, 0, 4, 0x01), // Mask
SQ_CONST_B(0, 4, 4, 0x01), // Sens
SQ_CMD(2, 1), // Stop mode
SQ_CLEAR,
SQ_CONST_D(0, -10000), // Steps backward
SQ_CMD(2, 0), // Run
SQ_WAIT(2),
SQ_CLEAR,
SQ_CMD(2, 3), // Reset position
SQ_END
};
const uint8_t A3InitSequence[] =
{
SQ_SUB(AS2_INIT), // AS2 Init
SQ_SUB(AS3_INIT0), // AS3 Init
SQ_END
};
const uint8_t A3GoSequence[] =
{
SQ_SUB(AS2_INIT), // AS3 Init
SQ_SUB(AS3_INIT0), // AS3 Init
SQ_CLEAR,
SQ_CONST_B(6, 0, 0, 0x01), // Hold forever
SQ_CONST_D(2, 1), // Enable hold
SQ_CMD(2, 1), // Stop mode
SQ_PARAM_D(0, 2), // Target position
SQ_CMD(2, 0), // Run
SQ_WAIT(2),
SQ_SUB(AS2_GO), // Go on AS2
SQ_END
};
const uint8_t A3UpSequence[] =
{
SQ_SUB(AS2_UP), // Up on AS2
SQ_CLEAR,
SQ_CMD(2, 1), // Stop mode
SQ_CMD(2, 2), // Stop
SQ_END
};
All the initialization values are constant and compile time. But when I stop in debugger I see the following information:
A3InitSub : 0x20006D8D
A3InitSequence : 0x0002C65D
A3GoSequence: 0x0002C55A
A3UpSequence: 0x0002CDA2
So, first array is allocated in RAM, others in FLASH.
Why this could happend?