Repeated macro in FLEXSPI_SetFlashConfig()

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

Repeated macro in FLEXSPI_SetFlashConfig()

836 次查看
simon_walke
Contributor II

Our static analysis tools have picked up a potential issue in the code below, part of function FLEXSPI_SetFlashConfig()

configValue &= ~(FLEXSPI_FLSHCR2_AWRWAITUNIT_MASK | FLEXSPI_FLSHCR2_AWRWAIT_MASK | FLEXSPI_FLSHCR2_AWRSEQNUM_MASK |
FLEXSPI_FLSHCR2_AWRSEQID_MASK | FLEXSPI_FLSHCR2_ARDSEQNUM_MASK | FLEXSPI_FLSHCR2_AWRSEQID_MASK);

The macro FLEXSPI_FLSHCR2_AWRSEQID_MASK appears twice in the expression (looks like a copy 'n paste error at the end of the line).

We have no specific bug attributable to this, but my question is whether the second occurrence should be using the sequence ID read mask instead of the write mask, i.e. using FLEXSPI_FLSHCR2_ARDSEQID_MASK.

Is this a reasonable assumption ? Obviously we can try it out and see if anything breaks, but just wondered if this has been spotted before ....

标签 (1)
标记 (1)
0 项奖励
回复
1 回复

721 次查看
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Simon Walke

Thanks for sharing this bug, we have reported this issue, hopefully, it will be resolved in next release.

Regards

Jorge Alcala

0 项奖励
回复