Delay function in code composer studio
Your infinite while loop is at the end and empty.  Also, a good compiler might take your delay while loop and optimize it away, since it has no effect.  Check the compiler output and make sure it's still there.  

Strongly recommend that you find an MCU that is intended for motor control and has PWM hardware built in.