fix #347 and update stm32f10x uart driver