cancel
Showing results for 
Search instead for 
Did you mean: 

Distinguish occurrence of framing error in LINflex Module

torben
Associate II
Posted on January 12, 2017 at 09:44

Hello,

we are currently working on a LIN-Slave Driver for the SPC560D40L1. The use of the hardware-id-filter have made it easy so far but now we fail in one last test where we must distinguish whether the framing error has occurred in the header or in the response.

Is there a way to distinguish these two events in the framing error interrupt with id-filtering activated?

Thank you in advance!

Best regards

Torben

#lin #spc560d #framing-error #linflex
11 REPLIES 11
Erwan YVIN
ST Employee
Posted on January 12, 2017 at 11:19

Hello Torben,

Yes you can.

in the chapter 20 from the RM0045

you should enable the corresponding interrupt0690X00000605O0QAI.png

   Best regards

                     Erwan

Posted on January 12, 2017 at 11:46

Hello Erwan,

thanks for the quick response.

We have noticed the header error enable flag as well but we can't find the corresponding flag, like mentioned here:

0690X000006062HQAQ.png

Best Regards

Torben

Posted on January 12, 2017 at 16:13

Hello Torben ,

the RM is not clear.

maybe , the Header error Interrupt is triggered in IDPEF Flag for SPC560Dxx Family

0690X00000605xTQAQ.png

Could you try this ?

    Best Regards

                     Erwan

Posted on January 13, 2017 at 09:49

Hello Torben ,

After checking with experts ,

For header Error Interrupt, you need to check the flag SFEF , BDEF and IDPEF 

For Framing Error Interrupt, you need to check the flag FEF

      Best Regards

            Erwan

Posted on January 13, 2017 at 09:55

Thank you Erwan!

We'll try this on monday!

Best Regards

Torben

Posted on January 16, 2017 at 14:10

Hello Erwan,

we tried your suggestion but we still couldn't find out if a framing error has occurred in the identifier of the header or in one of the data bytes of the response.

0690X00000605dnQAA.png
Erwan YVIN
ST Employee
Posted on January 17, 2017 at 09:41

Hello Torben ,

Did you check in your Interruption handler the associated flag ?

Anyway , i am checking with experts.

      Best Regards

            Erwan

Posted on January 17, 2017 at 10:37

Hello Erwan,

yes, we checked it.

It seems like the IDPEF flag, for example,  is only for parity errors and is not related to a framing errror.

Parity errors must be handled differently according to the LIN spec.

Best Regards,

Torben

Erwan YVIN
ST Employee
Posted on January 18, 2017 at 16:43

According to the RM ,

FEF is the flag relative to Framing Error.

SFEF or BDEF or IDPEF bit is the flag relative to Header Error.

Did you check the others flags ?

   BR 

                 Erwan