What do you have so far? Example msp432p401x_ta1_16.c demonstrates the mechanics: http://dev.ti.com/tirex/explore/node?node=ABQIQVo5QZQgP-pLgBCbbg__z-lQYNj__LATEST The only trick is to figure out the constants. That program counts up to 1000 (period) using a 3MHz clock, so the PWM frequency is 3000000/1000 ticks=3000 Hz. Flipping that around, you want a period of 3000000/25000Hz=120 ticks. The on/off compare value would be 93%*120=~112 ticks.
↧