LPC54616 USART-LIN MODE

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

LPC54616 USART-LIN MODE

931件の閲覧回数
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 返答(返信)

895件の閲覧回数
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 件の賞賛
返信

890件の閲覧回数
Cherrin
Contributor I

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

0 件の賞賛
返信

848件の閲覧回数
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 件の賞賛
返信