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:

  1. use bitwise , operator test register : if (your_hardware_register & mode)

  2. make register volatile (by adding qualifier volatile declaration of register) polyspace consider can take value (including mode).


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -