Forum Discussion
It might be how the polling is implemented. Are you familiar with the keyword 'volatile'? http://en.wikipedia.org/wiki/volatile_variable Variables that should be volatile are one of the many things that you can look out for once you start increasing the optimization level. When you declare a variable volatile you are basically telling the compiler that the value can change at any time without the CPU being involved (a key characteristic of a register in a slave port). If that doesn't help maybe you can copy the code you think is the culprit into this post and one of us can figure out why the optimization level is causing problems. *Usually* these problems are caused by the application code and corner cases that the developer hasn't thought of, I say usually since -O3 can sometimes bring in some surprises :)