I would like to turn off the SCT after its task. However I do not know which are the correct commands to insert in the code. I tried these ones:
LPC_SCT->STOP_L = 1;
LPC_SCT->HALT_L = 1;
LPC_SYSCON -> SYSAHBCLKCTRL0 |= (0<<8);
LPC_SYSCON->PRESETCTRL[0] &= ~(1<<8); //Assert the SCT reset
clean = LPC_SWM->PINASSIGN[7]; //copio Pin assign register 6 (per SCT_OUT0_O)
clean &= ~(0xFF<<24); //azzero bit di selezione pin (31:24)
but the problem is that the blue led (which is linked to the state machine) continues to stay on, and I want to turn off.
I have attached the code, in the main there is a commented section where I have to kill the SCT.
Thanks to anyone who can help me