lpcware

Help with 'NO' LPCOpen Board Library Project

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by emimad on Tue Sep 08 13:24:21 MST 2015
Hi,
I have a LPCXpresso 1347A board mounted on my bread board with some leds, 7-segments displays and so on.
When I start a new project selecting LPCOpen Chip Library Project: lpc_chip_13xx and LPCOpen Board Library Project: lpc_board_nxp_lpcxpresso_1347, the board works fine with a homemade delay function.

However, I can't work with PI0_4 because it's configurated as pinmuxing for I2C SCL.


I don't want to work with LPCOpen Board Library because my project board isn't similar, so I thought to not include the board library at setup a new project.
PI0_4 now works fine but when the program goes to the delay function, it stall and stop.


Can you help me to configure my next projects without use LPCOpen Board Library?

My delay function is as below:

#include "chip.h"


volatile uint32_t msTicks;/* counts 1ms timeTicks */

void SysTick_Handler(void)
{
msTicks++;/* increment counter necessary in Delay() */
}

void _delay_ms(uint32_t del)
{
uint32_t curTicks;
curTicks = msTicks;

while ((msTicks - curTicks) < del)
{
__WFI();
}
}

void setSYSTICK(void)// Setup Systick!
{
if (SysTick_Config(SystemCoreClock / 1000))
{ /* Setup SysTick Timer for 1 msec interrupts  */
while (1);                                  /* Capture error */
}

if ( !(SysTick->CTRL & SysTick_CTRL_CLKSOURCE_Msk) );

}


Outcomes