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?
Hi Peter,
The UART0_Tx pin is implemented for output driving as Fig 1 shows.
Fig 1
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
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
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!
-----------------------------------------------------------------------------------------------------------------------