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.

OMAP L138 ARM Interrupt Issues

Other Parts Discussed in Thread: OMAPL138

Hi Team,

We are noticing that processor do not allow to configure PINMUX registers because of processor is operate in user mode after startup. I am trying to change user mode to supervisor mode but in built CSS ARM library does not  allow any change. Please suggest options to change processor mode from user mode to supervisor mode.

 This is the following code which is reside in boot.asm library file.

 ;*------------------------------------------------------

        ;* SET TO USER MODE

        ;*------------------------------------------------------

        MRS     r0, cpsr

        BIC     r0, r0, #0x1F  ; CLEAR MODES

        ORR     r0, r0, #0x10  ; SET USER MODE  <--------------------------------------- I want to change this value to #0x13  

        MSR     cpsr_cf, r0

;*------------------------------------------------------

        ;* INITIALIZE THE USER MODE STACK

        ;*------------------------------------------------------

        .if __TI_AVOID_EMBEDDED_CONSTANTS

        MOVW    sp, __stack

        MOVT    sp, __stack

        MOVW    r0, __STACK_SIZE

        MOVT    r0, __STACK_SIZE

        .else

        LDR     sp, c_stack

        LDR     r0, c_STACK_SIZE

        .endif

        ADD     sp, sp, r0

 

        ;*-----------------------------------------------------

        ;* ALIGN THE STACK TO 64-BITS IF EABI.

        ;*-----------------------------------------------------

 We are also noticing that IRQ bit in CPRS register is set(means IRQ is disable). Usually what should be the status for this bit while execution of application program.

 

Regards,

Nivashini.M

 

 

  • If you are using the starterware based example, "system_config" would perform the supervisor mode.
    C:\ti\OMAPL138_StarterWare_1_10_04_01\binary\armv5\cgt_ccs\omapl138\system_config\Debug\system_config.lib

    Which example are you using and ?

    Refer this.
    C:\ti\OMAPL138_StarterWare_1_10_04_01\system_config\armv5\gcc\init.S

    @
    @ Set up the Stack for SVC mode
    @
    MSR cpsr_c, #MODE_SVC|I_F_BIT @ change to SVC mode
    MOV sp,r0 @ write the stack pointer
    SUB r0,r0, #SVC_STACK_SIZE @ give stack space
    @
    @ Set up the Stack for USer/System mode
    @
    MSR cpsr_c, #MODE_SYS|I_F_BIT @ change to system mode
    MOV sp,r0
  • Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com).

    Note: We strongly recommend you to create new e2e thread for your queries instead of following up on an old/closed e2e thread, new threads gets more attention than old threads and can provide link of old threads or information on the new post for clarity and faster response.