HomeFreeBSD

aw_pwm: add a check and some comments related to long periods

Description

aw_pwm: add a check and some comments related to long periods

The hardware supports periods as long as 196 seconds[*] when using the
maximal prescaling of 72000 and maximum cycle count of 2^16.

But the code becomes incorrect when the period length approaches 1 second.
That's because of things like NS_PER_SEC / period.

  • At the same time I must note that the KPI provides for maximum

period of about 4 seconds (2^32 nanoseconds).

MFC after: 2 weeks

Details

Provenance
avgAuthored on
Parents
rS366141: aw_pwm: ensure sane configuration, just in case
Branches
Unknown
Tags
Unknown