i'm using the TMS570LS31x USB stick. I used HALCoGen to generate basic startup code for the device and imported into a Hello World project in CCS. At one point i could burn this app in flash on the target and it ran successfully, but now it seems to hang when i run it. If i stop the processor i see that it is stuck in the endless loop (mloop below) inside the _memoryIinit_ asm routine in sys_memory.asm code that was auto generated by Halcogen. From referring to the TRM for this device it looks like this loop is polling the MINIDONE bit ( #0x100) from the MSTCGSTAT register (0xFFFFFF5C + #12 = 0xFFFFFF68) to determine when the initialization is done. It appears as this bit is never getting set. If i manually set r5 to 0x100 (artificially setting the DONE bit) after halting in the debugger, then the programs runs to completion and i see the "Hell World" message printed. Any idea what would cause this MINIDONE bit to not get set?
_memoryInit_
ldr r12, regMinitGcr ; MINITGCR register pointer
mov r4, #0xA
str r4, [r12]
ldr r4, ramInitMask ; load RAM initialization mask
str r4, [r12, #4]
mloop
ldr r5, [r12, #12]
tst r5, #0x100
beq mloop
mov r4, #5
str r4, [r12]
bx lr
ramInitMask .word 0x1E57F
regMinitGcr .word 0xFFFFFF5C
thanks
rmb