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.