1 任务管理 Task Management 调度算法: 抢占+时间片均衡(默认) configUSE_PREEMPTION = 1 configUSE_TIME_SLICING = 1 相同优先级的依次执行,可被高优先级抢占 抢占+时间片不均衡 configUSE_PREEMPTION = 1 configUSE_TIME_SLICING = 0 相同优先级不均分时间片,只有高优先级task退出执行状态才会进行相同优先级ta...
configUSE_PREEMPTION//选择1为抢占式调度器,0则是协作式调度器 configCPU_CLOCK_HZ//MCU内核的工作频率,单位Hz;对不同的移植代码也可能不使用这个参数 configTICK_RATE_HZ//FreeRTOS时钟心跳,也就是FreeRTOS用到的定时中断的产生频率 configMAX_PRIORITIES//程序中可以使用的最大优先级 configMINIMAL_STACK_SIZE//...
configUSE_PREEMPTION//选择1为抢占式调度器,0则是协作式调度器configCPU_CLOCK_HZ//MCU内核的工作频率,单位Hz;对不同的移植代码也可能不使用这个参数configTICK_RATE_HZ//FreeRTOS时钟心跳,也就是FreeRTOS用到的定时中断的产生频率configMAX_PRIORITIES//程序中可以使用的最大优先级configMINIMAL_STACK_SIZE//任务堆...
git config --global user.name userName git config --global user.email userEmail 使用HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作 Username for 'https://gitee.com': userName Password for 'https://userName@gitee.com...
{ SYSCLK_Config(); delay_Init(ManualSetSYSCLK); /* //必须尽早创建任务,不然SCKtick进入中断调用xTaskIncrementTick后会造成野指针, //具体内容:https://blog.csdn.net/zhjmyx/article/details/120490993 //创建任务 //创建开始任务,此任务在执行后被删除 */ xTaskCreate((TaskFunction_t) Start_Task,//...
const char* ssid = "xxxxxxxxxx"; const char* password = "xxxxxxxxx"; String hostname = "ESP32-MICRODIGISOFT-AP1"; void initWiFi() { WiFi.mode(WIFI_STA); WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE, INADDR_NONE); WiFi.setHostname(hostname.c_str()); //define hostname ...
And because preemption is not disabled, FreeRTOS prohibits any blocking function from being called within that whilst the scheduler is suspended (i.e. Task delays or Queue send/receives with a tick timeout > 0). There are a few places in ESP-IDF that use scheduler suspension (e.g. SPI ...
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); NVIC_InitTypeDef NVIC_InitStructure; NVIC_InitStructure.NVIC_IRQChannel=USART1_IRQn; NVIC_InitStructure.NVIC_IRQChannelCmd=ENABLE ; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority=1; NVIC_InitStructure.NVIC_IRQChannelSubPriority=1; ...
//NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //设置NVIC中断分组2:2位抢占优先级,2位响应优先级 //uart_init(115200); //串口初始化为11520 //重启ESP printf("AT+RESTORE\r\n"); delay_ms(1000); delay_ms(1000); //wifi模式设置
下面先给出一个典型的FreeRTOSConfig.h 文件,然后再逐项加以说明。 #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned long ) 72000000 ) ...