This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS3137: HALCoGen startup code initializing SPSR in System Mode

Expert 1995 points
Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

Hello,

I did not find an answer to the original doubt: according with the reference material, actually even if system mode is a privileged mode, it has no SPSR. It makes sense for me since in system mode there are no exceptions and then no reason to have dedicated SPSR.

So, why in the portion of sys_core.asm, at the following portion:

; Switch to System Mode ( Shares User Mode registers ) (M = 11111)
        cps #31
        mov lr, r0 
        mrs r1,cpsr
        msr spsr_cxsf, r1

the last line should not be removed ?