LPC51U68 PWM channel Selection

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC51U68 PWM channel Selection

573 Views
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

Labels (1)
0 Kudos
1 Reply

517 Views
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 Kudos