Skip to content

Instantly share code, notes, and snippets.

@shtirlic
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shtirlic/f0f83d7bd049f8ca98c1 to your computer and use it in GitHub Desktop.
Save shtirlic/f0f83d7bd049f8ca98c1 to your computer and use it in GitHub Desktop.
Clock calculation for STM32
require 'pp'
pp (2..15).map{|pllq| vco=pllq*48 ;{ {vco: vco,pllq: pllq} => [2,4,6,8].map{|pllp| { sysclk: vco/pllp,pllp: pllp }}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment