FAQ
- M051 시리즈(95)
- M0518 시리즈(97)
- M0519 시리즈(43)
- M0564 시리즈(1)
- Mini51 시리즈(90)
- Nano100/102 시리즈(101)
- Nano103 시리즈(10)
- Nano110/112 LCD 시리즈(100)
- Nano120 USB 시리즈(111)
- Nano130 어드밴스드 시리즈(110)
- NUC029 시리즈(94)
- NUC100/200 어드밴스드 시리즈(102)
- NUC120/122/123/220 USB 시리즈(116)
- NUC121/125 시리즈(1)
- NUC126 USB 시리즈(2)
- NUC130/230 CAN 시리즈(103)
- NUC131/NUC1311 CAN 시리즈(98)
- NUC140/240 연결(Connectivity) 시리즈(114)
- M451 시리즈(118)
- M451M 시리즈(117)
- M452 USB 시리즈(130)
- M4521 USB 시리즈(1)
- M453 CAN 시리즈(128)
- M463 CAN FD/USB HS 시리즈(1)
- M467 Ethernet/Crypto 시리즈(1)
- M471 시리즈(1)
- M479 Motor Control Series(1)
- M481 시리즈(4)
- M482 USB FS OTG 시리즈(4)
- M483 CAN 시리즈(4)
- M484 USB HS OTG 시리즈(4)
- M485 Crypto 시리즈(4)
- M487 이더넷(Ethernet) 시리즈(4)
- M4TK 터치 키 시리즈(25)
- NUC442/472 시리즈(130)
- NUC472 Series(1)
- NUC505 시리즈(138)
Products
Function
+
FAQ
What should be considered when using PWM output function in the NuMicro® family? Issue Date:2015-11-02
When using the PWM output function in the NuMicro® family, the users not only sets the corresponding pin to the PWM output function, but makes sure the PWM clock source is turned on, initializes and enables the PWM output function. Otherwise, the unstable state of the output pin may lead to leakage phenomenon.
In the M451 series, for example, the user can follow the steps below to set the PWM output function:
- Enable PWM clock:
CLK_EnableModuleClock(PWM0_MODULE); - Select PWM clock source:
CLK_SetModuleClock(PWM0_MODULE, CLK_CLKSEL2_PWM0SEL_PCLK0, NULL); - Reset PWM function:
SYS_ResetModule(PWM0_RST); - Set the pin or PWM function:
SYS->GPC_MFPL = (SYS->GPC_MFPL & (~SYS_GPC_MFPL_PC0MFP_Msk));
SYS->GPC_MFPL |= SYS_GPC_MFPL_PC0MFP_PWM0_CH0; - Set the PWM output function:
PWM_ConfigOutputChannel(PWM0, 0, 180000, 50); - Enable PWM output:
PWM_EnableOutput(PWM0, PWM_CH_0_MASK); - Start the PWM output:
PWM_Start(PWM0, PWM_CH_0_MASK);
Products: | Microcontrollers ,Arm Cortex-M0 MCUs ,M051 Base Series ,M0518 Series ,M0519 Series ,Mini51 Base Series ,Nano100/102 Base Series ,Nano110/112 LCD Series ,Nano120 USB Series ,Nano130 Advanced Series ,NUC029 Series ,NUC100/200 Advanced Series ,NUC120/122/123/220 USB Series ,NUC130/230 CAN Series ,NUC131/NUC1311 CAN Series ,NUC140/240 Connectivity Series ,Arm Cortex-M4 MCUs ,M451 Base Series ,M451M Series ,M452 USB Series ,M453 CAN Series ,NUC442/472 Series ,NUC505 Series |
---|---|
Applications: | |
Function: | Peripherals,Timer and PWM,PWM Output |