Other Parts Discussed in Thread: C2000WARE
I’m encountering an issue with my F2837xD microcontroller project in Code Composer Studio (CCS). Specifically, I’ve noticed that variables in the stack are not updating after calling the Device_cal() function.
I'm testing this with a variable I call "temp" placed before and after Device_cal(). The variable is only updated prior to Device_cal() but not after this function is called. The variable is located in the stack RAMM1 memory location.
test++;
#ifndef _FLASH
//
// Call Device_cal function when run using debugger
// This function is called as part of the Boot code. The function is called
// in the InitSysCtrl function since during debug time resets, the boot code
// will not be executed and the gel script will reinitialize all the
// registers and the calibrated values will be lost.
Device_cal();
test++;
#endif
I'm using C2000Ware 3.2.0.00 and Device_cal() is defined in F2837xD_Examples.h as the following:
#define Device_cal ((void (*)(void))((uintptr_t)0x070282))
I step through the assembly and it steps through with no issues and returns out of Device_cal() with no visible issues. The SP remains at 0x0456 during before and after Device_cal() is called.
If I comment out Device_cal, my variable temp can be updated. I would like to keep this function in the code as it seems standard to all ti examples. Do you have any suggestions on how to debug the fact that I can't write to a variabel on the stack after Device_cal() is executed?