SBC MC33907_8

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

SBC MC33907_8

609 Views
sagarmahajan
Contributor II

Does anyone have the algorithm that MC33907_8 (SBC) uses for LFSR calculation? I have simplified the (NOT(((LFSR x 4)+6)-4))/4 algorithm to be FF – X. In the image attached below, B2 is the default seed that SBC initializes with. To that, controller unit has to reply with 4D (which is FF – B2). In response to that, the SBC generates a random number (64 in this vase). Controller responds it with 9B (FF – 64) and then SBC generates another random number C8. I collected few samples and found out that it basically subtracts the LFSR number generated by SBC and the number that the controller answers. I mean B2 – 4D = 65. 64 – 9B = C9, 91 – 6E = 23, if you follow the numbers shown in the image, I am sure that it generates the random number by subtracting the 2 LFSR values. But that differs by 1 in some cases. In some cases, the next LFSR value is simply the (LFSR_SBC – LFSR_Controller) while in some cases it is (LFSR_SBC – LFSR_Controller – 1).

I am just not able to figure out when they subtract 1 and when they do not. I want to predict the next number generated by SBC. Please check the below image. Left side values are the one generattted by the SBC chip. And right hand side values are what controller has to answer in response to that.

Labels (1)
Tags (1)
0 Kudos
2 Replies

466 Views
maximeclairet
NXP Employee
NXP Employee

For safety reason, the WD answer formula should not be simplified and the complete calculation should be done by the MCU to guarantee the maximum Diagnostic Coverage (DC) of the WD safety mechanism.

In order to do the correct calculation, the MCU shall use unsigned integer operation on minimum 16 bits register to take into account the carry over.

You can also download the example driver code at https://www.nxp.com/webapp/Download?colCode=MPC5744P-MC33907-MC33908-DEMO&appType=license&location=n...

466 Views
sagarmahajan
Contributor II

Thank you!!! Maxime.

0 Kudos