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: OMAP-L138 ARM core can't change the PINMUX register

Part Number: OMAP-L138

I made a bare-metal project for OMAP-L138 ARM core. I need to configure GPIO as output, so I tried to remap the dedicated pin to GPIO mode by changing PINMUX register. It seems the program works, but... the content of PINMUX register doesn't change. I can change it manually in register view of Code Composer.

uint32_t savePinmux = (HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_PINMUX(13)) &
    ~(SYSCFG_PINMUX13_PINMUX13_15_12));

HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_PINMUX(13)) =
    (PINMUX13_GPIO6_12_ENABLE | savePinmux);

There is a code above. As you see I need to change PINMUX13 register.