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.