LPC54616 USART-LIN MODE

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

LPC54616 USART-LIN MODE

943 Views
Cherrin
Contributor I

_0-1726122456888.png

_1-1726122490275.png

 

I have programmed according to the way of generating break signal provided by the manual, but it seems that the signal cannot be generated successfully. I request to provide the sample code of usart0 sending messages in lin mode (including initial configuration).

LPC54616 LIN Break Generation 

Labels (2)
0 Kudos
Reply
3 Replies

907 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

It appears that your code has issue.

Pls refer to section 25.7.9 for break generation.

void Lin_SendBreak(void)

{

//set the Lin mode

UART0-CFG|=1<<8;

//send break

USRT0->CTRL|=1<<1;

while(USRT0->CTRL&0x02) {}

}

Pls have a try.

BR

XiangJun Rong

 

xiangjun_rong_0-1726220705554.png

 

0 Kudos
Reply

902 Views
Cherrin
Contributor I

your CTRL(BIT 1)not need to clear?the usermenu say the send break until the bit clear。 

0 Kudos
Reply

860 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

The usermenu say the send break until the bit clear, so I use the following code to poll the bit 1 until it is cleared.

 

USRT0->CTRL|=1<<1;

while(USRT0->CTRL&0x02) {}

BR

XiangJun Rong

0 Kudos
Reply