Content originally posted in LPCWare by ucniranjan on Tue Jan 21 03:50:21 MST 2014
Friends,
I am using the LPCXpresso Board with the IDE. I have a simple program, wherein I redirect the CLKOUT to the pin 7, using the Switch Matrix. My code is below. When I connect the Logic Analyzer to pin 7, I do not see the Clock. What could be wrong? I have used the default libraries of LPCXpresso.
/****************************************************************************/
#include "LPC8xx.h"/* LPC8xx Peripheral Registers */
#include "type.h"
/*****************************************************************************
** Main Function main()
******************************************************************************/
int main (void)
{
LPC_SYSCON->SYSAHBCLKCTRL |= ( (0x1 << 7) | (0x1 << 18) );
LPC_SWM->SWM_8BIT_PINASSIGN8 = 0x07FFFF;
LPC_SYSCON->SYSAHBCLKCTRL &= ~( (0x1 << 7) | (0x1 << 18) );
while(1) { }
}
/*********************************************************************************
End Of File
*********************************************************************************/
Thanks in anticipation,
Niranjan