Fixes for stm32f4

This is to close #81 and hopefully #66.
Can you please fix the indentation?