mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-11 22:23:59 +02:00
pwm1 working
This commit is contained in:
parent
888b659330
commit
97c797cb46
2 changed files with 2 additions and 2 deletions
|
@ -128,7 +128,7 @@ void EnablePWM1(uint32_t period, uint32_t duty) {
|
|||
LPC_SYSCON->SYSAHBCLKCTRL |= 1<<9; // Enables clock for 32-bit counter/timer 0.
|
||||
|
||||
LPC_IOCON->PIO1_6 &= ~0x07;
|
||||
LPC_IOCON->PIO1_6 |= 0x01; // Selects function CT32B0_MAT0
|
||||
LPC_IOCON->PIO1_6 |= 0x02; // Selects function CT32B0_MAT0
|
||||
|
||||
LPC_TMR32B0->MR3 = period;
|
||||
LPC_TMR32B0->MR0 = duty;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue