Hugo Zijlmans
/
BLDC
Diff: MCPWM.c
- Revision:
- 2:f034e862af1f
- Parent:
- 1:2c52307d223f
--- a/MCPWM.c Thu Dec 02 12:32:18 2010 +0000 +++ b/MCPWM.c Thu Dec 02 20:55:45 2010 +0000 @@ -3,13 +3,14 @@ #include "cmsis_nvic.h" #include "MCPWM.h" #include "LPC1768.h" +#include "main.h" void MCPWM_init(void) { // Make the timer overload at 2000 (96MHz / 2000 = 48kHz) // Set the value to 1999 --> hex 7CF - MCLIM0 = 0x000007CF; - MCLIM1 = 0x000007CF; - MCLIM2 = 0x000007CF; + MCLIM0 = MCPWM_DIV; + MCLIM1 = MCPWM_DIV; + MCLIM2 = MCPWM_DIV; } \ No newline at end of file