LPC51U68 PWM channel Selection

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC51U68 PWM channel Selection

709 次查看
prathap_ponnuch
Contributor I

HI all,

I am using LPC51U68 - 48 pin package in my project. 

Here i am seeing PWM channel 1 in 3 different pins.

PIO0_1, PIO0_8, PIO0_19 these three pin shows PWM channel 1 but i need only PIO0_8 then how to configure and use it?

thanks in advace.

regards,

prathap

标签 (1)
标记 (1)
0 项奖励
回复
1 回复

653 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hello prathap,

 

I recommend you to check our SDK examples, we have some PWM examples using SCTimer. There, you will find how you need to configure the pin and how to use the SCTimer module. You can download the SDK in this link or install it directly from MCUXpresso IDE.

 

To answer your question you need to configure the pin as follows:

const uint32_t port0_pin8_config = (
    IOCON_PIO_FUNC2 |                               /* Pin is configured as SCT0_OUT1 */
    IOCON_PIO_MODE_INACT |                          /* No addition pin function */
    IOCON_PIO_INV_DI |                              /* Input function is not inverted */
    IOCON_PIO_DIGITAL_EN |                          /* Enables digital function */
    IOCON_PIO_INPFILT_OFF |                         /* Input filter disabled */
    IOCON_PIO_OPENDRAIN_DI                          /* Open drain is disabled */
  );
  IOCON_PinMuxSet(IOCON, PORT0_IDX, 8, port0_pin8_config); /* PORT0 PIN8 is configured as SCT0_OUT1 */

Hope it helps!

 

Best regards,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored.

Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

------------------------------------------------------------------------------ 

0 项奖励
回复