[riot-users] Need to use PWM for managing the LED intensity using Arduino uno

Kaspar Schleiser kaspar at schleiser.de
Tue Oct 22 11:40:49 CEST 2019


Hi Jaywant,

I don't know why pwm_init() blocks, but I noticed this:

On 10/22/19 11:15 AM, THOMBARE Jaywant wrote:
> #define PWM_FREQ (1000000U)

On 16bit platforms, unsigned holds values up to 65535, so this might not
result in the intended value.

Try defining with the LU prefix:

    #define PWM_FREQ (1000000LU)

Kaspar


More information about the users mailing list