Hi Thomas, On Mon. 9 May 2023 at 16:12, <Thomas.Kopp@xxxxxxxxxxxxx> wrote: [...] > Right, do you plan on separating this for Arbitration bitrate and databitrate? It would probably make sense to use a fixed number of worst case stuffbits for the arbitration phase and the formula for the data phase. I have a few ideas how to implement it, but seeing how complex things are going, I am thinking of creating an inline helper function for the bitstuffing calculation (the compiler should be able to fold it into a constant expression, so there should be no penalty). For the exact details, I have not decided yet. I need to experiment. This not being so trivial and not having so much free time now, please wait a few days for the v2 ;)