It's a bit heavy, but it shows you how you'd go through the process of looking at the chip's reference manual, decoding it and turning it into JavaScript that can set the hardware up in interesting ways.
At the end of the tutorial you end up with:
A hardware cycle counter
Input Capture - the ability to store the counter's value in hardware when an input changes
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I posted a new tutorial up here:
http://www.espruino.com/STM32+PeripheralÂs
It's a bit heavy, but it shows you how you'd go through the process of looking at the chip's reference manual, decoding it and turning it into JavaScript that can set the hardware up in interesting ways.
At the end of the tutorial you end up with: