摘要: #include "tim4.h"#include "stm8s_tim4.h" #define TIM4_PERIOD 124 void Dely1ms(void){ TIM4_DeInit(); /* Time base configuration */ // 8M/64=125000HZ // 阅读全文
posted @ 2017-02-12 23:29 未命名blogs 阅读(1767) 评论(0) 推荐(0) 编辑
摘要: STM8S的时钟配置通过:CLK_CKDIVR寄存器,而CLK_CKDIVR一个是配置HSI分频,另一个是配置CPU的分频 static void CLK_Config(void){ CLK_DeInit(); /* Clock divider to HSI/1 */ CLK_HSIPrescale 阅读全文
posted @ 2017-02-12 11:42 未命名blogs 阅读(5670) 评论(0) 推荐(0) 编辑
摘要: STM8S上电后的时钟来源: /* Public functions *//** * @addtogroup CLK_Public_Functions * @{ */ /** * @brief Deinitializes the CLK peripheral registers to their d 阅读全文
posted @ 2017-02-12 11:24 未命名blogs 阅读(1034) 评论(0) 推荐(0) 编辑