Hi
I am using the LPC1518 for a project and I have a problem, that only can be solved with a very short startup time. I need the system to set some GPIO to pull down or just set them low.
I just try with a very simple program, as seen below, which is not fast enough. So if anyone can help me or teach me how this can solve this is would be a big help for me.
int main (void) {
SystemCoreClockUpdate();
Chip_GPIO_Init(LPC_GPIO);
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SWM);
Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_IOCON);
Chip_IOCON_PinMuxSet(LPC_IOCON, 1, 31, (IOCON_DIGMODE_EN | IOCON_MODE_PULLDOWN) );
You need to look in the LPC15xx User Manual to see how long it takes to boot (it is specified) - it may already take too long before your code gets to run.
Hello Lasse,
If you want to execute an action the fastest possible after the MCU is out of reset, you could try to do it in the startup code, all the LPCOpen examples has an API called SystemInit that is executed before entering the main, maybe you could try adding the initializations you want to this region?
Best Regards,
Alexis Andalon