请问这样配置为什么出不来波形呢?
是哪里配置有问题么?
void PWM_Init(void)//(U8 ucPin, U8 ucDivFactor, U8 ucPWMMode)
{
PORTB_PCR0 = PORT_PCR_MUX(3) | PORT_PCR_DSE_MASK;
SIM_SCGC6 |=SIM_SCGC6_TPM1_MASK;
TPM1_C0SC |= TPM_CnSC_MSB_MASK | TPM_CnSC_ELSA_MASK;
TPM1_MOD |=TPM_SC_CMOD_MASK|PWM_FRE_FACTOR;
TPM1_C0V = 100;
} |