Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

CCS/OMAP-L138: [OMAP-L138 LCDK] Can't use enable GPIO pin for simple test

$
0
0

Part Number:OMAP-L138

Tool/software: Code Composer Studio

Hi,

I am using the OMAP-L138 LCDK, and I am trying to toggle the SPI0_CLK pin as a GPIO since it is muxed with GP1[8].

My code is:

#include "soc_OMAPL138.h"
#include "hw_syscfg0_OMAPL138.h"
#include "hw_types.h"

int main(){

unsigned int savePinmux = 0;
	savePinmux = (HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_PINMUX(3)) &
	         ~(SYSCFG_PINMUX3_PINMUX3_3_0_SPI0_CLK));
	HWREG(SOC_SYSCFG_0_REGS + SYSCFG0_PINMUX(3)) =
		  (PINMUX3_SPIO_CLK_ENABLE | savePinmux);
	
	GPIODirModeSet(SOC_GPIO_0_REGS, 25, GPIO_DIR_OUTPUT);
	GPIOPinWrite(SOC_GPIO_0_REGS, 25, GPIO_PIN_HIGH);

}

What am I doing wrong?


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>