Other Parts Discussed in Thread: C2000WARE
Tool/software:
Hi Team,
As my code size increased, the memory bank .sysmem : > RAMLS5
got exhausted. So, I changed the initial setting from .data : > RAMLS5
to .data : > RAMLS6
.
After this change, the function call:
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
started hitting the __error__()
handler:
void __error__(const char *filename, uint32_t line)
{
// ASSERT condition failed. Use filename and line to debug.
ESTOP0;
}
What could be the root cause of this issue, and how can I resolve it?
Added initial error snip below .
After changing .data
Another strange point is I also tried with increase the length of RAMLS5 , from length = 0x000800 to length = 0x001800, It started working . But when I add more buffers as my application need, then it again started going into
__error__()
handler:
I did some more debugging and found from device_init() function call of driverlib of C2000 sdk into Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES) call .
Then it should go into function definition inside flash.c but It is going some commented line // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR in line no 31 in flash.c .
After continuous step in in debugger I again found It is going into error from ASSERT(EPWM_isBaseValid(base)); from function call
EPWM_setCounterCompareValue(uint32_t base, EPWM_CounterCompareModule compModule,
uint16_t compCount).
But same function is working when I am using single phase with single buffer [256]. I am really what exactly going wrong .
I badly need expert help .