APP下载

无源节点上一种多任务内核的设计与实现

2018-09-29文豪高宏程思瑶赵旭

智能计算机与应用 2018年4期

文豪 高宏 程思瑶 赵旭

摘 要:物联网作为目前研究的热点问题之一,在长期泛在方面却存在问题,能源将成为制约其发展的关键因素之一,无源传感器网络应运而生。该网络中的无源节点不配备电池等电源设备,而是从周围的环境中捕获太阳能,射频能量,这样大大增加了传感器网络的生命周期。本文在现有的无源节点IEA上实现了一种多任务内核,结合MSP430微控制器体系结构特点,将中断和普通调度情形下任务上下文统一,以此提供了两阶段调度。任务上下文以栈的形式存在,解决了该微控制器嵌入式应用程序二进制接口关于栈平衡的问题。本文在多任务基础上实现了简单的异步信号处理、信号量两种任务间通信方式。实验结果表明该内核在无源节点上运行良好。

关键词:多任务管理; 嵌入式操作系统内核; 无源传感网

Abstract: As a hot research topic, IoT applications are hard to be deployed widely and work continuously. Power resource is one of the key factors that could impact. In such cases, energy harvesting wireless sensor network is on its duty. The nodes in EH-WSN aren't equipped with power supply, for example batteries, they harvest solar energy, RF energy and so on from the surrounding environment. And this prolongs the life of the sensors network. This paper designs and implements a multi-tasks kernel on the IEA EH-WSN node. According to the features of MSP430 ultra-low power micro controller unit's architecture, the paper unifies the schedule triggered by interrupts and ordinary function calls. The task context is the same and stored on stack. Based on that, the paper divides the schedule into two phases. Also the paper solves the problems with EABI of MSP430 about the stack balance. Furthermore, a simple asynchronized inter-task communication manner-signal and semaphore are implemented. The experiment results show the kernel works well on IEA nodes.

Key words: multi-tasks; embedded operating system; EH-WSN

引言

物联网作为感知互联系统向物理世界的延伸,极大地拓展了人类对物理世界的认知和控制能力,其广泛应用必将深刻地影响人类的生活方式。同时,这也堪称是下一个万亿级别的产业,国内外许多公司比如微软、阿里巴巴、华为等均已开始布局物联网。然而物联网的大范围部署却不得不面临着能源问题,电池等电源设备将会成为制约物联网发展的一个重要因素。物联网感知层,比如传感器节点有时需要部署在没有直接能量供应的地方,此时电源设备成为标配,电源设备会因为使用而消耗殆尽。……

登录APP查看全文