Repeated macro in FLEXSPI_SetFlashConfig()

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Repeated macro in FLEXSPI_SetFlashConfig()

718件の閲覧回数
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 返信

603件の閲覧回数
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 件の賞賛
返信