1. 程式人生 > >軟件定時器osTimerCreate返回NULL

軟件定時器osTimerCreate返回NULL

bug popu == msi fonts enter content eat stm32

CMSIS-RTOS是對FreeRtos的封裝,函數名比較適合純軟件編程。

如今的版本號是1.0.2.


id1 = osTimerCreate(osTimer(Timer_1),  osTimerOnce, NULL);

可是這個osTimerCreate總是返回0x00000000。

就是創建軟件定時器不成功。

技術分享


在stm32cubmx的配置中,看到Timers不能夠選擇。

須要在Config parameters中啟用軟件定時器,或者直接在freertos.h中進行改動。

技術分享


又一次生成一下代碼,在Debug中能夠看到:

技術分享


軟件定時器,創建成功。


軟件定時器osTimerCreate返回NULL