{"action":"created","issue":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2948","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2948/labels{/name}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2948/comments","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2948/events","html_url":"https://github.com/RIOT-OS/RIOT/pull/2948","id":74702227,"number":2948,"title":"cpu/nrf51822/periph/random Power optimization","user":{"login":"d00616","id":519822,"avatar_url":"https://avatars.githubusercontent.com/u/519822?v=3","gravatar_id":"","url":"https://api.github.com/users/d00616","html_url":"https://github.com/d00616","followers_url":"https://api.github.com/users/d00616/followers","following_url":"https://api.github.com/users/d00616/following{/other_user}","gists_url":"https://api.github.com/users/d00616/gists{/gist_id}","starred_url":"https://api.github.com/users/d00616/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d00616/subscriptions","organizations_url":"https://api.github.com/users/d00616/orgs","repos_url":"https://api.github.com/users/d00616/repos","events_url":"https://api.github.com/users/d00616/events{/privacy}","received_events_url":"https://api.github.com/users/d00616/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/arm","name":"arm","color":"dddddd"},{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Device%20driver","name":"Device driver","color":"0052cc"},{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/enhancement","name":"enhancement","color":"f17070"}],"state":"open","locked":false,"assignee":{"login":"haukepetersen","id":620834,"avatar_url":"https://avatars.githubusercontent.com/u/620834?v=3","gravatar_id":"","url":"https://api.github.com/users/haukepetersen","html_url":"https://github.com/haukepetersen","followers_url":"https://api.github.com/users/haukepetersen/followers","following_url":"https://api.github.com/users/haukepetersen/following{/other_user}","gists_url":"https://api.github.com/users/haukepetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/haukepetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haukepetersen/subscriptions","organizations_url":"https://api.github.com/users/haukepetersen/orgs","repos_url":"https://api.github.com/users/haukepetersen/repos","events_url":"https://api.github.com/users/haukepetersen/events{/privacy}","received_events_url":"https://api.github.com/users/haukepetersen/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-05-09T15:55:56Z","updated_at":"2015-05-11T15:46:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/2948","html_url":"https://github.com/RIOT-OS/RIOT/pull/2948","diff_url":"https://github.com/RIOT-OS/RIOT/pull/2948.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/2948.patch"},"body":"My goal is to drive one NRF51 controller via CR2032 cell for an minimum of three years with radio network. This needs to reduce average current to 7.5uA.  This is one small step to reach this goal.\r\n\r\nThis PR has some effects:\r\n1. PAN #21 fix for better RNG quality\r\n2. random_read doesn't hang when random is powered off\r\n3. auto powerdown RNG to save 16uA current\r\n4. reduce code size for RNG power handling"},"comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments/100952148","html_url":"https://github.com/RIOT-OS/RIOT/pull/2948#issuecomment-100952148","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/2948","id":100952148,"user":{"login":"haukepetersen","id":620834,"avatar_url":"https://avatars.githubusercontent.com/u/620834?v=3","gravatar_id":"","url":"https://api.github.com/users/haukepetersen","html_url":"https://github.com/haukepetersen","followers_url":"https://api.github.com/users/haukepetersen/followers","following_url":"https://api.github.com/users/haukepetersen/following{/other_user}","gists_url":"https://api.github.com/users/haukepetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/haukepetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haukepetersen/subscriptions","organizations_url":"https://api.github.com/users/haukepetersen/orgs","repos_url":"https://api.github.com/users/haukepetersen/repos","events_url":"https://api.github.com/users/haukepetersen/events{/privacy}","received_events_url":"https://api.github.com/users/haukepetersen/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T15:46:53Z","updated_at":"2015-05-11T15:46:53Z","body":"I think the general idea is good, but two remarks:\r\n\r\n1. Your code does not quite work: if there is an interrupt from another source while you are sleeping, you will read a wrong/old value into your results\r\n2. Why are you moving the power-ctrl into the read function instead of calling them explicitly? This kind of breaks the concept of the periph API...\r\n\r\n"}}