Hi all,
I used -O3 to optimized attached project, it will cause a exception as below:
External exception happened. MEXPFLAG[3]=0x4000000.
Event 122: DMC_CMPA CPU memory protection fault for L1D (and other memory read finally goes through the L1D controller)
memory protection exception caused by local access at 0x10
Supervisor Read violation
NRP=0xc00684c, NTSR=0x1000e, IRP=0x0, ITSR=0x0, TSCH= 0x2, TSCL= 0x41f23e57
B3=0xa, A4=0x0, B4= 0x0, B14= 0x8307f0, B15= 0x827e90
Exception happened at a place can not safely return!
And I found if change out[k] = (int32)(count>>16); to out[k] = (int32)(count/0xffff); everything is fine. In function inline int32 cal_difcurerror(int32 *difcur,int16 *cosbuf).
And if I change cgt from v7.14 to v8.1, everything is fine.
This code run on C6657 EVM, could you please to check why this happened?
thanks!
Robust.zipBR,
Denny