freertos关闭所有中断
时间: 2023-08-20 22:04:34 浏览: 184
在FreeRTOS中,关闭所有中断的方法是通过操作BASEPRI寄存器来实现的。具体来说,可以使用`portDISABLE_INTERRUPTS()`函数来关闭中断,该函数会将BASEPRI寄存器设置为一个较高的值,从而屏蔽低于这个阈值的中断。这样一来,所有低优先级的中断都会被禁止,只有高于这个阈值的中断才能继续执行。\[1\]\[2\]\[3\]
#### 引用[.reference_title]
- *1* [【FreeRTOS】06 临界段的保护——关中断和关调度](https://blog.csdn.net/little_grapes/article/details/125288577)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [FreeRTOS学习(三)开关中断](https://blog.csdn.net/longjingcha110/article/details/86486561)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [FreeRTOS之开关中断](https://blog.csdn.net/linuxweiyh/article/details/78199778)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文