mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-20 05:51:46 +08:00
feat: configurate FreeRTOS HZ
This commit is contained in:
@ -9,4 +9,11 @@ config FREERTOS_ENABLE_REENT
|
||||
|
||||
The configuration will enable newlib.
|
||||
|
||||
config FREERTOS_HZ
|
||||
int "Tick rate (Hz)"
|
||||
range 1 1000
|
||||
default 100
|
||||
help
|
||||
Select the tick rate at which FreeRTOS does pre-emptive context switching.
|
||||
|
||||
endmenu
|
||||
|
@ -84,7 +84,7 @@
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configUSE_TICKLESS_IDLE 1
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 80000000 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 100 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) CONFIG_FREERTOS_HZ )
|
||||
#define configMAX_PRIORITIES 15
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 768 )
|
||||
//#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) )
|
||||
|
@ -26,6 +26,8 @@ and the Xtensa core configuration need not have a timer.
|
||||
#ifndef XTENSA_TIMER_H
|
||||
#define XTENSA_TIMER_H
|
||||
|
||||
#include "freertos/FreeRTOSConfig.h"
|
||||
|
||||
#ifdef XT_RTOS_TIMER_INT /* skip all this stuff if no timer int */
|
||||
|
||||
#ifdef __ASSEMBLER__
|
||||
@ -125,7 +127,7 @@ editing this here or in xtensa_rtos.h, or compiling with xt-xcc option
|
||||
"-DXT_TICKS_PER_SEC <value>" where <value> is a suitable number.
|
||||
*/
|
||||
#ifndef XT_TICK_PER_SEC
|
||||
#define XT_TICK_PER_SEC 100 /* 10 ms tick = 100 ticks per second */
|
||||
#define XT_TICK_PER_SEC CONFIG_FREERTOS_HZ /* 10 ms tick = 100 ticks per second */
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user