potential bug in fsl_ocotp.c

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

potential bug in fsl_ocotp.c

Jump to solution
411 Views
mastupristi
Senior Contributor I

Hi,

my micro is RT1175.

in file fsl_ocotp.c there is OCOTP_ReadFuseShadowRegisterExt()

mastupristi_0-1721203254088.png

at the beginning there is an assert to validate the `fuseWords` parameter. I tested that the assert is triggered for fuseWords >= 4
This is confirmed at line 71242 of MIMXRT1175_cm7.h

mastupristi_1-1721203481937.png

the RT1175 can read 4 words at a time on OCOTP. Therefore, the `fuseWords` parameter should be written OCOTP_READ_CTRL[READ_FUSE_CNTR]

mastupristi_2-1721204970668.png

in the source code, though, a field named READ_NUM is shown, which does not appear in any document or in any source related to RT1175.

I think this is a bug.
I tried a possible fix:

mastupristi_3-1721205464856.png

 

this works

 

best regards

Max

0 Kudos
Reply
1 Solution
380 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @mastupristi ,

   Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

I think your report item is reasonable which also consider the Number of words to read.

I report this SDK requirement to our SDK team, they will help to fix it in the new version.

Thanks a lot for your contribution.

If you find any issues of our SDK bug, welcome to report!

If your question is solved, please help me to mark the correct answer, just to close this case, thanks.

Best Regards,

Kerry

View solution in original post

0 Kudos
Reply
2 Replies
381 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @mastupristi ,

   Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

I think your report item is reasonable which also consider the Number of words to read.

I report this SDK requirement to our SDK team, they will help to fix it in the new version.

Thanks a lot for your contribution.

If you find any issues of our SDK bug, welcome to report!

If your question is solved, please help me to mark the correct answer, just to close this case, thanks.

Best Regards,

Kerry

0 Kudos
Reply
58 Views
mastupristi
Senior Contributor I

Hi @kerryzhou 

do you have any news?

a new version has been released, but the buggy code is still there.

 

regards

Max

0 Kudos
Reply