potential bug in fsl_ocotp.c

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

potential bug in fsl_ocotp.c

跳至解决方案
412 次查看
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 项奖励
回复
1 解答
381 次查看
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 项奖励
回复
2 回复数
382 次查看
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 项奖励
回复
59 次查看
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 项奖励
回复