分析了DeltaOS的设备驱动基本框架,设计实现了多通道PMC-CAN驱动程序.针对DeltaOS实时多任务的特点,基于看门狗定时器方法,有效简化了多任务环境下周期任务轮询程序的设计;设计了一种多通道中断处理的方法,提高了多通道数据传输效率及通道利用率;针对多个CAN通道的调度提出了一种基于动态调度表的调度方法;通过实验验证了CAN驱动的正确性及多通道调度的有效性.%This paper analyzes the basic framework of device driver based on DeltaOS, designs and implements multi-channel driver of PMC-CAN. In connection with the characteristics of real-time and multitask in DeltaOS, based on watchdog timer, this paper effectively simplifies the design of periodic task polling in the multitask environments. It also designs a method of processing multi-channel interrupt to improve the efficiency of multi-channel data transmission and channel utilization. Based on dynamic scheduling table it proposes a scheduling method for the system of multi channels of CAN. It verifies the correctness of the CAN driver and effectiveness of multi-channel's scheduling through experiments.
展开▼