The algorithm Yuri attached is one used on i.MX6 processors.
And the same BCH ECC is used on i.MX7 and i.MX8M processors as well.
Please make sure that you set right parameters for encoding algorithm.
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------