UART configuration for K line communication

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART configuration for K line communication

2,040件の閲覧回数
gopichakrala
Contributor I

Hi NXP team,

We are using S32K1XX controller in our project.

I used the example code of LPUART1 and tested on the Evaluation board.

same configuration of LPUART1 is used for the different pins.

 I have changed the pin configuration

void PORT_init (void) {

PCC->PCCn[PCC_PORTD_INDEX ]|=PCC_PCCn_CGC_MASK; /* Enable clock for PORTC */

PORTD->PCR[13]|=PORT_PCR_MUX(2); /* Port C6: MUX = ALT2,UART1 TX */

PORTD->PCR[14]|=PORT_PCR_MUX(2); /* Port C7: MUX = ALT2,UART1 RX */

}

pin  configuration in example code is below

void PORT_init (void) {

PCC->PCCn[PCC_PORTC_INDEX ]|=PCC_PCCn_CGC_MASK; /* Enable clock for PORTC */

PORTC->PCR[6]|=PORT_PCR_MUX(2); /* Port C6: MUX = ALT2,UART1 TX */

PORTC->PCR[7]|=PORT_PCR_MUX(2); /* Port C7: MUX = ALT2,UART1 RX */

}

we connected the K line board and tried  with PortD pin  configuration, but it is not working.

we have set the TXINV and RXINV bit before enabling the TE and RE bits and enable the TE and RE.

we updated the value to data register but data register is not updating.

I tried with UART0 configuration also, same problem facing.

 find the attached code of test code.

kindly help us in this.

Regards,

Gopi

ラベル(1)
0 件の賞賛
1 返信

1,599件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,
Please see S32K144_IO_Signal_Description_Input_Multiplexing.xlsx file that is attached to the RM.
You need to set ALT3 function of PTD13/PTD14.

pastedImage_1.png

Regards,

Daniel

0 件の賞賛