LPC54616 USART-LIN MODE

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC54616 USART-LIN MODE

940 次查看
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 

标签 (2)
0 项奖励
回复
3 回复数

904 次查看
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 项奖励
回复

899 次查看
Cherrin
Contributor I

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

0 项奖励
回复

857 次查看
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 项奖励
回复