UART configuration for K line communication

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

UART configuration for K line communication

1,932 Views
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

Labels (1)
0 Kudos
1 Reply

1,491 Views
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 Kudos