KL46 UART0_Tx->TPM1_CH0(Edge-aligned PWM)->IrDA_Tx

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

KL46 UART0_Tx->TPM1_CH0(Edge-aligned PWM)->IrDA_Tx

825 Views
petermlakar
Contributor I

I have trouble to implement  UART0_Tx as IrDA_Tx

I am initializing UART0 (tx:PTE20-alt4)

I am initializing TPM1_CH0 with Edge-aligned PWM

Enable SIM_SOPT5_UART0TXSRC(0x1), UART0_TX pin modulated with TPM1 channel 0 output

If I clear TPMx_CONF_CSOO bit then i get permanent pulses.

If I set TPMx_CONF_CSOO bit then i get nothing. The UART0_Tx just wont triger the TPM1_CH0.

The bits

TPMx_CONF_CROT;//Counter Reload On Trigger

TPMx_CONF_CSOT;//Counter Start on Trigger

TPMx_CONF_TRGSEL(0x9);//TPM1 overflow

have no impact.

I am also not shore what to set as output pin tx:PTE20-alt4(UART0_Tx) or tx:PTE20-alt3(TPM_CH0).

But they seam both to produce permanent pulses if I clear TPMx_CONF_CSOO.

What could be the problem?

0 Kudos
3 Replies

524 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Peter,

The UART0_Tx pin is implemented for output driving as Fig 1 shows.

2015-07-21_10-03-48.jpg

                                                                      Fig 1


Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

524 Views
petermlakar
Contributor I

2015-07-21_10-03-48_2.jpg

This is more the right image, for what i know til now.

But i still dont know whitch flags to use:

TPMx_CONF_CSOO

TPMx_CONF_CROT

TPMx_CONF_CSOT

0 Kudos

524 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Peter,

I'd like to suggest you to refer to the document for implement the IrDA communication.

Implementing infrared functions on UART0 with FRDM-KE02Z platform.

Hope it helps.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos