STM32F2 odd serial port behaviour.

Comments

2 comments

  • Avatar
    Matt

    Hi Gordon,

    I don't know if this is new for the 3.x series, but I've noticed a fair amount of my code acts differently due to optimization settings.  Even in debug, if I up the optimization to level 1, I get some routines that no longer work correctly.  Even with "static" and "volatile" and moving things around to prevent optimizing out unfortunately.

    Perhaps check the optimization level in your release build vs. your debug build.  If they are different, set your release build to the same level as the debug and see if it works...

    Matt

    0
    Comment actions Permalink
  • Avatar
    Gordon Scott

    Turning off optimisation does seem to make things work properly again.

    Perhaps I've omitted a "volatile" or some such.

    Thanks for the suggestion.

    0
    Comment actions Permalink

Please sign in to leave a comment.