2016-09-28 07:29 PM
2016-09-29 02:10 AM
Hi karthy.vain,
It is a matter of IDE's optimization, it will optimize on that variable value update to be not aligned with the code sequence. To prohibit the IDE from variable optimization , the variable should be declared as volatile.-Hannibal-2016-09-29 09:42 PM
2016-09-29 09:44 PM
Thanks Hannibal for your reply. I was declared count as volatile variable. but It is still wrong. nothing is changed. do you have any other comments?
2016-09-30 06:46 AM
Hikarthy.vain,
You would declare it as an unsigned fixed width integer instead of using ''int'' on different bit machines which can results in subtle bugs cause by compilation optimization technics. you write it as follow:__IO uint32_t count = 0;
And tell me if that resolve your issue.
-Hannibal-