2010-09-16 08:42 AM
Problem with PWM on TIM1 STM32F103VBT6
2011-05-17 05:07 AM
To make matter worse my program works only at Level Optimization 3 on Keil. When I am using Level Optimization 0 it doesn't work. I think that the problem is located in StdLib. I attached the source code of this part when PWM is configured:
Chances are that changing the optimization effects your code, and not code pulled in by the linker from a static LIB file. While it might be convenient to blame the library, it's pretty mature at this point. The part where you read the buttons and alter the PWM settings might be more enlightening seeing as that is where you are seeing odd behaviour. Try posting enough of the project that someone can actually try to build it. You can actually attach files to a post, rather than paste them inline.