c - Handling hardware with polyspace -
i working mathworks polyspace code analysis. have hardware register write key+mode , read register check value in register equal mode.
the problem is, polyspace considers 'always fail' writing , reading different values in consecutive steps.
is there option in polyspace handle issue.?
since key+mode different mode, polyspace logically consider test your_hardware_register == mode
failed (fortunatly).
it seems key , mode bit flags register. see 2 options:
use bitwise , operator test register :
if (your_hardware_register & mode)
make register volatile (by adding qualifier volatile declaration of register) polyspace consider can take value (including mode).
Comments
Post a Comment