- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在 Cortex M0 上学习 FreeRTOS。 (同时,我也在学习皮质......)。我在 8 位 MCU 方面拥有丰富的经验。
我正在阅读 FreeRTOS 的新手教程,并且了解如何设置基本任务和空闲守护进程。
我意识到我并不真正理解 FreeRTOS 正在做什么来管理内核的底层计时机制。这就引出了一个大问题......
当您想要关闭设备时,关闭 RTOS 的理想方法是什么?不要让设备闲置,而是将您的 MCU 置于最深的关闭状态(无论您如何调用它)。
在任务之间空闲似乎很简单,但是关闭 MCU 并确保其保持关闭状态,并且 RTOS 内核不会触发中断或其他东西来唤醒 MCU ......?
最佳答案
这是深度 sleep 模式/掉电模式,对于8位MCU,这位于ATmega128RFA1数据表第159页http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-8266-MCU_Wireless-ATmega128RFA1_Datasheet.pdf中(使用唤醒源)在此模式下,所有内部定时器均被禁用
在 freeRTOS 中,这被称为Tickless Idle Mode,参见 https://www.freertos.org/low-power-tickless-rtos.html
Note: If eTaskConfirmSleepModeStatus() returns eNoTasksWaitingTimeout when it is called from within portSUPPRESS_TICKS_AND_SLEEP() then the microcontroller can remain in a deep sleep state indefinitely. eTaskConfirmSleepModeStatus() will only return eNoTasksWaitingTimeout when the following conditions are true:
Software timers are not being used, so the scheduler is not due to execute a timer callback function at any time in the future.
All the application tasks are either in the Suspended state, or in the Blocked state with an infinite timeout (a timeout value of portMAX_DELAY), so the scheduler is not due to transition a task out of the Blocked state at any fixed time in the future.
To avoid race conditions the RTOS scheduler is suspended before portSUPPRESS_TICKS_AND_SLEEP() is called, and resumed when portSUPPRESS_TICKS_AND_SLEEP() completes. This ensures application tasks cannot execute between the microcontroller exiting its low power state and portSUPPRESS_TICKS_AND_SLEEP() completing its execution. Further, it is necessary for the portSUPPRESS_TICKS_AND_SLEEP() function to create a small critical section between the tick source being stopped and the microcontroller entering the sleep state. eTaskConfirmSleepModeStatus() should be called from this critical section.
All GCC, IAR and Keil ARM Cortex-M3 and ARM Cortex-M4 ports now provide a default portSUPPRESS_TICKS_AND_SLEEP() implementation. Important information on using the ARM Cortex-M implementation is provided on the Low Power Features For ARM Cortex-M MCUs page.
因此在 freeRTOS 中调用无滴答空闲模式相当于深度 sleep 或断电。可能你必须手动禁用皮质上的内部计时器......
在 Contiki OS 中关闭 ATmega128RFA1 MCU 时遇到一些问题...
关于c - 嵌入式RTOS停止系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48345800/
假设有 6 个任务,在 6 个中,有 4 个(任务)正在等待一个信号量。当信号量发出信号时, 会做出什么决定?实时操作系统 which tasks to pick from the waiting(f
我希望编写一个非常基本的 RTOS,它可以在两个任务之间切换。它不适合任何专业用途。只是为了好玩 大多数引用资料都是关于如何使用 RTOS,而不是如何编写 RTOS。 引用像 FreeRTOS 这样的
如果有人可以解释 RTOS 中的滴答率过高的影响,或者指导我找到清楚解释它的资源,我将不胜感激? 问题的上下文... 我们使用 ucos-ii 运行,滴答率为 10000 (OS_TICKS_PER_
Zephyr 实时操作系统 https://www.zephyrproject.org/是一个 Linux 基金会项目。 Linux 以其 GPL 许可证而闻名。那么为什么 Zephyr RTOS 使
假设有两个任务正在运行TASK_A和TASK_B。当TASK_A运行时,发生中断,需要将上下文切换到TASK_B。 在ISR内时,不应直接跳过TASK_B,因为它仍在ISR中并且尚未返回(例如:未执行
我想了解操作系统节拍时间是什么意思,它有什么用? 以及它与 CPU 节拍率有何不同 最佳答案 系统节拍是操作系统计时器和延迟所基于的时间单位。系统节拍是一个调度事件 - 即它会导致调度程序运行并可能导
我正在尝试从头开始学习 RTOS,为此,我使用 freeRTOS.org 作为引用。我发现这个站点是学习 RTOS 的最佳资源。但是,我有一些疑问,我试图找出答案,但无法得到确切的答案。 1) 如何找
在基于 ARM7 的 C 语言编程的嵌入式应用程序中(具有可移植性要求),当前使用基于商业优先级的抢占式 RTOS,我们需要根据客户要求删除该 RTOS 和任何 RTOS 依赖项。我们有 8 个任务使
我对嵌入式世界还很陌生。我在为基于 ARM M0+ 的飞思卡尔微处理器编码固件方面有一些经验。我目前正在使用 CML-5282 开发板 (M5282LITE) 进行一个新项目,它带有 RTXC Qua
首先是背景,我的问题的细节如下: 在我工作的公司,我们工作的平台目前是 Microchip PIC32 系列,使用 MPLAB IDE 作为我们的开发环境。以前,我们还为同一应用编写了 Microch
FreeRTOS 使用什么样的调度程序? 我在某处读到它是一个运行完成调度程序,但另一方面,我也看到它与并行任务一起使用,所以它不会是一个循环调度程序? 最佳答案 最高优先级的任务被授予CPU时间。如
我正在对 TI 的一 block 板进行编程,并且我希望能够以某种方式将两个不同的 ISR 发布到任务的消息队列中。那部分工作正常。但是,在接收端,是否有任何智能方法可以让任务挂起在队列中,并根据发布
FreeRTOS 使用什么样的调度程序? 我在某处读到它是一个运行完成调度程序,但另一方面,我也看到它与并行任务一起使用,所以它不会是一个循环调度程序? 最佳答案 最高优先级的任务被授予CPU时间。如
很难说出这里问的是什么。这个问题是含糊的、模糊的、不完整的、过于宽泛的或修辞性的,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开它,visit the help center 。 已关
我正在编写一个模块,其中包含一个具有最高优先级的任务,并且它应该处于阻塞状态,直到它收到来自其他任务的消息,开始履行其作为最高优先级任务的职责。它使用邮箱机制进行信令。 我的问题是我希望任务 - 向更
所以我对为我实现的游戏形成线程的最佳方法有点困惑。游戏非常简单,你必须操纵你的飞船来躲避来袭的墙壁。 目前我的代码只是循环执行,直到宇宙飞船爆炸。以此 while 循环表示(如果游戏结束,notBlo
我对创建任务的 RTOS 方法不熟悉。之前,我在 Raspberry Pi 上使用 pthread,这使我能够同时运行 2 个任务, 1)每2秒通过套接字发送数据 2)每当从客户端发送数据时,通过套接
简单背景: 在我的 MCU 上运行 freeRTOS。 我的项目中的功能之一是一个处理存储在外部存储器中的参数的库。 基本上在启动时,主函数调用从外部存储器读取所有参数并将它们存储在库内的静态变量(非
我想编写一个需要一些 RTOS API(例如 Mbox 和任务创建 API)的模块! 我正在尝试使用结构化代码并为此查看一些库,例如“lwip”。在“lwip”中有一个名为 Sys-arch.c 的文
我有一个现有的嵌入式源代码,它直接在没有操作系统的微 Controller 上运行。我需要移植代码以在特定的 RTOS 上运行。 在尝试做某事时,是否有关于从哪里开始的指导方针?资源、最佳实践和其他见
我是一名优秀的程序员,十分优秀!