Repeated macro in FLEXSPI_SetFlashConfig()

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

Repeated macro in FLEXSPI_SetFlashConfig()

718 Views
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 ....

Labels (1)
Tags (1)
0 Kudos
Reply
1 Reply

603 Views
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 Kudos
Reply