lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <509BAFB9.6090801@antcom.de>
Date:	Thu, 08 Nov 2012 14:12:25 +0100
From:	Roland Stigge <stigge@...com.de>
To:	Alban Bedel <alban.bedel@...onic-design.de>
CC:	Thierry Reding <thierry.reding@...onic-design.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Alexandre Pereira da Silva <aletes.xgr@...il.com>
Subject: Re: [PATCH] pwm: lpc32xx - Fix the PWM polarity

On 08/11/12 12:23, Alban Bedel wrote:
>>> It is intended, the formular for duty value in the register is:
>>>
>>> duty = (256 - 256*duty_ns/period_ns) % 256
>>
>> Where does this modulo defined? In the Manual, there is sth. like this
>> defined for RELOADV (tables 606+607), but not for DUTY.
>>
>> Maybe I missed sth. in the manual. Link or hint appreciated!
> 
> The manual doesn't mention this explicitly but you can see that without
> the modulo when duty_ns==0 DUTY would be 256, but the register is only
> 8 bits wide (ie. modulo 256). I made a few test and looked at the PWM
> output on a scope they confirm this:
> 
>  DUTY     HIGH LEVEL
>   1         99.9%
>   25        90.0%
>   128       50.0%
>   220       10.0%
>   255        0.1%
>   0          0.0%
> 
> I'll resubmit the patch with the clamping in the correct order.

Thanks for measuring. With this, your resubmitted patch make much more
sense now.

Roland
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ