How to enable LIN mode of MPC5748G?

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

How to enable LIN mode of MPC5748G?

371 Views
H-chips
Contributor I

I need to do LIN development on MPC5748G, but after setting the INIT bit of LINFlexDx_LINCR1 register to 1 (set into initialization mode), I continue to set the UART bit of LINFlexDx_UARTCR register to 0 to enter LIN mode. It goes straight into the Machine Check Interrupt. What's going on here?LIN寄存器设置.png

 

设置LINmode进入错误中断.png

 MPC5748G-GW-RDB 

0 Kudos
Reply
5 Replies

356 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

be sure module is clocked and wait for INIT mode to be entered.
Some example is posted at https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/Example-MPC5748G-LINFlex-LIN-Master-Slave-test-G...

BR, Petr 

0 Kudos
Reply

337 Views
H-chips
Contributor I

Hello, thank you for your answer, but I set my registers according to the initialization operation (LINFlexD_1_Init) in the example program in the link you sent, but after this sentence (LINFlexD_1.LINCR2.R = 0x4000), I still entered the error interrupt. What's going on here?

例程进入错误中断.png

 

例程进入错误中断2.png

 

0 Kudos
Reply

330 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I do not see reason for this, check if right address is accessed.
There is no SDK driver for LIN, MCAL driver would include LIN driver however; 
https://www.nxp.com/design/design-center/software/automotive-software-and-tools/autosar/autosar-4-0-...

BR, Petr

 

0 Kudos
Reply

280 Views
H-chips
Contributor I
Ok, thank you very much for your answer. I will continue to study it.
0 Kudos
Reply

340 Views
H-chips
Contributor I
Hello, May I ask if using LIN is an operation that must write registers? Is there any library function for these operations?
0 Kudos
Reply