When executing the ctpl assembly code, the following instruction overwrites 337 bytes of memory, apart from writing the value 0xa596 at the destination address.
movx.w #42390, &0x1018a;0x0a596 //this instruction is executed in <ctpl_setStateValid>
I did not observe this behavior in CTPL until I added other software libraries for my application. The other movx.w commands in the assembly code execute correctly.
Why does this unwanted memory write happen and how can it be prevented?
Thank you.