How to determin if LIN command from master is off by using S12ZVM LIN stack ?

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

How to determin if LIN command from master is off by using S12ZVM LIN stack ?

7,847 Views
NoahXu
Contributor III

hello, support 

 how can i detect if LIN command from LIN master is off by using S12ZVM LIN stack ?

 is there any flag i can use if the master stop sending out LIN command to slave?

i am now using the S12ZVM LIN stack .

thanks!

Tags (1)
0 Kudos
Reply
25 Replies

2,608 Views
NoahXu
Contributor III

Hi, Namm

thank you fou your response .

i set some flags in the code, seems value in freemaster not change if i switch the master comamnd on and off. can you help to check?

 

the code is set like this

"

lin_Status = l_ifc_read_status(LI0);
 
if( lin_Status & 0x0001u ) 
Lin_flag_errorResp = 1;
}
else
{
Lin_flag_errorResp = 0; 
}
 
if( lin_Status & 0x0008u ) 
 
Lin_flag_gotoSleep = 1;
}
else
{
Lin_flag_gotoSleep = 0;  
}

"

0 Kudos
Reply

1,832 Views
NamLee
NXP Employee
NXP Employee

Hi NoahXu,

You mentioned that "if i switch the master comamnd on and off", so your action is power off the master, or which action have you done?

Can you tell me the purpose of this check in advance?

Moreover, please help me to check all other bit of lin_Status, just to clarify the result.

Thank you,

Nam.

0 Kudos
Reply

1,781 Views
NoahXu
Contributor III

Hello, Namm

"switch the master comamnd on and off" , it is the LIN scheduler on/off simulated by tools like Canoe, by turn on /off of the LIN scheduler, i simulate the LIN master on/off.

the result of the function : i_ifc_readstatus(LI0) is 0XFE30A0 which is really strange. i paste the screenshot of codeworrior IDE here. you can check it.

by the way,  lin trasmit functions is ok using this LIN Stack, which means the cfg of lin stack is ok.

please kindly help to check, thanks

0 Kudos
Reply

994 Views
NamLee
NXP Employee
NXP Employee

Hi NoahXu,

I think it's the function's address, due to result should be 16bit.

I saw your expressions, does lin_status be changed any bits when you step over the function i_ifc_readstatus?

Thank you,

Nam.

0 Kudos
Reply

961 Views
NoahXu
Contributor III

Hi, Namm

you are right, it is the address of the function .

but i checked the value and found no change of it.

in the picture i post here , you can find the register SCI0SR1 is changing when i turn on / off the LIN scheduer , but the variable"lin_Status " is still 0.

SCREENSHOT2.png

0 Kudos
Reply