Sinusoidal PWM for the STM32F302 and ihm07m1 board

Dependencies:   mbed

pwm.h

Committer:
f3d
Date:
2020-03-07
Revision:
0:31195a53c37c

File content as of revision 0:31195a53c37c:

#include <stdint.h>
uint16_t PWM[]={
1500,1535,1571,1606,1641,1676,1711,1746,1781,1815,1849,1883,1917,1951,1984,2017,2049,2081,2113,2144,2175,2205,2235,2265,2294,2322,2350,2377,2403,2429,2455,2479,2503,2527,2549,2571,2592,2613,2632,2651,2669,2686,2703,2718,2733,2747,2760,2773,2784,2794,2804,2813,2820,2827,2833,2838,2843,2846,2848,2850,2850,2850,2848,2846,2843,2838,2833,2827,2820,2813,2804,2794,2784,2773,2760,2747,2733,2718,2703,2686,2669,2651,2632,2613,2592,2571,2549,2527,2503,2479,2455,2429,2403,2377,2350,2322,2294,2265,2235,2205,2175,2144,2113,2081,2049,2017,1984,1951,1917,1883,1849,1815,1781,1746,1711,1676,1641,1606,1571,1535,1500,1465,1429,1394,1359,1324,1289,1254,1219,1185,1151,1117,1083,1049,1016,983,951,919,887,856,825,795,765,735,706,678,650,623,597,571,545,521,497,473,451,429,408,387,368,349,331,314,297,282,267,253,240,227,216,206,196,187,180,173,167,162,157,154,152,150,150,150,152,154,157,162,167,173,180,187,196,206,216,227,240,253,267,282,297,314,331,349,368,387,408,429,451,473,497,521,545,571,597,623,650,678,706,735,765,795,825,856,887,919,951,983,1016,1049,1083,1117,1151,1185,1219,1254,1289,1324,1359,1394,1429,1465

};
#define PWM_LENGTH ( sizeof(PWM) / sizeof(uint16_t) )