STM32F407的三相正弦波调制程序源码 SPWM,SVPWM两种算法,频率,载频,幅值可调,可以做为你的学习设计参考。
int main(void)
{ NVIC_InitTypeDef NVIC_InitStructure;
double pwmcs;
NVIC_InitStructure.NVIC_IRQChannel = TIM1_UP_TIM10_IRQn ;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
for(i8=0;i8<800;i8++)
sinA[i8] = sin( (double)i8*3.1415926/180 ) ;
for(i8=0;i8<4