updated bd1 implementation and new implementation of the tests on stm32f4