I'm using the stm32f3discovery board to try and generate the signal for a ws2812 light strip.
src/system_stm32f30x.c, which I copied from the StdPeriph examples. I'm currently using the internal HSI, and the clock speed is 48MHz.
I'm using gcc-arm-none-eabi-4_8-2014q3 to compile.
If I leave
src/system_stm32f30x.c as is, I get compiler warnings about unused variables, HSEStatus, and StartUpCounter, but my program works correctly. If I rename the variables to test1 and test2, it still works as expected, so it appears that it doesn't matter what the variables are named, it just matters that they are taking up memory (I guess).
However, if I comment these variables in order to get rid of the warning, my program no longer works correctly. The first pulse of the PWM signal is either grossly too short, or way to long. It causes the first LED on my strip to flash erratically (though the rest of the LEDs are fine).
My code is here: https://github.com/synic/neoclock/tree/stm32f303
What could it be?