LIN Stack Problem with Processor Expert Mode

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

LIN Stack Problem with Processor Expert Mode

2,204 Views
chaitanya_kalyani
Contributor III

I am facing issue while using LIN stack with processor expert mode.

If directly added LIN stack then getting issue ISR redefined.

2.PNG

If I allow macro redefinition

1.PNG 

then not able to flash the program. getting error 

3.PNG

After commenting lin_isr.c file able to flash properly. But need a lin signals based on interrupt base.

Can you update the lin_isr.c.  Find sample code that I am trying to use in the attachment below.

Quick response highly appreciated.

4 Replies

1,966 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello, 

Why do you need a Processor Expert? Wouldn't it be easier to set it up by yourself?

LIN uses interrupts that are not generated by the Processor Expert. So, when you don't use lin_isr.c it is working.

As you can see a similar case in this link "Fail to resume target process.Downloading binary to target..."  

If you look at your .map file you can see below interrupts. 

pastedImage_2.png

The interrupts can be generated by the init_SCI and init_TIM bean in the Processor Expert.

Best Regards,

Diana

0 Kudos

1,966 Views
chaitanya_kalyani
Contributor III

Hello,

I am new with LIN as well as S12ZVL and working on an urgent project. 

I made some changes in lin_isr.c file and normal LIN communication working fine. 

Just not able to set CPMUSYNR register value to 0x8F through PE so setting it manually in main.

Please let me know if I am following any wrong approach and that will cause any problem or not.

Find the sample code and procedure screenshot in the attachment below.

0 Kudos

1,966 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

I'm very sorry for the delay.

It is not possible to set CPMUSYNR to 0x8F because the value of VCOFRQ = 0b10 is reserved.

Please, refer to the below table from the RM rev 2.48

pastedImage_2.png

pastedImage_1.png

Best regards,

Diana

0 Kudos

1,966 Views
chaitanya_kalyani
Contributor III

Hello,

Thank you for your help.

I found the exact issue. The issue was with the baud rate. I added auto baud rate support from NPF and interrupt vector so it is working fine. 

But when you update LIN cfg files then need to add #include"IO_Map.h" in lin_hw_cfg.h file.

Find an updated sample code in the attachment.