HI I am trying to generate pwm in P0_24 in LPC804 Microcontroler.
If there are any changes in my configuration, update me
int main()
{
SYSCON->PRESETCTRL0 |= 1 << 25;
SYSCON->SYSAHBCLKCTRL0 |= 1<<7;
SWM0->PINASSIGN.PINASSIGN4 = 0X18; // P0_24 PIN SELECTED
SYSCON->SYSAHBCLKCTRL0 |= 0<<7;
CTIMER->TCR |= 1 << 1;
CTIMER->PR = 0x00U;
CTIMER->MCR |= 1 << 0 | 1 << 1;
CTIMER->MR[0] =100;
CTIMER->MSR[0]=100;
CTIMER->PWMC |= 0<<1;
CTIMER->TCR |= 1<<0 | 1<<1;
while(1)
{
CTIMER->MR[1] =50;
CTIMER->MSR[1]=50;
}
}
Solved! Go to Solution.
Hello @Arularasan
Please first confirm the PWM demo under SDK can generate PWM signal on your board, then development based on it,
that can speeds up your development.
BR
Alice
Hello @Arularasan
What about the issue with your project?
About PWM, strongly recommend you the PWM demo under SDK.
Download SDK from: https://mcuxpresso.nxp.com/en/select
BR
Alice
The pwm pulse is not generated, please update me if there are any changes in the configuration below
int main()
{
Hello @Arularasan
Please first confirm the PWM demo under SDK can generate PWM signal on your board, then development based on it,
that can speeds up your development.
BR
Alice