> // Enable PWM interrupts
> HAL_WRITE_UINT32(AT91_PWM + AT91_PWM_IER, (1 << AT91_PWM_CHANNEL_ID_0));
>
> // Enable the pwm generator for channels
> HAL_WRITE_UINT32(AT91_PWM + AT91_PWM_ENA, (1 << AT91_PWM_CHANNEL_ID_0));
>
> // configure pin as output
> HAL_ARM_AT91_GPIO_CFG_DIRECTION(STOU_PWM_PIN, AT91_PIN_OUT);
This last call is wrong. You want the pin to be driven by the
peripheral, not the PIO controller. So you need to call
HAL_ARM_AT91_PIO_CFG(STOU_PWM_PIN)
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss