1 /**********************************************************************
\r
2 * $Id$ lpc18xx_mcpwm.c 2011-06-02
\r
4 * @file lpc18xx_mcpwm.c
\r
5 * @brief Contains all functions support for Motor Control PWM firmware
\r
8 * @date 02. June. 2011
\r
9 * @author NXP MCU SW Application Team
\r
11 * Copyright(C) 2011, NXP Semiconductor
\r
12 * All rights reserved.
\r
14 ***********************************************************************
\r
15 * Software that is described herein is for illustrative purposes only
\r
16 * which provides customers with programming information regarding the
\r
17 * products. This software is supplied "AS IS" without any warranties.
\r
18 * NXP Semiconductors assumes no responsibility or liability for the
\r
19 * use of the software, conveys no license or title under any patent,
\r
20 * copyright, or mask work right to the product. NXP Semiconductors
\r
21 * reserves the right to make changes in the software without
\r
22 * notification. NXP Semiconductors also make no representation or
\r
23 * warranty that such application will be suitable for the specified
\r
24 * use without further testing or modification.
\r
25 **********************************************************************/
\r
27 /* Peripheral group ----------------------------------------------------------- */
\r
28 /** @addtogroup MCPWM
\r
32 /* Includes ------------------------------------------------------------------- */
\r
33 #include "lpc18xx_mcpwm.h"
\r
34 #include "lpc18xx_cgu.h"
\r
36 /* If this source file built with example, the LPC18xx FW library configuration
\r
37 * file in each example directory ("lpc18xx_libcfg.h") must be included,
\r
38 * otherwise the default FW library configuration file must be included instead
\r
40 #ifdef __BUILD_WITH_EXAMPLE__
\r
41 #include "lpc18xx_libcfg.h"
\r
43 #include "lpc18xx_libcfg_default.h"
\r
44 #endif /* __BUILD_WITH_EXAMPLE__ */
\r
48 /* Public Functions ----------------------------------------------------------- */
\r
49 /** @addtogroup MCPWM_Public_Functions
\r
53 /*********************************************************************//**
\r
54 * @brief Initializes the MCPWM peripheral
\r
55 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
57 **********************************************************************/
\r
58 void MCPWM_Init(LPC_MCPWM_Type *MCPWMx)
\r
60 /* Turn On MCPWM PCLK */
\r
61 //LPC_CGU->BASE_VPB1_CLK = (SRC_PL160M_0<<24) | (1<<11);
\r
62 CGU_EntityConnect(CGU_CLKSRC_PLL1, CGU_BASE_APB1);
\r
64 MCPWMx->CAP_CLR = MCPWM_CAPCLR_CAP(0) | MCPWM_CAPCLR_CAP(1) | MCPWM_CAPCLR_CAP(2);
\r
66 MCPWMx->INTF_CLR = MCPWM_INT_ILIM(0) | MCPWM_INT_ILIM(1) | MCPWM_INT_ILIM(2) \
\r
67 | MCPWM_INT_IMAT(0) | MCPWM_INT_IMAT(1) | MCPWM_INT_IMAT(2) \
\r
68 | MCPWM_INT_ICAP(0) | MCPWM_INT_ICAP(1) | MCPWM_INT_ICAP(2);
\r
70 MCPWMx->INTEN_CLR = MCPWM_INT_ILIM(0) | MCPWM_INT_ILIM(1) | MCPWM_INT_ILIM(2) \
\r
71 | MCPWM_INT_IMAT(0) | MCPWM_INT_IMAT(1) | MCPWM_INT_IMAT(2) \
\r
72 | MCPWM_INT_ICAP(0) | MCPWM_INT_ICAP(1) | MCPWM_INT_ICAP(2);
\r
76 /*********************************************************************//**
\r
77 * @brief Configures each channel in MCPWM peripheral according to the
\r
78 * specified parameters in the MCPWM_CHANNEL_CFG_Type.
\r
79 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
80 * @param[in] channelNum Channel number, should be: 0..2.
\r
81 * @param[in] channelSetup Pointer to a MCPWM_CHANNEL_CFG_Type structure
\r
82 * that contains the configuration information for the specified
\r
85 **********************************************************************/
\r
86 void MCPWM_ConfigChannel(LPC_MCPWM_Type *MCPWMx, uint32_t channelNum,
\r
87 MCPWM_CHANNEL_CFG_Type * channelSetup)
\r
89 if (channelNum <= 2)
\r
91 if (channelNum == MCPWM_CHANNEL_0)
\r
93 MCPWMx->TC[0] = channelSetup->channelTimercounterValue;
\r
94 MCPWMx->LIM[0] = channelSetup->channelPeriodValue;
\r
95 MCPWMx->MAT[0] = channelSetup->channelPulsewidthValue;
\r
97 else if (channelNum == MCPWM_CHANNEL_1)
\r
99 MCPWMx->TC[1] = channelSetup->channelTimercounterValue;
\r
100 MCPWMx->LIM[1] = channelSetup->channelPeriodValue;
\r
101 MCPWMx->MAT[1] = channelSetup->channelPulsewidthValue;
\r
103 else if (channelNum == MCPWM_CHANNEL_2)
\r
105 MCPWMx->TC[2] = channelSetup->channelTimercounterValue;
\r
106 MCPWMx->LIM[2] = channelSetup->channelPeriodValue;
\r
107 MCPWMx->MAT[2] = channelSetup->channelPulsewidthValue;
\r
114 if (channelSetup->channelType == MCPWM_CHANNEL_CENTER_MODE)
\r
116 MCPWMx->CON_SET = MCPWM_CON_CENTER(channelNum);
\r
120 MCPWMx->CON_CLR = MCPWM_CON_CENTER(channelNum);
\r
123 if (channelSetup->channelPolarity == MCPWM_CHANNEL_PASSIVE_HI)
\r
125 MCPWMx->CON_SET = MCPWM_CON_POLAR(channelNum);
\r
129 MCPWMx->CON_CLR = MCPWM_CON_POLAR(channelNum);
\r
132 if (channelSetup->channelDeadtimeEnable == ENABLE)
\r
134 MCPWMx->CON_SET = MCPWM_CON_DTE(channelNum);
\r
136 MCPWMx->DT &= ~(MCPWM_DT(channelNum, 0x3FF));
\r
138 MCPWMx->DT |= MCPWM_DT(channelNum, channelSetup->channelDeadtimeValue);
\r
142 MCPWMx->CON_CLR = MCPWM_CON_DTE(channelNum);
\r
145 if (channelSetup->channelUpdateEnable == ENABLE)
\r
147 MCPWMx->CON_CLR = MCPWM_CON_DISUP(channelNum);
\r
151 MCPWMx->CON_SET = MCPWM_CON_DISUP(channelNum);
\r
157 /*********************************************************************//**
\r
158 * @brief Write to MCPWM shadow registers - Update the value for period
\r
159 * and pulse width in MCPWM peripheral.
\r
160 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
161 * @param[in] channelNum Channel Number, should be: 0..2.
\r
162 * @param[in] channelSetup Pointer to a MCPWM_CHANNEL_CFG_Type structure
\r
163 * that contains the configuration information for the specified
\r
166 **********************************************************************/
\r
167 void MCPWM_WriteToShadow(LPC_MCPWM_Type *MCPWMx, uint32_t channelNum,
\r
168 MCPWM_CHANNEL_CFG_Type *channelSetup)
\r
170 if (channelNum == MCPWM_CHANNEL_0)
\r
172 MCPWMx->LIM[0] = channelSetup->channelPeriodValue;
\r
173 MCPWMx->MAT[0] = channelSetup->channelPulsewidthValue;
\r
175 else if (channelNum == MCPWM_CHANNEL_1)
\r
177 MCPWMx->LIM[1] = channelSetup->channelPeriodValue;
\r
178 MCPWMx->MAT[1] = channelSetup->channelPulsewidthValue;
\r
180 else if (channelNum == MCPWM_CHANNEL_2)
\r
182 MCPWMx->LIM[2] = channelSetup->channelPeriodValue;
\r
183 MCPWMx->MAT[2] = channelSetup->channelPulsewidthValue;
\r
189 /*********************************************************************//**
\r
190 * @brief Configures capture function in MCPWM peripheral
\r
191 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
192 * @param[in] channelNum MCI (Motor Control Input pin) number, should be: 0..2
\r
193 * @param[in] captureConfig Pointer to a MCPWM_CAPTURE_CFG_Type structure
\r
194 * that contains the configuration information for the
\r
195 * specified MCPWM capture.
\r
197 **********************************************************************/
\r
198 void MCPWM_ConfigCapture(LPC_MCPWM_Type *MCPWMx, uint32_t channelNum,
\r
199 MCPWM_CAPTURE_CFG_Type *captureConfig)
\r
201 if ((channelNum <= MCPWM_CHANNEL_2))
\r
204 if (captureConfig->captureFalling == ENABLE)
\r
206 MCPWMx->CAPCON_SET = MCPWM_CAPCON_CAPMCI_FE(captureConfig->captureChannel, channelNum);
\r
210 MCPWMx->CAPCON_CLR = MCPWM_CAPCON_CAPMCI_FE(captureConfig->captureChannel, channelNum);
\r
213 if (captureConfig->captureRising == ENABLE)
\r
215 MCPWMx->CAPCON_SET = MCPWM_CAPCON_CAPMCI_RE(captureConfig->captureChannel, channelNum);
\r
219 MCPWMx->CAPCON_CLR = MCPWM_CAPCON_CAPMCI_RE(captureConfig->captureChannel, channelNum);
\r
222 if (captureConfig->timerReset == ENABLE)
\r
224 MCPWMx->CAPCON_SET = MCPWM_CAPCON_RT(captureConfig->captureChannel);
\r
228 MCPWMx->CAPCON_CLR = MCPWM_CAPCON_RT(captureConfig->captureChannel);
\r
231 if (captureConfig->hnfEnable == ENABLE)
\r
233 MCPWMx->CAPCON_SET = MCPWM_CAPCON_HNFCAP(channelNum);
\r
237 MCPWMx->CAPCON_CLR = MCPWM_CAPCON_HNFCAP(channelNum);
\r
243 /*********************************************************************//**
\r
244 * @brief Clears current captured value in specified capture channel
\r
245 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
246 * @param[in] captureChannel Capture channel number, should be: 0..2
\r
248 **********************************************************************/
\r
249 void MCPWM_ClearCapture(LPC_MCPWM_Type *MCPWMx, uint32_t captureChannel)
\r
251 MCPWMx->CAP_CLR = MCPWM_CAPCLR_CAP(captureChannel);
\r
254 /*********************************************************************//**
\r
255 * @brief Get current captured value in specified capture channel
\r
256 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
257 * @param[in] captureChannel Capture channel number, should be: 0..2
\r
259 **********************************************************************/
\r
260 uint32_t MCPWM_GetCapture(LPC_MCPWM_Type *MCPWMx, uint32_t captureChannel)
\r
262 if (captureChannel == MCPWM_CHANNEL_0)
\r
264 return (MCPWMx->CAP[0]);
\r
266 else if (captureChannel == MCPWM_CHANNEL_1)
\r
268 return (MCPWMx->CAP[1]);
\r
270 else if (captureChannel == MCPWM_CHANNEL_2)
\r
272 return (MCPWMx->CAP[2]);
\r
278 /*********************************************************************//**
\r
279 * @brief Configures Count control in MCPWM peripheral
\r
280 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
281 * @param[in] channelNum Channel number, should be: 0..2
\r
282 * @param[in] countMode Count mode, should be:
\r
283 * - ENABLE: Enables count mode.
\r
284 * - DISABLE: Disable count mode, the channel is in timer mode.
\r
285 * @param[in] countConfig Pointer to a MCPWM_COUNT_CFG_Type structure
\r
286 * that contains the configuration information for the
\r
287 * specified MCPWM count control.
\r
289 **********************************************************************/
\r
290 void MCPWM_CountConfig(LPC_MCPWM_Type *MCPWMx, uint32_t channelNum,
\r
291 uint32_t countMode, MCPWM_COUNT_CFG_Type *countConfig)
\r
293 if ((channelNum <= 2))
\r
295 if (countMode == ENABLE)
\r
297 MCPWMx->CNTCON_SET = MCPWM_CNTCON_CNTR(channelNum);
\r
299 if (countConfig->countFalling == ENABLE)
\r
301 MCPWMx->CNTCON_SET = MCPWM_CNTCON_TCMCI_FE(countConfig->counterChannel,channelNum);
\r
305 MCPWMx->CNTCON_CLR = MCPWM_CNTCON_TCMCI_FE(countConfig->counterChannel,channelNum);
\r
308 if (countConfig->countRising == ENABLE)
\r
310 MCPWMx->CNTCON_SET = MCPWM_CNTCON_TCMCI_RE(countConfig->counterChannel,channelNum);
\r
314 MCPWMx->CNTCON_CLR = MCPWM_CNTCON_TCMCI_RE(countConfig->counterChannel,channelNum);
\r
319 MCPWMx->CNTCON_CLR = MCPWM_CNTCON_CNTR(channelNum);
\r
325 /*********************************************************************//**
\r
326 * @brief Start MCPWM activity for each MCPWM channel
\r
327 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
328 * @param[in] channel0 State of this command on channel 0:
\r
329 * - ENABLE: 'Start' command will effect on channel 0
\r
330 * - DISABLE: 'Start' command will not effect on channel 0
\r
331 * @param[in] channel1 State of this command on channel 1:
\r
332 * - ENABLE: 'Start' command will effect on channel 1
\r
333 * - DISABLE: 'Start' command will not effect on channel 1
\r
334 * @param[in] channel2 State of this command on channel 2:
\r
335 * - ENABLE: 'Start' command will effect on channel 2
\r
336 * - DISABLE: 'Start' command will not effect on channel 2
\r
338 **********************************************************************/
\r
339 void MCPWM_Start(LPC_MCPWM_Type *MCPWMx, uint32_t channel0,
\r
340 uint32_t channel1, uint32_t channel2)
\r
342 uint32_t regVal = 0;
\r
344 regVal = (channel0 ? MCPWM_CON_RUN(0) : 0) | (channel1 ? MCPWM_CON_RUN(1) : 0) \
\r
345 | (channel2 ? MCPWM_CON_RUN(2) : 0);
\r
347 MCPWMx->CON_SET = regVal;
\r
351 /*********************************************************************//**
\r
352 * @brief Stop MCPWM activity for each MCPWM channel
\r
353 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
354 * @param[in] channel0 State of this command on channel 0:
\r
355 * - ENABLE: 'Stop' command will effect on channel 0
\r
356 * - DISABLE: 'Stop' command will not effect on channel 0
\r
357 * @param[in] channel1 State of this command on channel 1:
\r
358 * - ENABLE: 'Stop' command will effect on channel 1
\r
359 * - DISABLE: 'Stop' command will not effect on channel 1
\r
360 * @param[in] channel2 State of this command on channel 2:
\r
361 * - ENABLE: 'Stop' command will effect on channel 2
\r
362 * - DISABLE: 'Stop' command will not effect on channel 2
\r
364 **********************************************************************/
\r
365 void MCPWM_Stop(LPC_MCPWM_Type *MCPWMx, uint32_t channel0,
\r
366 uint32_t channel1, uint32_t channel2)
\r
368 uint32_t regVal = 0;
\r
370 regVal = (channel0 ? MCPWM_CON_RUN(0) : 0) | (channel1 ? MCPWM_CON_RUN(1) : 0) \
\r
371 | (channel2 ? MCPWM_CON_RUN(2) : 0);
\r
373 MCPWMx->CON_CLR = regVal;
\r
377 /*********************************************************************//**
\r
378 * @brief Enables/Disables 3-phase AC motor mode on MCPWM peripheral
\r
379 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
380 * @param[in] acMode State of this command, should be:
\r
384 **********************************************************************/
\r
385 void MCPWM_ACMode(LPC_MCPWM_Type *MCPWMx, uint32_t acMode)
\r
389 MCPWMx->CON_SET = MCPWM_CON_ACMODE;
\r
393 MCPWMx->CON_CLR = MCPWM_CON_ACMODE;
\r
398 /*********************************************************************//**
\r
399 * @brief Enables/Disables 3-phase DC motor mode on MCPWM peripheral
\r
400 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
401 * @param[in] dcMode State of this command, should be:
\r
404 * @param[in] outputInvered Polarity of the MCOB outputs for all 3 channels,
\r
406 * - ENABLE :The MCOB outputs have opposite polarity from the MCOA outputs.
\r
407 * - DISABLE :The MCOB outputs have the same basic polarity as the MCOA outputs.
\r
408 * @param[in] outputPattern A value contains bits that enables/disables the specified
\r
409 * output pins route to the internal MCOA0 signal, should be:
\r
410 * - MCPWM_PATENT_A0 :MCOA0 tracks internal MCOA0
\r
411 * - MCPWM_PATENT_B0 :MCOB0 tracks internal MCOA0
\r
412 * - MCPWM_PATENT_A1 :MCOA1 tracks internal MCOA0
\r
413 * - MCPWM_PATENT_B1 :MCOB1 tracks internal MCOA0
\r
414 * - MCPWM_PATENT_A2 :MCOA2 tracks internal MCOA0
\r
415 * - MCPWM_PATENT_B2 :MCOB2 tracks internal MCOA0
\r
418 * Note: all these outputPatent values above can be ORed together for using as input parameter.
\r
419 **********************************************************************/
\r
420 void MCPWM_DCMode(LPC_MCPWM_Type *MCPWMx, uint32_t dcMode,
\r
421 uint32_t outputInvered, uint32_t outputPattern)
\r
425 MCPWMx->CON_SET = MCPWM_CON_DCMODE;
\r
429 MCPWMx->CON_CLR = MCPWM_CON_DCMODE;
\r
434 MCPWMx->CON_SET = MCPWM_CON_INVBDC;
\r
438 MCPWMx->CON_CLR = MCPWM_CON_INVBDC;
\r
441 MCPWMx->CCP = outputPattern;
\r
445 /*********************************************************************//**
\r
446 * @brief Configures the specified interrupt in MCPWM peripheral
\r
447 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
448 * @param[in] ulIntType Interrupt type, should be:
\r
449 * - MCPWM_INTFLAG_LIM0 :Limit interrupt for channel (0)
\r
450 * - MCPWM_INTFLAG_MAT0 :Match interrupt for channel (0)
\r
451 * - MCPWM_INTFLAG_CAP0 :Capture interrupt for channel (0)
\r
452 * - MCPWM_INTFLAG_LIM1 :Limit interrupt for channel (1)
\r
453 * - MCPWM_INTFLAG_MAT1 :Match interrupt for channel (1)
\r
454 * - MCPWM_INTFLAG_CAP1 :Capture interrupt for channel (1)
\r
455 * - MCPWM_INTFLAG_LIM2 :Limit interrupt for channel (2)
\r
456 * - MCPWM_INTFLAG_MAT2 :Match interrupt for channel (2)
\r
457 * - MCPWM_INTFLAG_CAP2 :Capture interrupt for channel (2)
\r
458 * - MCPWM_INTFLAG_ABORT :Fast abort interrupt
\r
459 * @param[in] NewState New State of this command, should be:
\r
464 * Note: all these ulIntType values above can be ORed together for using as input parameter.
\r
465 **********************************************************************/
\r
466 void MCPWM_IntConfig(LPC_MCPWM_Type *MCPWMx, uint32_t ulIntType, FunctionalState NewState)
\r
470 MCPWMx->INTEN_SET = ulIntType;
\r
474 MCPWMx->INTEN_CLR = ulIntType;
\r
479 /*********************************************************************//**
\r
480 * @brief Sets/Forces the specified interrupt for MCPWM peripheral
\r
481 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
482 * @param[in] ulIntType Interrupt type, should be:
\r
483 * - MCPWM_INTFLAG_LIM0 :Limit interrupt for channel (0)
\r
484 * - MCPWM_INTFLAG_MAT0 :Match interrupt for channel (0)
\r
485 * - MCPWM_INTFLAG_CAP0 :Capture interrupt for channel (0)
\r
486 * - MCPWM_INTFLAG_LIM1 :Limit interrupt for channel (1)
\r
487 * - MCPWM_INTFLAG_MAT1 :Match interrupt for channel (1)
\r
488 * - MCPWM_INTFLAG_CAP1 :Capture interrupt for channel (1)
\r
489 * - MCPWM_INTFLAG_LIM2 :Limit interrupt for channel (2)
\r
490 * - MCPWM_INTFLAG_MAT2 :Match interrupt for channel (2)
\r
491 * - MCPWM_INTFLAG_CAP2 :Capture interrupt for channel (2)
\r
492 * - MCPWM_INTFLAG_ABORT :Fast abort interrupt
\r
494 * Note: all these ulIntType values above can be ORed together for using as input parameter.
\r
495 **********************************************************************/
\r
496 void MCPWM_IntSet(LPC_MCPWM_Type *MCPWMx, uint32_t ulIntType)
\r
498 MCPWMx->INTF_SET = ulIntType;
\r
502 /*********************************************************************//**
\r
503 * @brief Clear the specified interrupt pending for MCPWM peripheral
\r
504 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
505 * @param[in] ulIntType Interrupt type, should be:
\r
506 * - MCPWM_INTFLAG_LIM0 :Limit interrupt for channel (0)
\r
507 * - MCPWM_INTFLAG_MAT0 :Match interrupt for channel (0)
\r
508 * - MCPWM_INTFLAG_CAP0 :Capture interrupt for channel (0)
\r
509 * - MCPWM_INTFLAG_LIM1 :Limit interrupt for channel (1)
\r
510 * - MCPWM_INTFLAG_MAT1 :Match interrupt for channel (1)
\r
511 * - MCPWM_INTFLAG_CAP1 :Capture interrupt for channel (1)
\r
512 * - MCPWM_INTFLAG_LIM2 :Limit interrupt for channel (2)
\r
513 * - MCPWM_INTFLAG_MAT2 :Match interrupt for channel (2)
\r
514 * - MCPWM_INTFLAG_CAP2 :Capture interrupt for channel (2)
\r
515 * - MCPWM_INTFLAG_ABORT :Fast abort interrupt
\r
517 * Note: all these ulIntType values above can be ORed together for using as input parameter.
\r
518 **********************************************************************/
\r
519 void MCPWM_IntClear(LPC_MCPWM_Type *MCPWMx, uint32_t ulIntType)
\r
521 MCPWMx->INTF_CLR = ulIntType;
\r
525 /*********************************************************************//**
\r
526 * @brief Check whether if the specified interrupt in MCPWM is set or not
\r
527 * @param[in] MCPWMx Motor Control PWM peripheral selected, should be: LPC_MCPWM
\r
528 * @param[in] ulIntType Interrupt type, should be:
\r
529 * - MCPWM_INTFLAG_LIM0 :Limit interrupt for channel (0)
\r
530 * - MCPWM_INTFLAG_MAT0 :Match interrupt for channel (0)
\r
531 * - MCPWM_INTFLAG_CAP0 :Capture interrupt for channel (0)
\r
532 * - MCPWM_INTFLAG_LIM1 :Limit interrupt for channel (1)
\r
533 * - MCPWM_INTFLAG_MAT1 :Match interrupt for channel (1)
\r
534 * - MCPWM_INTFLAG_CAP1 :Capture interrupt for channel (1)
\r
535 * - MCPWM_INTFLAG_LIM2 :Limit interrupt for channel (2)
\r
536 * - MCPWM_INTFLAG_MAT2 :Match interrupt for channel (2)
\r
537 * - MCPWM_INTFLAG_CAP2 :Capture interrupt for channel (2)
\r
538 * - MCPWM_INTFLAG_ABORT :Fast abort interrupt
\r
540 **********************************************************************/
\r
541 FlagStatus MCPWM_GetIntStatus(LPC_MCPWM_Type *MCPWMx, uint32_t ulIntType)
\r
543 return ((MCPWMx->INTF & ulIntType) ? SET : RESET);
\r
550 #endif /* _MCPWM */
\r
555 /* --------------------------------- End Of File ------------------------------ */
\r